Use this Dockerfile
to spin off Lightning Network node instances.
- Docker for Desktop
- The
bitcoin-cli
Docker image from: Bitcoin Core for Docker
Refer to the Bitcoin Core for Docker instructions for details on how to build the bitcoin-cli
Docker image.
To build the lightningd
Docker image:
docker build -t lightningd .
Start an instance of bitcoind
on regtest
network:
cd sandbox
docker run --name bitcoind-regtest-1 --network bitcoin-regtest --ip 10.0.0.2 --rm -v $PWD/sample.bitcoin:/.bitcoin bitcoind
On another terminal window:
cd sandbox
docker run --name lightningd-regtest-1 --rm -it --network bitcoin-regtest -v $PWD/sample.lightning:/root/.lightning -v $PWD/sample.bitcoin/regtest/.cookie:/root/.bitcoin/regtest/.cookie lightningd
We can use lightning-cli
on the same container in which we started the daemon:
docker exec -it lightningd-regtest-1 lightning-cli listfunds