website: added volume mapping to cli command (#32469)

- The documentation had a description to map `/root/.ethereum` to
persist downloaded data across lifecycles.
- Added volume mapping to docker command as an improvement.

---------

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
This commit is contained in:
Jignesh 2025-08-21 02:03:25 +05:30 committed by GitHub
parent f5a1af7954
commit ee42b9d4bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -205,6 +205,10 @@ The image has the following ports automatically exposed:
**Note:** if you are running an Ethereum client inside a Docker container, you should mount a data volume as the client's data directory (located at `/root/.ethereum` inside the container) to ensure that downloaded data is preserved between restarts and/or container life-cycles.
```sh
docker run -v $HOME/.ethereum:/root/.ethereum -it -p 30303:30303 ethereum/client-go
```
Updating Geth to the latest version simply requires stopping the container, pulling the latest version from Docker and running it:
```sh