Nodes/ethereum/docker/en

ethereum

Ethereum Docker Node Guide

2분 읽기 · docker/en

list목차(8)

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=6060GET http://<host>:6060/debug/metrics/prometheus
  • Prysm beacon: --monitoring-host 0.0.0.0 --monitoring-port 8080GET http://<host>:8080/metrics

Full monitoring stack: ../../../common/monitoring-stack.md.

Security notes

  1. RPC ports are exposed on localhost only.
  2. JWT secret is generated automatically and only used inside the container.
  3. Open only the P2P ports (30303, 13000) in the host firewall.
  4. Keep Geth and Prysm on recent versions — hardforks brick outdated clients.

Native host install

For the non-container setup see ../localhost/README.md.

ethereum 다른 챕터