CheckoutCrypto Bitcoin or other crypto
2.5K
#CheckoutCrypto Bitcoin Container
Download bitcoin core 32 or 64 bit.
mkdir yourcryptofolder
cd ~/yourcryptofolder
wget https://bitcoin.org/bin/bitcoin-core-0.10.0/bitcoin-0.10.0-linux64.tar.gz
tar -zxvf ./bitcoin*-linux64.tar.gz
run it once
./bitcoin/bin/bitcoind
A cache will be created at /home/your_user/.bitcoin we need to link the binary and cache, to the container.
Note: it's recommended, if you're like me, further link the .bitcoin blockchain/cache to a larger drive, the blockchain is approaching 40G at last check.
You must also edit the rpc config(~/.bitcoin/bitcoin.conf) then place the exported port in your run statement, if you wish to expose it to the host machine.
docker run --name bitcoin -d -it -p 21234:21234 -v /home/your_user/yourcryptofolder/bitcoin/:/bitcoin/ -v /home/your_user/.bitcoin/:/root/.bitcoin/ checkoutcrypto/bitcoin
or substitute our image(checkoutcrypto/bitcoin) for ubuntu:14.04 then apt-get update and commit it.
Start bitcoin daemon within the running container with (must have latest Docker):
docker exec -it bitcoin /bitcoin/bin/bitcoind
Make sure you edit the rpc config and set the rpcallowip= for each container you want to allow to connect to it. Use the following on any container, to find the "IPAddress": "172...*"
docker inspect bitcoin
To test RPC connection to this container from others, use:
curl youruser:yourrpcpass@yourip:yourport --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }'
Content type
Image
Digest
sha256:b8e74fc93…
Size
82.3 MB
Last updated
almost 11 years ago
docker pull checkoutcrypto/bitcoin