File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,25 @@ FROM node:12.17.0-alpine as nodejsbuilder
6
6
# master by default.
7
7
ARG checkout="master"
8
8
9
+ # There seem to be multiple problems when using yarn for a build inside of a
10
+ # docker image:
11
+ # 1. For building and installing node-gyp, python is required. This seems to
12
+ # be missing from the NodeJS base image for ARM builds (or is just required
13
+ # when building for ARM?).
14
+ # 2. Because of a problem in the docker internal network on ARM, some TCP
15
+ # packages are being dropped and the yarn installation times out. This can
16
+ # be mitigated by switching to HTTP and increasing the network timeout.
17
+ # See https://github.com/yarnpkg/yarn/issues/5259 for more info.
9
18
RUN apk add --no-cache --update alpine-sdk \
19
+ python \
10
20
git \
11
21
&& git clone https://github.com/lightninglabs/lightning-terminal /go/src/github.com/lightninglabs/lightning-terminal \
12
22
&& cd /go/src/github.com/lightninglabs/lightning-terminal \
13
23
&& git checkout $checkout \
14
24
&& cd app \
15
- && yarn install \
25
+ && npm config set registry "http://registry.npmjs.org" \
26
+ && yarn config set registry "http://registry.npmjs.org" \
27
+ && yarn install --frozen-lockfile --network-timeout 1000000 \
16
28
&& yarn build
17
29
18
30
# The first stage is already done and all static assets should now be generated
You can’t perform that action at this time.
0 commit comments