File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,13 @@ ARG NO_UI
7070ARG CGO_ENABLED=1
7171
7272# Install dependencies and install/build lightning-terminal.
73- RUN apk add --no-cache --update alpine-sdk make \
73+ # Note: When using `docker build`, setting the environmental variable
74+ # `DOCKER_BUILDKIT=1` is required to enable
75+ # [BuildKit](https://docs.docker.com/build/buildkit)
76+ # so that the cache mounts can be used.
77+ RUN --mount=type=cache,target=/go/pkg/mod \
78+ --mount=type=cache,target=/root/.cache/go-build \
79+ apk add --no-cache --update alpine-sdk make \
7480 && cd /go/src/github.com/lightninglabs/lightning-terminal \
7581 # If a custom lnd version is supplied, force it now.
7682 && if [ -n "$LND_VERSION" ]; then \
Original file line number Diff line number Diff line change 1717
1818### Functional Changes/Additions
1919
20+ * ` dev.Dockerfile ` now uses
21+ [ cache mounts] ( https://docs.docker.com/build/cache/optimize/#use-cache-mounts )
22+ to cache the ` GOMODCACHE ` and ` GOCACHE ` directories so that dependencies don't
23+ need to be re-downloaded and re-built every time the image is re-created.
24+ As a result of this change, ` dev.Dockerfile ` now requires
25+ [ BuildKit] ( https://docs.docker.com/build/buildkit ) to build. When using
26+ ` docker build ` , this can be enabled by setting the environmental variable
27+ ` DOCKER_BUILDKIT=1 ` . BuildKit also does not unnecessarily rebuild images when
28+ the build context is a remote git repository because COPY layers are more
29+ smartly compared to cache.
30+
31+
2032### Technical and Architectural Updates
2133
2234## RPC Updates
You can’t perform that action at this time.
0 commit comments