]> Untitled Git - lemmy-ui.git/blobdiff - Dockerfile
v0.18.1-rc.2
[lemmy-ui.git] / Dockerfile
index edf94cff0e03e353ff45313788988ae0aef2de56..2b36581d28d6ceebe2a891d35abe15fb9da410a3 100644 (file)
@@ -1,12 +1,16 @@
-FROM node:alpine as builder\r
+FROM node:20.2-alpine as builder\r
 RUN apk update && apk add curl yarn python3 build-base gcc wget git --no-cache\r
 RUN curl -sf https://gobinaries.com/tj/node-prune | sh\r
 \r
 WORKDIR /usr/src/app\r
 \r
+ENV npm_config_target_arch=x64\r
+ENV npm_config_target_platform=linux\r
+ENV npm_config_target_libc=musl\r
+\r
 # Cache deps\r
 COPY package.json yarn.lock ./\r
-RUN yarn install --production --ignore-scripts --prefer-offline --pure-lockfile\r
+RUN yarn --production --prefer-offline --pure-lockfile\r
 \r
 # Build\r
 COPY generate_translations.js \\r
@@ -22,7 +26,7 @@ COPY .git .git
 # Set UI version \r
 RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts"\r
 \r
-RUN yarn install --production --ignore-scripts --prefer-offline\r
+RUN yarn --production --prefer-offline\r
 RUN yarn build:prod\r
 \r
 # Prune the image\r