diff --git a/Dockerfile b/Dockerfile index 3d20574..792aca6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,52 @@ -# build with `docker build -t localethereum/client-python .` -FROM python:2.7.11 +FROM python:2.7.9 -RUN pip install pyethapp -ENTRYPOINT ["/usr/local/bin/pyethapp"] +# Update and install dependencies +RUN apt-get update +RUN apt-get install -y \ + git-core \ + build-essential \ + automake \ + pkg-config \ + libtool \ + libffi-dev \ + libgmp-dev \ + python-dev \ + libssl-dev \ + python-pip + +RUN pip install --upgrade pip + +# Install pyrlp +RUN git clone https://github.com/ethereum/pyrlp /apps/pyrlp +WORKDIR /apps/pyrlp +RUN pip install -e . + +# Install pydevp2p +RUN git clone https://github.com/snario/pydevp2p /apps/pydevp2p +WORKDIR /apps/pydevp2p +RUN pip install -e . + +# # Install pyethereum +# RUN git clone https://github.com/ethereum/pyethereum/ /apps/pyethereum +# WORKDIR /apps/pyethereum +# RUN pip install -e . + +# Install and setup pyethapp +RUN git clone https://github.com/ethereum/pyethapp /apps/pyethapp +WORKDIR /apps/pyethapp +RUN pip install -Iv ipython==5.4.1 +RUN USE_PYETHEREUM_DEVELOP=1 python setup.py develop + +# 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 + +RUN mkdir -p /data/chaindata +RUN mkdir -p /data/keystore +RUN mkdir -p /data/nodes + +EXPOSE 4000 +EXPOSE 30303 +EXPOSE 30303/udp + +VOLUME /data diff --git a/simple/docker-compose.yml b/simple/docker-compose.yml index 08e06ad..1720485 100644 --- a/simple/docker-compose.yml +++ b/simple/docker-compose.yml @@ -2,7 +2,7 @@ bootstrap: image: localethereum/client-python container_name: bootstrap entrypoint: /usr/local/bin/pyethapp - command: "-c eth.network_id=1337 -c node.privkey_hex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -c node.privkey_hex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' run --fake" ports: - 127.0.0.1:30304:30303 - 127.0.0.1:30304:30303/udp @@ -12,14 +12,14 @@ eth: links: - bootstrap entrypoint: /usr/local/bin/pyethapp - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' run --fake" miner: image: localethereum/client-python links: - bootstrap entrypoint: /usr/local/bin/pyethapp - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 run --fake" debug: image: localethereum/client-python @@ -27,4 +27,4 @@ debug: links: - bootstrap entrypoint: /usr/local/bin/pyethapp - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -l :debug,p2p:info -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -l :debug,p2p:info run --fake" diff --git a/with-netstats/docker-compose.yml b/with-netstats/docker-compose.yml index 7d0a3f5..3017915 100644 --- a/with-netstats/docker-compose.yml +++ b/with-netstats/docker-compose.yml @@ -10,7 +10,7 @@ services: links: - statsmon entrypoint: /root/start.sh - command: "-c eth.network_id=1337 -c node.privkey_hex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -c node.privkey_hex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@localhost:30303' run --fake" ports: - 127.0.0.1:30304:30303 - 127.0.0.1:30304:30303/udp @@ -23,7 +23,7 @@ services: - statsmon - bootstrap entrypoint: /root/start.sh - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' run --fake" miner: networks: @@ -33,7 +33,7 @@ services: - statsmon - bootstrap entrypoint: /root/start.sh - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -m 50 run --fake" debug: networks: @@ -44,7 +44,7 @@ services: - statsmon - bootstrap entrypoint: /root/start.sh - command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -l :debug,p2p:info -c eth.genesis_hash=283bd9430c5f3114872f93beefe99d6626980b3a4a18a44ddd27749cd89688f2 run --fake" + command: "-c eth.network_id=1337 -b 'enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@bootstrap:30303' -l :debug,p2p:info run --fake" statsmon: networks: