X-Git-Url: http://these/git/?a=blobdiff_plain;f=Dockerfile;h=92b3f7e62de6c3576b18a45b24d5db4f25047774;hb=8a163fedde4c28dffb747dbb9ad6119b5eb45ef7;hp=0a23ea897b00c8fb118cac744d12f5d39ad1d971;hpb=025daaa582c94bc4114330c5bac8bc1d44d74424;p=lemmy-ui.git diff --git a/Dockerfile b/Dockerfile index 0a23ea8..92b3f7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:alpine as builder +FROM node:20.2-alpine as builder RUN apk update && apk add curl yarn python3 build-base gcc wget git --no-cache RUN curl -sf https://gobinaries.com/tj/node-prune | sh @@ -7,7 +7,6 @@ WORKDIR /usr/src/app ENV npm_config_target_arch=x64 ENV npm_config_target_platform=linux ENV npm_config_target_libc=musl -ENV NODE_ENV=production # Cache deps COPY package.json yarn.lock ./ @@ -28,7 +27,7 @@ COPY .git .git RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts" RUN yarn --production --prefer-offline -RUN yarn build:prod +RUN NODE_OPTIONS="--max-old-space-size=8192" yarn build:prod # Prune the image RUN node-prune /usr/src/app/node_modules