1

I just synced a node using geth fastsync and it took several days.

But I just decided I want to use this computer's resources differently and run my ethereum environment from a docker container

I like the prebuilt ones, but even if I compose an environment myself, is there any way to prevent resyncing from scratch? Perhaps a way to copy geth's parsed blocks and states into it?

1 Answer 1

0

You can use Docker volumes to mount a host path to a container. If your synced database is stored in /home/foo/.ethereum for example, you can mount it to the Geth docker container with:

$ docker run -it -p 30303:30303 -v /home/foo/.ethereum:/root/.ethereum ethereum/client-go

Do not change /root/.ethereum, since that's where the folder will be mounted inside the container.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.