From a60c0b8eb88a82e78c5896ccf86790547eeba7ff Mon Sep 17 00:00:00 2001 From: Eduard Marbach Date: Fri, 11 Oct 2024 11:37:18 +0200 Subject: [PATCH] refactor: change prod image to alpine --- Dockerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 281a115..02765e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md +# TODO because multiarch build has problems with QEMU and Node we cannot use alpine here: https://github.com/nodejs/docker-node/issues/1798 FROM node:22.9.0-slim AS base WORKDIR /app @@ -35,16 +36,10 @@ ENV SECRETS_LOCATION=/app/config/secrets.yml CMD [ "pnpm", "start" ] # https://github.com/evanw/esbuild/issues/1921 -# TODO not using alpine for now because different error messages for example for requests. -FROM node:22.9.0-slim AS prod +FROM node:22.9.0-alpine AS prod WORKDIR /app -#RUN apk add --no-cache libstdc++ dumb-init git - -RUN apt-get update && apt-get install -y \ - git \ - dumb-init \ - && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache libstdc++ dumb-init git # TODO maybe in future. Results in breaking change #USER node