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

Add support for custom uid gid #120

Closed ruimarinho closed 1 year ago

ruimarinho commented 3 years ago

By default, images are created with a bitcoin user/group using a static UID/GID (101:101 on Debian and 100:101 on Alpine). You may customize the user and group ids using the build arguments $UID (--build-arg UID=<uid>) and $GID (--build-arg GID=<gid>).

You can also customize the UID/GID on runtime, such as:

❯ docker run -e UID=10000 -e GID=10000 -it --rm ruimarinho/bitcoin-core \
  -printtoconsole \
  -regtest=1

This will recursively change the ownership of the bitcoin home directory and $BITCOIN_DATA to UID/GID 10000:10000.