ruimarinho / docker-bitcoin-core

A bitcoin-core docker image
https://hub.docker.com/r/ruimarinho/bitcoin-core/
MIT License
367 stars 213 forks source link

Best way to upgrade image and not resync chain #122

Closed Bit-Shifts closed 2 years ago

Bit-Shifts commented 2 years ago

Is it possible to use docker compose to update image and not have to create a new volume and sync all over again?

ruimarinho commented 2 years ago

Sure, you would just update the image hash and ensure the blockchain data is mounted on a volume (either through a bind-mount or a docker volume).

Bit-Shifts commented 2 years ago

Ok. it appears to just be mounting to a dynamic volume now.

would 'docker-compose -f docker-compose.testnet.yml up -d' simply recreate the container with the new image and keep the existing volume?

ruimarinho commented 2 years ago

Yes, as long as the bind-mount or the docker volumes are declared on the docker-compose.yaml file, thus not being ephemeral.