{"id":19370280,"url":"https://github.com/bitcoindevkit/bitcoin-regtest-box","last_synced_at":"2025-07-13T22:08:55.499Z","repository":{"id":45950942,"uuid":"234950742","full_name":"bitcoindevkit/bitcoin-regtest-box","owner":"bitcoindevkit","description":"Simple bitcoin regtest docker images for integration testing with github actions","archived":false,"fork":false,"pushed_at":"2021-11-25T06:07:36.000Z","size":41,"stargazers_count":12,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T15:47:19.136Z","etag":null,"topics":["docker","electrs","regtest"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitcoindevkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-19T19:08:36.000Z","updated_at":"2025-04-02T13:52:28.000Z","dependencies_parsed_at":"2022-09-03T04:42:29.583Z","dependency_job_id":null,"html_url":"https://github.com/bitcoindevkit/bitcoin-regtest-box","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bitcoindevkit/bitcoin-regtest-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoindevkit%2Fbitcoin-regtest-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoindevkit%2Fbitcoin-regtest-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoindevkit%2Fbitcoin-regtest-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoindevkit%2Fbitcoin-regtest-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoindevkit","download_url":"https://codeload.github.com/bitcoindevkit/bitcoin-regtest-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoindevkit%2Fbitcoin-regtest-box/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265212970,"owners_count":23728634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","electrs","regtest"],"created_at":"2024-11-10T08:14:49.395Z","updated_at":"2025-07-13T22:08:53.636Z","avatar_url":"https://github.com/bitcoindevkit.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THIS PROJECT IS NO LONGER ACTIVELY MAINTAINED\n\n### Purpose\n\nOriginally the [`bdk`] project used the images created by this repo for github actions integration \ntesting for its `electrum` and `esplora` blockchain client modules. But the new solution for [`bdk`] \nblockchain testing is to use the [`bitcoind`] and [`electrsd`] rust crates which are easier to \nmaintain, allow parallel testing, and don't require docker. For local [`bdk`] and [`bdk-cli`] testing \n_without_ using this repo see below instructions.\n\n### Local BDK Testing\n\nTo run the blockchain integration tests for [`bdk`] the required daemons are now automatically\ninstalled, started, and stopped by `cargo test`, all you need to do is specify the correct features.\n\n**NOTE**: On a MacOS system you will get pop-up warnings that you must click \"OK\" for.\n    \nFor example, from your clone of [`bdk`]: \n```shell\ncargo test --no-default-features --features test-electrum electrum::bdk_blockchain_tests\ncargo test --no-default-features --features test-rpc rpc::bdk_blockchain_tests\ncargo test --no-default-features --features test-esplora,use-esplora-reqwest esplora::bdk_blockchain_tests\ncargo test --no-default-features --features test-esplora,use-esplora-ureq esplora::bdk_blockchain_tests\n```\n\n### Local BDK-CLI Testing\n\nTo manually test [`bdk-cli`] in regtest mode with locally installed `bitcoind` and `electrs` daemons \nyou will need to install them yourself.\n\n1. Manually download and install the [bitcoincore.org `bitcoind`] daemon and `bitcoin-cli` binaries\n2. Build from source and install the [romanz `electrs`] daemon\n3. Install [`bdk-cli`] from your clone with `cargo install --features electrum --path .` or from \n   crates.io `cargo install --features electrum bdk-cli`\n\nWith all above binaries in your local local `$PATH` you can run them in `regtest` mode and use them \nfor manual `bdk-cli` testing like this:\n\n```shell\nmkdir -p /tmp/regtest1/bitcoind /tmp/regtest1/electrs\nbitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon\nelectrs --daemon-dir /tmp/regtest1/bitcoind --db-dir /tmp/regtest1/electrs --network regtest\n```\n\nIn a new shell: \n```shell\n# 1. create bitcoind test wallet and generate regtest test coins\nbitcoin-cli -regtest -datadir=/tmp/regtest1/bitcoind createwallet bdk-test\nGEN_ADDRESS=$(bitcoin-cli -regtest -datadir=/tmp/regtest1/bitcoind getnewaddress)\nbitcoin-cli -regtest -datadir=/tmp/regtest1/bitcoind generatetoaddress 101 $GEN_ADDRESS\n\n# 2. sync wallet via the electrum APIs\nDESCRIPTOR=\"wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)\"\nbdk-cli -n regtest wallet --server tcp://127.0.0.1:60401 --descriptor $DESCRIPTOR sync     \n \n# 3. receive a deposit\nDEPOSIT_ADDRESS=$(bdk-cli -n regtest wallet --server tcp://127.0.0.1:60401 --descriptor $DESCRIPTOR get_new_address | jq '.address' | tr -d '\"')\nbitcoin-cli -regtest -datadir=/tmp/regtest1/bitcoind sendtoaddress $DEPOSIT_ADDRESS 10\nbitcoin-cli -regtest -datadir=/tmp/regtest1/bitcoind generatetoaddress 1 $GEN_ADDRESS\nbdk-cli -n regtest wallet --server tcp://127.0.0.1:60401 --descriptor $DESCRIPTOR sync \nbdk-cli -n regtest wallet --server tcp://127.0.0.1:60401 --descriptor $DESCRIPTOR get_balance\n \n# 4. kill the electrs and bitcoind containers when you're done\npkill electrs bitcoind\n\n# 5. remove the /tmp data\nrm -rf /tmp/regtest1\nrm -rf ~/.bdk-bitcoin\n```\n\n[`bdk`]: https://github.com/bitcoindevkit/bdk\n[`bdk-cli`]: https://github.com/bitcoindevkit/bdk-cli\n[`bitcoind`]: https://github.com/rcasatta/bitcoind\n[`electrsd`]: https://github.com/rcasatta/electrsd\n[bitcoincore.org `bitcoind`]: https://bitcoincore.org/en/download/\n[romanz `electrs`]: https://github.com/romanz/electrs\n\n## OLD DOCS BELOW\n\n### Github actions\n\nBelow are examples of how to use the images created by this project in github actions jobs:\n\n#### electrum test job \n    \n   ```\n    test-electrum:\n        name: Test Electrum\n        runs-on: ubuntu-16.04\n        container: bitcoindevkit/electrs:\u003cversion\u003e\n        env:\n          BDK_RPC_AUTH: COOKIEFILE\n          BDK_RPC_COOKIEFILE: /root/.bitcoin/regtest/.cookie\n          BDK_RPC_URL: 127.0.0.1:18443\n          BDK_RPC_WALLET: bdk-test\n          BDK_ELECTRUM_URL: tcp://127.0.0.1:60401\n        ...\n   ```\n   \n#### esplora test job\n    \n   ```\n    test-esplora:\n        name: Test Esplora\n        runs-on: ubuntu-16.04\n        container: bitcoindevkit/esplora:\u003cversion\u003e\n        env:\n          BDK_RPC_AUTH: COOKIEFILE\n          BDK_RPC_COOKIEFILE: /root/.bitcoin/regtest/.cookie\n          BDK_RPC_URL: 127.0.0.1:18443\n          BDK_RPC_WALLET: bdk-test\n          BDK_ELECTRUM_URL: tcp://127.0.0.1:60401\n          BDK_ESPLORA_URL: http://127.0.0.1:3002\n        ...\n   ```\n    \n### Local `bdk` testing\n\nBelow is an example of how to run `bdk` electrum blockchain tests locally using the electrs docker image:\n\n   ```shell\n    # start the electrs docker container\n    docker run -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp --detach --rm --name electrs bitcoindevkit/electrs\n   \n    # confirm electrs is running\n    docker logs electrs\n   \n    # get a copy of the bitcoind .cookie file\n    # this needs to be done each time you run the container because the cookie file will change\n    docker cp electrs:/root/.bitcoin/regtest/.cookie /tmp/regtest.cookie\n   \n    # in new shell from the `bdk` project repo directory run blockchains integration tests\n    export BDK_RPC_AUTH=COOKIEFILE\n    export BDK_RPC_COOKIEFILE=/tmp/regtest.cookie\n    export BDK_RPC_URL=127.0.0.1:18443\n    export BDK_RPC_WALLET=bdk-test\n    export BDK_ELECTRUM_URL=tcp://127.0.0.1:60401\n    \n    cargo test --features electrum,test-blockchains --no-default-features electrum::bdk_blockchain_tests\n    \n    # kill the electrs container when you're done\n    docker kill electrs\n   ```\n   \nBelow is an example of how to run `bdk` esplora blockchain tests locally using the esplora docker image:\n\n  ```shell\n   # start the esplora docker container\n   docker run -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp -p 127.0.0.1:3002:3002/tcp --detach --rm --name esplora bitcoindevkit/esplora\n  \n   # confirm esplora is running\n   docker logs esplora\n       \n   # get a copy of the bitcoind .cookie file\n   # this needs to be done each time you run the container because the cookie file will change\n   docker cp esplora:/root/.bitcoin/regtest/.cookie /tmp/regtest.cookie\n  \n   # in new shell from the `bdk` project repo directory run blockchains integration tests\n   export BDK_RPC_AUTH=COOKIEFILE\n   export BDK_RPC_COOKIEFILE=/tmp/regtest.cookie\n   export BDK_RPC_URL=127.0.0.1:18443\n   export BDK_RPC_WALLET=bdk-test\n   export BDK_ELECTRUM_URL=tcp://127.0.0.1:60401\n   export BDK_ESPLORA_URL=http://127.0.0.1:3002\n   \n   cargo test --features esplora,test-blockchains --no-default-features esplora::bdk_blockchain_tests\n   \n   # kill the esplora container when you're done\n   docker kill esplora\n  ```\n   \n### Local `bdk-cli` testing\n\nBelow is an example of how to test `bdk-cli` with electrum or esplora server APIs locally using the \nesplora docker image:\n\n   ```shell\n    # start esplora docker container\n    docker run -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp -p 127.0.0.1:3002:3002/tcp --detach --rm --name esplora bitcoindevkit/esplora\n    \n    # in a new shell sync wallet via the electrum APIs\n    bdk-cli -n regtest wallet --server tcp://127.0.0.1:60401 --descriptor \"wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)\" sync     \n    \n    # or sync wallet via the esplora APIs\n    bdk-cli -n regtest wallet --esplora http://127.0.0.1:3002 --descriptor \"wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)\" sync\n    \n    # kill the esplora container when you're done\n    docker kill esplora   \n   ```\n  \n### Create aliases with the electrs container for local regtest electrum testing\n\n   ```shell\n   alias elstart='docker run --detach --rm -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp --name electrs bitcoindevkit/electrs'\n   alias elstop='docker kill electrs'\n   alias ellogs='docker container logs electrs'\n   alias elcli='docker exec -it electrs /root/bitcoin-cli -regtest -datadir=/root/.bitcoin $@'\n   ```\n   \n### Use aliases with the esplora container for local regtest electrum and esplora testing\n\n   ```shell\n   alias esstart='docker run --detach --rm -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp -p 127.0.0.1:3002:3002/tcp --name esplora bitcoindevkit/esplora'\n   alias esstop='docker kill esplora'\n   alias eslogs='docker container logs esplora'\n   alias escli='docker exec -it esplora /root/bitcoin-cli -regtest -datadir=/root/.bitcoin $@'\n   ```\n  \n### Use aliases to start an electrum container, view logs, run bitcoind cli commands, and stop the container\n\n   ```shell\n   elstart  \n   ellogs  \n   elcli help    \n   elcli getwalletinfo    \n   elcli getnewaddress  \n   elstop  \n   ```\n\n### Build local regtest bitcoind, electrs and esplora docker images and push to docker hub\n\nThese steps are only needed if you are a maintainer creating new versions of the published docker \nimages for this project.\n\n1. Login to docker hub\n\n   `docker login`\n\n1. Build and push new version of images, where \u003cversion\u003e is new git tag for this repo\n\n   ```shell\n   docker build -t bitcoindevkit/bitcoind:\u003cversion\u003e bitcoind  \n   docker build -t bitcoindevkit/electrs:\u003cversion\u003e electrs\n   docker build -t bitcoindevkit/esplora:\u003cversion\u003e esplora\n\n   docker push bitcoindevkit/bitcoind:\u003cversion\u003e\n   docker push bitcoindevkit/electrs:\u003cversion\u003e\n   docker push bitcoindevkit/esplora:\u003cversion\u003e\n   ```\n   \n1. Build and push `latest` image versions as needed\n\n   ```shell\n   docker build -t bitcoindevkit/bitcoind:latest bitcoind  \n   docker build -t bitcoindevkit/electrs:latest electrs\n   docker build -t bitcoindevkit/esplora:latest esplora\n   \n   docker push bitcoindevkit/bitcoind:latest\n   docker push bitcoindevkit/electrs:latest\n   docker push bitcoindevkit/esplora:latest\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoindevkit%2Fbitcoin-regtest-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoindevkit%2Fbitcoin-regtest-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoindevkit%2Fbitcoin-regtest-box/lists"}