Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working copy #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 51 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions simple/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,19 +12,19 @@ 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
container_name: 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"
8 changes: 4 additions & 4 deletions with-netstats/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down