Skip to content

Instantly share code, notes, and snippets.

@courtneymyers
Last active April 10, 2018 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save courtneymyers/ee2576a30509306a5f486c331c2220cd to your computer and use it in GitHub Desktop.
Save courtneymyers/ee2576a30509306a5f486c331c2220cd to your computer and use it in GitHub Desktop.
Dockerized Ethereum Node
#!/bin/sh
### run shell in temporary geth container (run 'geth' after attaching)
# docker run -it --rm --entrypoint "/bin/sh" ethereum/client-go
### run geth JavaScript console
# docker run -it -p 30303:30303 ethereum/client-go console
### run containerized ropsten (proof-of-work) test network
# docker run -it -p 30303:30303 ethereum/client-go --testnet
# docker run -it -p 30303:30303 ethereum/client-go --networkid=3
### run containerized rinkeby (proof-of-authority) test network
# docker run -it -p 30303:30303 ethereum/client-go --rinkeby
# docker run -it -p 30303:30303 ethereum/client-go --networkid=4
### start ethereum node in geth container
docker run \
--interactive \
--tty \
--name ethereum-node \
--mount type=bind,source=$HOME/.ethereum,target=/root/.ethereum \
--publish 8545:8545 \
--publish 30303:30303 \
ethereum/client-go \
--syncmode=light \
--cache=4096;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment