From b070cbdc961d9458bde9a82ce1717dd0d7bfe6d4 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 19 Oct 2023 22:57:17 +0530 Subject: [PATCH 1/5] compose: remove name key for v1 compatibility Signed-off-by: Lakshya Singh --- docker-compose.mainnet.yml | 1 - docker-compose.regtest.yml | 1 - docker-compose.testnet.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/docker-compose.mainnet.yml b/docker-compose.mainnet.yml index e92f37e..d1820c0 100644 --- a/docker-compose.mainnet.yml +++ b/docker-compose.mainnet.yml @@ -1,5 +1,4 @@ version: "3.8" -name: main services: bitcoin-core: container_name: bitcoind-main diff --git a/docker-compose.regtest.yml b/docker-compose.regtest.yml index 5b86cb9..d1d2a34 100644 --- a/docker-compose.regtest.yml +++ b/docker-compose.regtest.yml @@ -1,5 +1,4 @@ version: "3.8" -name: regtest services: bitcoin-core: container_name: bitcoind-regtest diff --git a/docker-compose.testnet.yml b/docker-compose.testnet.yml index 250495a..6e9bf94 100644 --- a/docker-compose.testnet.yml +++ b/docker-compose.testnet.yml @@ -1,5 +1,4 @@ version: "3.8" -name: testnet services: bitcoin-core: ports: From 779fd9fb3ea97875394c6129bf346afd34453940 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 19 Oct 2023 23:15:26 +0530 Subject: [PATCH 2/5] docs: regtest commands and compose name - regtest container name change - instead of name key in compose use env variable - txood_data volume creation Signed-off-by: Lakshya Singh --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 006529b..8b5cee8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ``` docker volume create bitcoin_data docker volume create lightning_data +docker volume create txood_data ``` ## Docker Compose Run @@ -22,6 +23,7 @@ We have three possible overrides over the default `testnet` configuration in `do To use override we have to pass it down both the config using `-f` flag: ``` +export COMPOSE_PROJECT_NAME= docker compose -f docker-compose.yml -f up --build ``` @@ -33,18 +35,17 @@ We have to run these commands after bitcoind is up and running. Create Wallet: ``` -docker container exec -it bitcoind bitcoin-cli createwallet default +docker container exec bitcoind-regtest bitcoin-cli createwallet default ``` Generate Address for node: ``` -docker container exec -it bitcoind bitcoin-cli getnewaddress +docker container exec bitcoind-regtest bitcoin-cli getnewaddress ``` Generate Blocks ``` -docker container exec -it bitcoind bitcoin-cli generatetoaddress 50 $NODE_ADDRESS - +docker container exec bitcoind-regtest bitcoin-cli generatetoaddress 50 $NODE_ADDRESS ``` ### References From 03133256c85e8ed2e4ed445baf4f0ef94a60e627 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Fri, 20 Oct 2023 18:15:04 +0530 Subject: [PATCH 3/5] docs: docker installation - both docker and distro package steps Signed-off-by: Lakshya Singh --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 8b5cee8..da7d8f9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,35 @@ # 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](https://docs.docker.com/engine/install/) + +- [Ubuntu](https://docs.docker.com/engine/install/ubuntu/) +- [Fedora](https://docs.docker.com/engine/install/fedora/) + +### 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 version `1` which has been deprecated by `docker` with release of version `2`. +- `docker-compose` version `2` 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 to `docker-compose` instead. + ## Volume Creation ``` From f287ce61c56fddd58169f591379b9363d6523437 Mon Sep 17 00:00:00 2001 From: Devrandom Date: Fri, 20 Oct 2023 15:58:39 +0200 Subject: [PATCH 4/5] move bitcoind VOLUME directive to the right place --- bitcoind/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitcoind/Dockerfile b/bitcoind/Dockerfile index 4c4418d..6e3a786 100644 --- a/bitcoind/Dockerfile +++ b/bitcoind/Dockerfile @@ -122,10 +122,10 @@ COPY assets/bitcoin.conf /bitcoin.conf COPY bitcoind/healthcheck.sh /healthcheck.sh RUN chmod +x /healthcheck.sh -VOLUME ["${BITCOIN_DATA}"] +RUN mkdir "${BITCOIN_DATA}" +RUN chown bitcoin:bitcoin "${BITCOIN_DATA}" -RUN mkdir -p "${BITCOIN_DATA}" -RUN chown -R bitcoin:bitcoin "${BITCOIN_DATA}" +VOLUME ["${BITCOIN_DATA}"] USER bitcoin From 95d720508a3621d66c79bd7ae9936e3a7ab65a4e Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Tue, 24 Oct 2023 13:44:58 +0530 Subject: [PATCH 5/5] compose: restart unless stopped txoo - rpc failure due to bitcoind limits Signed-off-by: Lakshya Singh --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2826a0e..daf88e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,7 +46,7 @@ services: context: . image: txood container_name: txood-test - restart: always + restart: unless-stopped command: - -r http://rpcuser:VLSsigner1@bitcoind:18332 networks: