From 1f1ef6152ae943de0c804db6c1a129f0e5321a9a Mon Sep 17 00:00:00 2001 From: zontreck Date: Mon, 10 Feb 2025 02:46:31 -0700 Subject: [PATCH] Add other network modes for testing --- bitcoin/core/Dockerfile | 3 +++ bitcoin/core/entrypoint.sh | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/bitcoin/core/Dockerfile b/bitcoin/core/Dockerfile index 0bb465c..f541abb 100644 --- a/bitcoin/core/Dockerfile +++ b/bitcoin/core/Dockerfile @@ -27,6 +27,9 @@ ENV USER nan ENV PASS nan ENV ENABLE_RPC 0 ENV ENABLE_AUTH 1 +ENV REGTEST 0 +ENV TESTNET3 0 +ENV TESTNET4 0 EXPOSE 8333 EXPOSE 8332 diff --git a/bitcoin/core/entrypoint.sh b/bitcoin/core/entrypoint.sh index ef6180a..0eacdc7 100644 --- a/bitcoin/core/entrypoint.sh +++ b/bitcoin/core/entrypoint.sh @@ -5,6 +5,21 @@ echo "txindex=$TXINDEX" >> /btc.conf echo "coinstatsindex=$TXINDEX" >> /btc.conf echo "datadir=/data" >> /btc.conf +if [ $REGTEST == 1 ] +then + echo "regtest=1" >> /btc.conf +fi + +if [ $TESTNET3 == 1 ] +then + echo "testnet=1" >> /btc.conf +fi + +if [ $TESTNET4 == 1 ] +then + echo "testnet4=1" >> /btc.conf +fi + if [ $ENABLE_RPC == 1 ] then echo "server=1" >> /btc.conf