Dockerfile linkslatest (Dockerfile)For running bitcoind or bitcoin-cli in a docker container.
In order to switch from user and password based authentication (using -rpcuser and -rpcpassword) to -rpcauth it is worth mentioning, that the docker image needs to be configured in a certain way (using environment variables):
RPC_AUTH is set and is not "".
-rpcauth=$RPC_AUTH is used.RPC_USER and RPC_PASSWORD are ignored, even if set.RPC_AUTH is not set or is "" and RPC_USER and RPC_PASSWORD are set and are not "".
-rpcuser=$RPC_USER and -rpcpassword=$rPC_PASSWORD will be used.A few more words about -rpcauth:
-rpcauth (RPC_AUTH):
rpcauth.py to create credentials. share/rpcauth/rpcauth.py
# Also have a look at the README file
share/rpcauth/README.md
<username>:<salt>$<password_hmac>RPC_AUTH is to be configured with.<password> which is to be used to configure the clients connecting to the bitcoind RPC.
<password> is used to create <password_hmac>.Not specifying a host port in -p <host_port>:<container_port> docker will automatically assign a free port on the host.
docker run --rm -d -p 8332 -v <path/to/and/including/wallets>:/bitcoin melotools/bitcoin -datadir=/bitcoin
However, this only works for the common Bitcoin network ports:
833283331833218333Content type
Image
Digest
Size
110.5 MB
Last updated
over 4 years ago
docker pull melotools/bitcoin