Skip to content

Latest commit

 

History

History

bitcoin-node-regtest-mode-docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Bitcoin Node with RegTest mode using Docker

Do you want to know about Bitcoin Node with RegTest mode using Docker? Look at this project 👀!

Project details

⚠ Note that you must add the -regtest argument after each bitcoin-cli command to correctly access your Regtest environment. If you prefer, you can include a regtest=1 command in your ~/.bitcoin/bitcoin.conf file.

At the root folder of the project, just issue the following command:

UID=$UID GID=$GID docker-compose up bitcoin-core-regtest

Now you are able to create a wallet! Let's create two:

docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest createwallet "iago"
docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest createwallet "jafar"

You can create an address for receiving payments for each wallet, including one more for jafar:

docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest -rpcwallet=iago getnewaddress
docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest -rpcwallet=jafar getnewaddress
docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest -rpcwallet=jafar getnewaddress -addresstype p2sh-segwit

Listing all addresses from each wallet:

docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest -rpcwallet=iago listreceivedbyaddress 1 true
docker-compose exec --user bitcoin bitcoin-core-regtest bitcoin-cli -regtest -rpcwallet=jafar listreceivedbyaddress 1 true

If you want to explore directly inside the container, just issue the command:

docker-compose exec --user bitcoin bitcoin-core-regtest sh

Links

Guides

Utils:

Tools:

Credits