docs: add note on Docker data volume for geth

Extends the Docker quick start section with a note about mapping a persistent data volume on a fast SSD, to avoid unnecessary resyncs.
This commit is contained in:
LottR079 2025-12-07 20:31:53 +01:00 committed by GitHub
parent e63e37be5e
commit fccce6bf8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,6 +149,20 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
-p 8545:8545 -p 30303:30303 \ -p 8545:8545 -p 30303:30303 \
ethereum/client-go ethereum/client-go
``` ```
When running via Docker, it is a good idea to:
* Mount the data directory from a fast SSD.
* Keep the volume path stable across container recreations, so the node does not need to resync from scratch.
For example, on Linux:
```bash
mkdir -p /data/geth
docker run -d --name ethereum-node \
-v /data/geth:/root/.ethereum \
-p 8545:8545 -p 30303:30303 \
ethereum/client-go
```
This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the
above command does. It will also create a persistent volume in your home directory for above command does. It will also create a persistent volume in your home directory for