Ethereum Docker Node Guide
Run a Geth (Execution Layer) + Prysm (Consensus Layer) node stack with Docker Compose. For the Korean version see README.md.
Quick start
1. Environment variables (optional)
cat > .env <<EOF
MODE=mainnet # mainnet (default), goerli, sepolia
P2PPORT=30303
MAXPEERS=25
EOF
2. Run with Docker Compose
docker-compose up -d
docker-compose logs -f
docker-compose ps
3. Status checks
# Geth sync
docker-compose exec ethereum ./geth attach --exec 'eth.syncing'
docker-compose exec ethereum ./geth attach --exec 'eth.blockNumber'
docker-compose exec ethereum ./geth attach --exec 'net.peerCount'
# Prysm Beacon
curl http://localhost:3500/eth/v1/node/syncing
Stop
docker-compose stop # keep data
docker-compose down # stop + remove containers
Metrics endpoint (Prometheus)
- Geth:
--metrics --metrics.addr=0.0.0.0 --metrics.port=6060→GET http://<host>:6060/debug/metrics/prometheus - Prysm beacon:
--monitoring-host 0.0.0.0 --monitoring-port 8080→GET http://<host>:8080/metrics
Full monitoring stack: ../../../common/monitoring-stack.md.
Security notes
- RPC ports are exposed on localhost only.
- JWT secret is generated automatically and only used inside the container.
- Open only the P2P ports (30303, 13000) in the host firewall.
- Keep Geth and Prysm on recent versions — hardforks brick outdated clients.
Native host install
For the non-container setup see ../localhost/README.md.