Skip to content

Commit 55ce137

Browse files
ZZiigguurraattZZiigguurraatt
authored andcommitted
dev.Dockerfile: allow skipping build of the web UI
We now run `make go-install-noui` and `make go-install-cli-noui` when the `NO_UI` build arg is set to 1 to skip building of the web UI when using the development docker container. If the `NO_UI` build arg is not set, `make go-install` and `make go-install-cli` are run as before the `NO_UI` build arg existed.
1 parent b01d459 commit 55ce137

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

dev.Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ RUN apk add --no-cache --update git
77
# Copy in the local repository to build from.
88
COPY . /go/src/github.com/lightninglabs/lightning-terminal
99

10+
# Set to 1 to enable this option and skip build of the web UI.
11+
ARG NO_UI
12+
1013
RUN cd /go/src/github.com/lightninglabs/lightning-terminal/app \
11-
&& yarn install \
12-
&& yarn build
14+
&& if (($NO_UI)); then \
15+
yarn install \
16+
&& yarn build; \
17+
fi
1318

1419
# The first stage is already done and all static assets should now be generated
1520
# in the app/build sub directory.
@@ -36,8 +41,13 @@ RUN apk add --no-cache --update alpine-sdk make \
3641
go get -v github.com/lightninglabs/taproot-assets@$TAPROOT_ASSETS_VERSION \
3742
&& go mod tidy; \
3843
fi \
39-
&& make go-install \
40-
&& make go-install-cli
44+
&& if (($NO_UI)); then \
45+
make go-install-noui \
46+
&& make go-install-cli-noui; \
47+
else \
48+
make go-install \
49+
&& make go-install-cli; \
50+
fi
4151

4252
# Start a new, final image to reduce size.
4353
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d as final

0 commit comments

Comments
 (0)