diff --git a/code/docker/bitcoind-regtest/Dockerfile b/code/docker/bitcoind-regtest/Dockerfile index 4956a47..2e75622 100644 --- a/code/docker/bitcoind-regtest/Dockerfile +++ b/code/docker/bitcoind-regtest/Dockerfile @@ -2,9 +2,15 @@ FROM bitcoind_base:latest ADD bitcoind /bitcoind WORKDIR /bitcoind +RUN ln -sf /dev/stdout /bitcoind/debug.log EXPOSE 12001 -RUN ln -sf /dev/stdout /bitcoind/debug.log -CMD ["bitcoind", "-datadir=/bitcoind"] +CMD bitcoind -datadir=/bitcoind -daemon \ + && sleep 2 \ + && address=$(bitcoin-cli -datadir=/bitcoind getnewaddress) \ + && bitcoin-cli -datadir=/bitcoind generatetoaddress 101 $address \ + && while sleep 10 \ + ; do bitcoin-cli -datadir=/bitcoind generatetoaddress 1 $address \ + ; done diff --git a/code/docker/docker-compose/docker-compose.yml b/code/docker/docker-compose/docker-compose.yml index 73245e5..8ca032b 100644 --- a/code/docker/docker-compose/docker-compose.yml +++ b/code/docker/docker-compose/docker-compose.yml @@ -1,26 +1,16 @@ version: "3.3" services: - bitcoind-base: - container_name: bitcoind-base + bitcoind-regtest: + container_name: bitcoind-regtest build: - context: ../bitcoind-base/. + context: ../bitcoind-regtest/. dockerfile: ./Dockerfile - image: lnbook/bitcoind_base:latest - c-lightning-base: - container_name: c-lightning-base + image: lnbook/bitcoind_regtest:latest + ports: + - "12001:12001" + lnd-run: + container_name: lnd-run build: - context: ../c-lightning-base + context: ../lnd-run dockerfile: ./Dockerfile - image: lnbook/c-lightning_base:latest - lnd-base: - container_name: lnd-base - build: - context: ../lnd-base - dockerfile: ./Dockerfile - image: lnbook/lnd_base:latest - eclair-base: - container_name: eclair-base - build: - context: ../eclair-base - dockerfile: ./Dockerfile - image: lnbook/eclair_base:latest + image: lnbook/lnd_run:latest diff --git a/code/docker/lnd-run/Dockerfile b/code/docker/lnd-run/Dockerfile new file mode 100644 index 0000000..3b46f57 --- /dev/null +++ b/code/docker/lnd-run/Dockerfile @@ -0,0 +1,5 @@ +FROM lnbook/lnd_base + +ADD lnd /lnd + +CMD lnd --lnddir=/lnd diff --git a/code/docker/lnd-run/lnd/lnd.conf b/code/docker/lnd-run/lnd/lnd.conf new file mode 100644 index 0000000..e5067e7 --- /dev/null +++ b/code/docker/lnd-run/lnd/lnd.conf @@ -0,0 +1,16 @@ +[Application Options] +no-macaroons=1 +rpclisten=0.0.0.0:18001 +restlisten=0.0.0.0:18080 +listen=0.0.0.0:19735 +nobootstrap=1 +debug=1 + +[bitcoin] +bitcoin.active=1 +bitcoin.regtest=1 + +[bitcoind] +bitcoind.rpchost=localhost +bitcoind.rpcuser=regtest +bitcoind.rpcpass=regtest