mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
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:
parent
e63e37be5e
commit
fccce6bf8a
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
|
@ -149,6 +149,20 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
|
|||
-p 8545:8545 -p 30303:30303 \
|
||||
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
|
||||
above command does. It will also create a persistent volume in your home directory for
|
||||
|
|
|
|||
Loading…
Reference in a new issue