This project is deprecated for lightning labs lnd containers
Upgrade according
version: '3.8'
services:
web:
image: nginx:1.17.8
container_name: web
volumes:
- ${PWD}/nginx:/etc/nginx
restart: on-failure
ports:
- "80:80"
stop_grace_period: 30s
networks:
net:
ipv4_address: 10.254.1.2
bitcoin:
image: lncm/bitcoind:v0.21.0
container_name: bitcoin
volumes:
- ${PWD}/bitcoin:/root/.bitcoin
- ${PWD}/bitcoin:/data/.bitcoin
- ${PWD}/bitcoin:/data/bitcoin
restart: on-failure
ports:
- "8333:8333"
- "8332:8332"
stop_grace_period: 20m30s
networks:
net:
ipv4_address: 10.254.2.2
lnd:
image: lightninglabs/lnd:v0.13.1-beta@sha256:f26ddbbea3f7bad45d994e6258b8198acaebf65e575eedf2a566d04f0c1fb9d9
user: 1000:1000
container_name: lnd
volumes:
- ${PWD}/lnd:/data/.lnd
- ${PWD}/lnd:/root/.lnd
- ${PWD}/bitcoin:/root/.bitcoin
- ${PWD}/bitcoin:/data/.bitcoin
- ${PWD}/secrets/lnd-password.txt:/data/.lnd/walletpassword
- ${PWD}/secrets/lnd-password.txt:/root/.lnd/walletpassword
restart: on-failure
ports:
- "9735:9735"
- "10009:10009"
environment:
HOME: /data
depends_on: [ bitcoin, web ]
stop_grace_period: 10m30s
networks:
net:
ipv4_address: 10.254.2.3
invoicer:
image: "lncm/invoicer:v0.8.1"
container_name: invoicer
depends_on: [ bitcoin, lnd ]
restart: on-failure
stop_grace_period: 30s
volumes:
- "${PWD}/invoicer:/data"
- "${PWD}/lnd:/lnd"
networks:
net:
ipv4_address: 10.254.2.4
neutrino-switcher:
image: "lncm/neutrino-switcher:1.0.4"
container_name: neutrino-switcher
depends_on: [ lnd, bitcoin ]
restart: always
volumes:
- "${PWD}/lnd:/lnd"
- "${PWD}/secrets:/secrets"
- "${PWD}/statuses:/statuses"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
JSONRPCURL: http://10.254.2.2:8332
LND_CONTAINER_NAME: lnd
SLEEPTIME: 43200
networks:
net:
ipv4_address: 10.254.2.6
tor:
image: "lncm/tor:0.4.6.7@sha256:472c8d1265679e7cfd641edcbc44ec2fa0e500f6929bd8dc1f4811feffcfefaa"
container_name: tor
restart: on-failure
volumes:
- "${PWD}/tor/torrc:/etc/tor/torrc"
- "${PWD}/tor/data:/var/lib/tor/"
- "${PWD}/tor/run:/var/run/tor/"
networks:
net:
ipv4_address: 10.254.1.3
networks:
net:
ipam:
driver: default
config:
- subnet: 10.254.0.0/16
This repo builds lnd in a completely reproducible, and auditable way, and packages it into radically minimal Docker containers provided for various CPU architectures and in various variants.
- All
git-tags(and most commits) are signed byD8CA1776EB9265491D07CE67F546ECBEA809CB18 - All
git-tags(and most commits) areopentimestamps-ed - All builds are fully reproducible. Each
Dockerfilebuildslndtwice: once on Alpine, and once on Debian, and the result binaries are compared against each other before proceeding - Each build produces binaries for:
amd64,arm64v8,arm32v7, andarm32v6 - Some Docker Images are also provided in different variants, ex:
monitoring(enables Prometheus monitoring), orexperimental(enables options disabled by default) - All architectures are aggregated under an easy-to-use Docker Manifest
- All
git-tagsare build automatically, and with an auditable trace - Each successful build of a
git tagpushes result Docker image to Docker Hub - Each successful build of a
git taguploads result Go binaries to Github Releases - Images pushed to Docker Hub are never deleted (even if
lndversion gets overriden, previous one is preserved) - All
finalimages are based on Alpine for minimum base size - All binaries are compressed with
upx - Each
git-tagbuild is tagged with a unique tag number - Each minor version is stored in a separate directory (for the ease of backporting patches)
NOTE: For an always up-to-date list see: https://hub.docker.com/r/lncm/lnd/tags
v0.13.0v0.13.0-monitoringv0.13.0-experimentalv0.13.0-etcdv0.12.0v0.12.0-monitoringv0.12.0-experimentalv0.12.0-etcdv0.11.1v0.11.1-monitoringv0.11.1-experimentalv0.11.1-etcdv0.11.0v0.11.0-monitoringv0.11.0-experimentalv0.11.0-etcdv0.10.4v0.10.4-monitoringv0.10.4-experimentalv0.10.3v0.10.2v0.10.1v0.10.1-root-experimentalv0.10.1-monitoringv0.10.1-experimentalv0.10.0v0.10.0-root-experimentalv0.10.0-monitoringv0.10.0-experimentalv0.9.2v0.9.2-root-experimentalv0.9.2-monitoringv0.9.2-experimentalv0.9.1v0.9.1-root-experimentalv0.9.1-monitoringv0.9.1-experimentalv0.9.0v0.9.0-monitoringv0.9.0-experimentalv0.8.2v0.8.2-monitoringv0.8.2-experimentalv0.8.1v0.8.1-monitoringv0.8.1-experimentalv0.8.0v0.8.0-monitoringv0.8.0-experimentalv0.8.0-bitcoind-0.19v0.7.1v0.7.1-monitoringv0.7.0v0.6.1v0.5.2
First pull the image from Docker Hub:
docker pull lncm/lnd:v0.11.0NOTE: Running above will automatically choose native architecture of your CPU.
Or, to pull a specific CPU architecture:
docker pull lncm/lnd:v0.11.0-arm64v8Then to start lnd, run:
# Create a folder called ~/.lnd
mkdir -p $HOME/.lnd/
# Then copy a config file into ~/.lnd
wget -qO $HOME/.lnd/lnd.conf https://raw.githubusercontent.com/lightningnetwork/lnd/v0.11.1-beta/sample-lnd.conf
# Run docker
docker run -it --rm --detach \
-v ~/.lnd:/data/.lnd \
-p 9735:9735 \
-p 10009:10009 \
--name lnd \
lncm/lnd:v0.11.0That will runs lnd with:
- all data generated by the container is stored in
~/.lndon your host machine, - all data is created as owned by used with
UID1000 - port
9735is reachable on the localhost for the peer-to-peer communication, - port
10009is reachable on the localhost for RPC communication, - created container will get named
lnd, - that command will run the container in the background and print the ID of the container being run.
To issue any commands to a running container, do:
docker exec -it lnd BINARY COMMANDWhere:
BINARYis eitherlndorlncli, andCOMMANDis something you'd normally pass to the binary
Examples:
docker exec -it lnd lnd --help
docker exec -it lnd lnd --version
docker exec -it lnd lncli --help
docker exec -it lnd lncli getinfo
docker exec -it lnd lncli getnetworkinfoAfter git-tag push, the release process is fully automated. That being said there are a few things that need to be done to prepare for the release.
In case of a patch release (v0.0.X), it's enough to edit VERSION variable in appropriate Dockerfile, commit, and run ./scripts/new-release.sh ….
Ex. If lnd gets updated from v0.6.0-beta to v0.6.1-beta, it's usually enough to open 0.6/Dockerfile, update this line with the new tag, commit, and run:
./scripts/new-release.sh v0.13.0
# in case of other patches
./scripts/new-release.sh v0.13.0 experimentalNOTE: The
new-release.shscripts ensures that correct version is set in the relevantDockerfile, as well as that correct build tag is used.
This releases might bring changes that are not backwards compatible. To have separation, it's recommended to create MAJOR.MINOR/ directory at repo's root, copy Dockerfile from the previous version, and follow the steps described in Patch Release.
One additional thing to be done here, is adding a new entry to matrix.ver in test.yml file to make sure that newly added version is being tested.
To trigger build of new-multi arch release, run ./scripts/new-release.sh …. After a few minutes the new version should show up on Docker Hub.