3.6 KiB
3.6 KiB
VLS Containers
Installing Docker
Docker Documentation
Docker Engine is available on a variety of Linux distros, macOS, and Windows 10 through Docker Desktop, and as a static binary installation. Refer to the official docker documentation
Distro Packages
Debian/Ubuntu:
sudo apt install docker.io docker-doc docker-compose containerd runc
sudo systemctl enable --now docker
Fedora/RHEL:
sudo dnf install docker docker-compose containerd runc
sudo systemctl enable --now docker
Docker Compose Compatibility
- Currently available
docker-compose
package in different linux distributions (debian, ubuntu, fedora, etc) are not up to date, they are still at version1
which has been deprecated bydocker
with release of version2
. docker-compose
version2
is available through official docker repositories not the distribution ones.- Docker Images in this repository work with version 2 and are also backward compatible with version 1.
- If you are using the distribution installation the
docker compose
command used below has to be changed todocker-compose
instead.
VLSD Image
cd vlsd
docker build -t vlsd .
Volume Creation
docker volume create bitcoin_data
docker volume create lightning_data
docker volume create txoo_data
docker volume create vls_data
Docker Compose Run
docker compose up --build
Using Bitcoin Chains
We have three possible overrides over the default testnet
configuration in docker-compose.yml
:
docker-compose.testnet.yml
docker-compose.regtest.yml
To use override we have to pass it down both the config using -f
flag:
export COMPOSE_PROJECT_NAME=<bitcoin_chain>
docker compose -f docker-compose.yml -f <override_file> up --build
Note: Even while using testnet
running using the override is recommended as that will expose the P2P
port for bitcoind
and P2P
port for lightningd
on the host.
Additional Regtest Commands
We have to run these commands after bitcoind is up and running.
Create Wallet:
docker container exec bitcoind-regtest bitcoin-cli createwallet default
Generate Address for node:
docker container exec bitcoind-regtest bitcoin-cli getnewaddress
Generate Blocks
docker container exec bitcoind-regtest bitcoin-cli generatetoaddress 50 $NODE_ADDRESS
Testnet CLN + CLBOSS Commands
# Create a connection to a random node (maybe from 1ML.com)
docker container exec lightningd-test lightning-cli --testnet connect \
02ae1e6091d2a9c4db5096558668d2456b1c0e9067cb72273eab1199bcfb208888 67.227.190.47:9735
# Allocate an onchain address to fund the node
docker container exec lightningd-test lightning-cli --testnet newaddr
# List onchain and channel funds
docker container exec lightningd-test lightning-cli --testnet listfunds
# Show CLBOSS status
docker container exec lightningd-test lightning-cli --testnet clboss-status | less
# Show node summary status
docker container exec lightningd-test lightning-cli --testnet summary
References
- bitcoind by @ruimarinho
- lightningd with clboss by @tsjk
- elements lightning by @ElementsProject
- docker compose by @LukasBahrenberg