From 94183e0f52bc853ba977992839718d0298d1a75c Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Sat, 21 Nov 2020 10:49:44 +0100 Subject: [PATCH] docker+docs: move dev Dockerfile to root, document dev build To finally end the discussion what Dockerfile should be used for what and whether we should build from local source or check out from git, we place both Dockerfiles next to each other and explicitly document their purpose. --- docker/lnd/Dockerfile => dev.Dockerfile | 0 docker/docker-compose.ltc.yml | 2 +- docker/docker-compose.yml | 2 +- docs/DOCKER.md | 20 ++++++++++++++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) rename docker/lnd/Dockerfile => dev.Dockerfile (100%) diff --git a/docker/lnd/Dockerfile b/dev.Dockerfile similarity index 100% rename from docker/lnd/Dockerfile rename to dev.Dockerfile diff --git a/docker/docker-compose.ltc.yml b/docker/docker-compose.ltc.yml index c3bbd3dc..5bf9c323 100644 --- a/docker/docker-compose.ltc.yml +++ b/docker/docker-compose.ltc.yml @@ -24,7 +24,7 @@ services: container_name: lnd_ltc build: context: ../ - dockerfile: docker/lnd/Dockerfile + dockerfile: dev.Dockerfile environment: - RPCUSER - RPCPASS diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f13a400f..61cd58a5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -24,7 +24,7 @@ services: container_name: lnd build: context: ../ - dockerfile: docker/lnd/Dockerfile + dockerfile: dev.Dockerfile environment: - RPCUSER - RPCPASS diff --git a/docs/DOCKER.md b/docs/DOCKER.md index a793b914..700f5677 100644 --- a/docs/DOCKER.md +++ b/docs/DOCKER.md @@ -1,9 +1,25 @@ # Docker Instructions +There are two flavors of Dockerfiles available: + - `Dockerfile`: Used for production builds. Checks out the source code from + GitHub during build. The build argument `--build-arg checkout=v0.x.x-beta` + can be used to specify what git tag or commit to check out before building. + - `dev.Dockerfile` Used for development or testing builds. Uses the local code + when building and allows local changes to be tested more easily. + ## Development/testing -For development or testing, or to spin up a `btcd` backend alongside `lnd`, -check out the documentation at [docker/README.md](../docker/README.md). +To build a standalone development image from the local source directory, use the +following command: + +``` +$ docker build --tag=myrepository/lnd-dev -f dev.Dockerfile . +``` + +There is also a `docker-compose` setup available for development or testing that +spins up a `btcd` backend alongside `lnd`. Check out the documentation at +[docker/README.md](../docker/README.md) to learn more about how to use that +setup to create a small local Lightning Network. ## Production