mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-04 18:03:14 +02:00
docker: add git_url build-arg
This commit is contained in:
@@ -14,13 +14,14 @@ ENV GODEBUG netdns=cgo
|
|||||||
# image to be built from a specified Git state. The default image
|
# image to be built from a specified Git state. The default image
|
||||||
# will use the Git tip of master by default.
|
# will use the Git tip of master by default.
|
||||||
ARG checkout="master"
|
ARG checkout="master"
|
||||||
|
ARG git_url="https://github.com/lightningnetwork/lnd"
|
||||||
|
|
||||||
# Install dependencies and build the binaries.
|
# Install dependencies and build the binaries.
|
||||||
RUN apk add --no-cache --update alpine-sdk \
|
RUN apk add --no-cache --update alpine-sdk \
|
||||||
git \
|
git \
|
||||||
make \
|
make \
|
||||||
gcc \
|
gcc \
|
||||||
&& git clone https://github.com/lightningnetwork/lnd /go/src/github.com/lightningnetwork/lnd \
|
&& git clone $git_url /go/src/github.com/lightningnetwork/lnd \
|
||||||
&& cd /go/src/github.com/lightningnetwork/lnd \
|
&& cd /go/src/github.com/lightningnetwork/lnd \
|
||||||
&& git checkout $checkout \
|
&& git checkout $checkout \
|
||||||
&& make release-install
|
&& make release-install
|
||||||
|
@@ -115,7 +115,7 @@ To test the Docker production image locally, run the following from the project
|
|||||||
⛰ docker build . -t myrepository/lnd:master
|
⛰ docker build . -t myrepository/lnd:master
|
||||||
```
|
```
|
||||||
|
|
||||||
To choose a specific [branch](https://github.com/lightningnetwork/lnd/branches) or [tag](https://hub.docker.com/r/lightninglabs/lnd/tags?page=1&ordering=last_updated) instead, use the "checkout" build-arg. For example, to build the latest tagged commit:
|
To choose a specific [branch](https://github.com/lightningnetwork/lnd/branches) or [tag](https://hub.docker.com/r/lightninglabs/lnd/tags?page=1&ordering=last_updated) instead, use the `checkout` build-arg. For example, to build the latest tagged commit:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
⛰ docker build . --build-arg checkout=v0.14.1-beta -t myrepository/lnd:v0.14.1-beta
|
⛰ docker build . --build-arg checkout=v0.14.1-beta -t myrepository/lnd:v0.14.1-beta
|
||||||
@@ -127,6 +127,12 @@ 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 myrepository/lnd:latest-tag
|
⛰ docker build . --build-arg checkout=$(git describe --tags `git rev-list --tags --max-count=1`) -t myrepository/lnd:latest-tag
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also specify a different repo than the default (`https://github.com/lightningnetwork/lnd`) using the `git_url` build-arg:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
⛰ docker build . --build-arg git_url=https://git.example.com/lnd.git --build-arg checkout=mybranch -t myrepository/lnd:v0.13.0-beta
|
||||||
|
```
|
||||||
|
|
||||||
Once the image has been built and tagged locally, start the container:
|
Once the image has been built and tagged locally, start the container:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@@ -69,6 +69,8 @@
|
|||||||
* [The `tlv` package was refactored into its own Golang
|
* [The `tlv` package was refactored into its own Golang
|
||||||
submodule](https://github.com/lightningnetwork/lnd/pull/6283).
|
submodule](https://github.com/lightningnetwork/lnd/pull/6283).
|
||||||
|
|
||||||
|
* [Source repository can now be specified for Docker image builds](https://github.com/lightningnetwork/lnd/pull/6300)
|
||||||
|
|
||||||
## RPC Server
|
## RPC Server
|
||||||
|
|
||||||
* [Add value to the field
|
* [Add value to the field
|
||||||
|
Reference in New Issue
Block a user