using docker compose to build ethereum node cluster with docker and geth
Inspire by konradkonrad/docker-pyeth-cluster
- install docker, docker-compose
- build docker image if you need
git clone https://github.com/konradkonrad/docker-geth-cluster.git
cd docker-geth-cluster
docker build -t calee0219/docker-geth-cluster .
cd simple
docker-compose up --scale bootstrap=1 --scale eth=2 --scale miner=3
Where 1, 2, and 3 is how many node you want to create
# enter docker
docker exec -it [contaoiner name] /bin/bash
# attach to geth
geth attach
-
bootstrap: A bootstrap node for your network. You should always build it and build it only one node.
-
eth: A normal node that will not mining
-
miner: A mining node
-
you can edit genesis up to you
you must rebuild docker image if you rewrite genesis
-
change parameter here