Skip to content

Commit 64c8841

Browse files
committed
Install required native dependencies during frontend build
Adapted from nodejs/docker-node#384 (comment)
1 parent 42e2985 commit 64c8841

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.docker-hub/frontend/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ COPY common /common
55

66
WORKDIR /app
77
COPY frontend/package*.json ./
8-
RUN npm ci
8+
# install and uninstall the native dependencies in one single docker RUN instruction,
9+
# so they do not increase the image layer size
10+
RUN apk --no-cache add --virtual native-deps g++ make python3 && npm ci && apk del native-deps
911
COPY frontend .
1012
RUN npm run build
1113

0 commit comments

Comments
 (0)