Created
August 13, 2018 21:40
-
-
Save Stadicus/9bbfd78411383fe4675c0fd29c1a5357 to your computer and use it in GitHub Desktop.
Run docker-bitcoin-core
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trueno: dockerized Bitcoin Core | |
# Resources: | |
# https://github.com/Stadicus/docker-bitcoin-core (forked) | |
# https://hub.docker.com/r/truenolightning/bitcoin-core/ | |
# Requirements: | |
# Git: to clone source (only 2 files) | |
# Python3: to create rpcauth | |
# Docker: to run docker image | |
git --version \ | |
&& python3 --version \ | |
&& docker --version | |
# setup test environment (simulate bitcoin.conf & external hdd | |
cd ~ \ | |
&& mkdir bitcoin_hdd \ | |
&& touch bitcoin_hdd/init.file \ | |
&& mkdir .bitcoin \ | |
&& echo "# Trueno bitcoin.conf" > .bitcoin/bitcoin.conf | |
# create RPC auth (replaces rpcuser / rpcpassword) | |
# The non-sensitive 'rpcauth' is stored in bitcoin.conf (old lines with 'rpcauth' are removed first) | |
# The secret password is saved in rpcpassword.txt | |
curl -sSL https://raw.githubusercontent.com/bitcoin/bitcoin/master/share/rpcauth/rpcauth.py | python3 - trueno | tee rpcauth.tmp \ | |
&& mv .bitcoin/bitcoin.conf .bitcoin/bitcoin.old && (sed '/rpcauth/d' .bitcoin/bitcoin.old; cat rpcauth.tmp | grep rpcauth=) > .bitcoin/bitcoin.conf \ | |
&& cat rpcauth.tmp | tail -n 1 > rpcpassword.txt && rm rpcauth.tmp | |
git clone https://github.com/Stadicus/docker-bitcoin-core/ \ | |
&& cd docker-bitcoin-core/0.16 | |
docker run --rm -it \ | |
--name bitcoin-server \ | |
--volume ~/blockchain:/home/bitcoin/.bitcoin \ | |
--volume ~/.bitcoin/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf \ | |
truenolightning/bitcoin-core \ | |
-printtoconsole \ | |
-testnet=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment