Merge branch 'compat' into 'main'
compose v1 compat and docs update See merge request lightning-signer/vls-container!7
This commit is contained in:
commit
f4f2807389
39
README.md
39
README.md
@ -1,10 +1,41 @@
|
|||||||
# VLS Containers
|
# 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
|
## Volume Creation
|
||||||
|
|
||||||
```
|
```
|
||||||
docker volume create bitcoin_data
|
docker volume create bitcoin_data
|
||||||
docker volume create lightning_data
|
docker volume create lightning_data
|
||||||
|
docker volume create txood_data
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker Compose Run
|
## Docker Compose Run
|
||||||
@ -22,6 +53,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:
|
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
|
docker compose -f docker-compose.yml -f <override_file> up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -33,18 +65,17 @@ We have to run these commands after bitcoind is up and running.
|
|||||||
|
|
||||||
Create Wallet:
|
Create Wallet:
|
||||||
```
|
```
|
||||||
docker container exec -it bitcoind bitcoin-cli createwallet default
|
docker container exec bitcoind-regtest bitcoin-cli createwallet default
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate Address for node:
|
Generate Address for node:
|
||||||
```
|
```
|
||||||
docker container exec -it bitcoind bitcoin-cli getnewaddress
|
docker container exec bitcoind-regtest bitcoin-cli getnewaddress
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate Blocks
|
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
|
### References
|
||||||
|
@ -122,10 +122,10 @@ COPY assets/bitcoin.conf /bitcoin.conf
|
|||||||
COPY bitcoind/healthcheck.sh /healthcheck.sh
|
COPY bitcoind/healthcheck.sh /healthcheck.sh
|
||||||
RUN chmod +x /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}"
|
VOLUME ["${BITCOIN_DATA}"]
|
||||||
RUN chown -R bitcoin:bitcoin "${BITCOIN_DATA}"
|
|
||||||
|
|
||||||
USER bitcoin
|
USER bitcoin
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
name: main
|
|
||||||
services:
|
services:
|
||||||
bitcoin-core:
|
bitcoin-core:
|
||||||
container_name: bitcoind-main
|
container_name: bitcoind-main
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
name: regtest
|
|
||||||
services:
|
services:
|
||||||
bitcoin-core:
|
bitcoin-core:
|
||||||
container_name: bitcoind-regtest
|
container_name: bitcoind-regtest
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
name: testnet
|
|
||||||
services:
|
services:
|
||||||
bitcoin-core:
|
bitcoin-core:
|
||||||
ports:
|
ports:
|
||||||
|
@ -46,7 +46,7 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
image: txood
|
image: txood
|
||||||
container_name: txood-test
|
container_name: txood-test
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
command:
|
command:
|
||||||
- -r http://rpcuser:VLSsigner1@bitcoind:18332
|
- -r http://rpcuser:VLSsigner1@bitcoind:18332
|
||||||
networks:
|
networks:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user