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.
This commit is contained in:
Oliver Gugger 2020-11-21 10:49:44 +01:00
parent fc73f269e4
commit 94183e0f52
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
4 changed files with 20 additions and 4 deletions

@ -24,7 +24,7 @@ services:
container_name: lnd_ltc
build:
context: ../
dockerfile: docker/lnd/Dockerfile
dockerfile: dev.Dockerfile
environment:
- RPCUSER
- RPCPASS

@ -24,7 +24,7 @@ services:
container_name: lnd
build:
context: ../
dockerfile: docker/lnd/Dockerfile
dockerfile: dev.Dockerfile
environment:
- RPCUSER
- RPCPASS

@ -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