-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ethereum/subprocess_mining
Subprocess mining
- Loading branch information
Showing
12 changed files
with
462 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,43 @@ | ||
## Builds pyethapp from github in a python 2.7 docker container. | ||
# | ||
## Builds pyethapp from GitHub in a python 2.7.9 docker container. | ||
## Note: base image, do not use in a production environment | ||
## | ||
## Build via: | ||
## Build with: | ||
# | ||
# `docker build --rm --no-cache -t pyethapp:latest | ||
# docker build -t pyethapp . | ||
# | ||
## the '--rm --no-cache' above avoids stacking up and or reusing intermediary builds. | ||
## | ||
## Run via: | ||
## Run with: | ||
# | ||
# `docker run --rm \ | ||
# -p 0.0.0.0:30303:30303 \ | ||
# -p 0.0.0.0:30303:30303/udp \ | ||
# -v <host dir>:/data \ | ||
# pyethapp:latest` | ||
# docker run -p 30303:30303 -p 30303:30303/udp pyethapp | ||
# | ||
## Note, that <host dir> given in '-v <host dir>:/data' above needs | ||
## to be writable for the user inside the container (uid:1000/gid:1000). | ||
|
||
FROM python:2.7.9 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git-core && \ | ||
apt-get clean | ||
RUN apt-get update | ||
RUN apt-get install -y git-core | ||
|
||
RUN git clone https://github.com/ethereum/pyrlp && cd pyrlp &&\ | ||
git checkout develop && \ | ||
pip install -r requirements.txt && \ | ||
python setup.py install | ||
RUN git clone https://github.com/ethereum/pyrlp | ||
WORKDIR pyrlp | ||
RUN git checkout develop | ||
RUN pip install -e . | ||
|
||
RUN git clone https://github.com/ethereum/pydevp2p && cd pydevp2p &&\ | ||
pip install -r requirements.txt && \ | ||
python setup.py install | ||
RUN git clone https://github.com/ethereum/pydevp2p | ||
WORKDIR pydevp2p | ||
RUN pip install -e . | ||
|
||
RUN git clone https://github.com/ethereum/pyethereum && cd pyethereum &&\ | ||
git checkout develop && \ | ||
pip install -r requirements.txt && \ | ||
python setup.py install | ||
RUN git clone https://github.com/ethereum/pyethereum | ||
WORKDIR pyethereum | ||
RUN git checkout develop | ||
RUN pip install -e . | ||
|
||
RUN git clone https://github.com/ethereum/pyethapp && cd pyethapp && \ | ||
python setup.py install | ||
RUN git clone https://github.com/ethereum/pyethapp | ||
WORKDIR pyethapp | ||
RUN pip install -e . | ||
|
||
# Fix debian's ridicolous gevent-breaking constant removal | ||
# Fix debian's ridiculous gevent-breaking constant removal | ||
# (e.g. https://github.com/hypothesis/h/issues/1704#issuecomment-63893295): | ||
RUN sed -i 's/PROTOCOL_SSLv3/PROTOCOL_SSLv23/g' /usr/local/lib/python2.7/site-packages/gevent/ssl.py | ||
|
||
# For docker builds from git, we add the last commit to the version string: | ||
RUN cd pyethapp &&\ | ||
sed -i "s/client_version = 'pyethapp/client_version = 'pyethapp_$(git rev-parse HEAD| cut -c 1-6)/g" /usr/local/lib/python2.7/site-packages/pyethapp*/pyethapp/app.py | ||
|
||
RUN adduser pyethuser | ||
|
||
# We use a startscript to wrap the '-d /data' parameter. | ||
# in theory this wouldn't be necessary and we could use the following two lines: | ||
#ENTRYPOINT ["/usr/local/bin/pyethapp", "-d", "/data/pyethdata"] | ||
#CMD ["run"] | ||
# unfortunately, in practice it doesn't though. | ||
RUN echo '#!/bin/bash\nset -e\n\nexec /usr/local/bin/pyethapp -d /data/pyethdata "$@"' > /home/pyethuser/startscript.sh | ||
|
||
RUN chmod +x /home/pyethuser/startscript.sh &&\ | ||
chown -R pyethuser. /home/pyethuser | ||
|
||
USER pyethuser | ||
|
||
ENTRYPOINT ["/home/pyethuser/startscript.sh"] | ||
CMD ["run"] | ||
|
||
# mount host directory via "-v /path/to/host/dir:/data" - needs u+w or g+w for 1000 | ||
VOLUME ["/data"] | ||
ENTRYPOINT ["pyethapp"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.