# VLS Containers ## Volume Creation ``` docker volume create bitcoin_data docker volume create lightning_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` - `docker-compose.mainnet.yml` To use override we have to pass it down both the config using `-f` flag: ``` docker compose -f docker-compose.yml -f 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 -it bitcoind bitcoin-cli createwallet default ``` Generate Address for node: ``` docker container exec -it bitcoind bitcoin-cli getnewaddress ``` Generate Blocks ``` docker container exec -it bitcoind bitcoin-cli generatetoaddress 50 $NODE_ADDRESS ``` ### References - [bitcoind](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/23/alpine/Dockerfile) by @ruimarinho - [lightningd with clboss](https://github.com/tsjk/docker-core-lightning/blob/main/Dockerfile) by @tsjk - [elements lightning](https://github.com/ElementsProject/lightning/blob/master/contrib/docker/Dockerfile.alpine) by @ElementsProject - [docker compose](https://github.com/LukasBahrenberg/lightning-dockercompose/blob/master/docker-compose.yaml) by @LukasBahrenberg