From ef4f108fbf67a7a3b202274727f2a36950f2f81a Mon Sep 17 00:00:00 2001 From: JigneshVasoya3292 Date: Wed, 20 Aug 2025 18:56:23 +0530 Subject: [PATCH] added volume mapping to cli command --- docs/getting-started/installing-geth.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/getting-started/installing-geth.md b/docs/getting-started/installing-geth.md index 4f2d67201b..e4a1c471c1 100644 --- a/docs/getting-started/installing-geth.md +++ b/docs/getting-started/installing-geth.md @@ -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/.geth:/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