docker: specify a tag, branch or commit using docker build-arg

This commit is contained in:
yancy ribbens authored and yancy committed 2019-11-19 02:17:52 -06:00
1 parent b222b6e625
commit 31736804f1
2 files changed
+33

No files matched your search

+27
View File
@@ -65,3 +65,30 @@ $ docker logs lnd-testnet
This is a simple example, it is possible to use any command-line options necessary
to expose RPC ports, use `btcd` or `bitcoind`, or add additional chains.
## LND Development and Testing
To test the Docker production image locally, run the following from
the project root:
```
$ docker build . -t lnd:master
```
To choose a specific branch or tag instead, use the "checkout" build-arg. For example, to build the latest commits in master:
```
$ docker build . --build-arg checkout=v0.8.0-beta -t lnd:v0.8.0-beta
```
To build the image using the most current tag:
```
$ docker build . --build-arg checkout=$(git describe --tags `git rev-list --tags --max-count=1`) -t lnd:latest-tag
```
Once the image has been built and tagged locally, start the container:
```
docker run --name=lnd-testnet -it lnd:1.0 --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
```