diff --git a/Dockerfile b/Dockerfile index 43758410..fdb5674f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,5 @@ FROM node:20-alpine as builder -# Upgrade to edge to fix sharp/libvips issues -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories - # Added vips-dev and pkgconfig so that local vips is used instead of prebuilt # Done for two reasons: # - libvips binaries are not available for ARM32 @@ -38,7 +34,7 @@ COPY .git .git RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts" RUN yarn --production --prefer-offline --network-timeout 100000 -RUN NODE_OPTIONS="--max-old-space-size=8192" yarn build:prod +RUN yarn build:prod RUN rm -rf ./node_modules/import-sort-parser-typescript RUN rm -rf ./node_modules/typescript @@ -49,11 +45,7 @@ RUN du -sh ./node_modules/* | sort -nr | grep '\dM.*' FROM node:20-alpine as runner ENV NODE_ENV=production -# Upgrade to edge to fix sharp/libvips issues -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories - -RUN apk update && apk upgrade && apk add curl vips-cpp +RUN apk update && apk add --no-cache curl vips-cpp && rm -rf /var/cache/apk/* COPY --from=builder /usr/src/app/dist /app/dist COPY --from=builder /usr/src/app/node_modules /app/node_modules