From b4fd27b181f1433ba14e6b749676eaa942589bf2 Mon Sep 17 00:00:00 2001 From: Nicolas Pastorello Date: Mon, 27 Jul 2026 16:20:41 -0300 Subject: [PATCH] fix(docker): build on node 20 to match CI and engines The image was on node:22-alpine while CI pins node-version: 20 and package.json declares engines.node >=20.0.0. Align all three stages so the container builds and runs on the same major the project is tested against. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5edddc3..e32bbea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # --------------------------------------------------------------- # Stage 1 — install dependencies (cached until package*.json change) # --------------------------------------------------------------- -FROM node:22-alpine AS deps +FROM node:20-alpine AS deps WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci @@ -17,7 +17,7 @@ RUN npm ci # key, ENCRYPTION_KEY, META_APP_SECRET, ...) are read at runtime and # must NOT be baked into the image. # --------------------------------------------------------------- -FROM node:22-alpine AS builder +FROM node:20-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -37,7 +37,7 @@ RUN npm run build # --------------------------------------------------------------- # Stage 3 — minimal runtime (standalone output) # --------------------------------------------------------------- -FROM node:22-alpine AS runner +FROM node:20-alpine AS runner WORKDIR /app ENV NODE_ENV=production \ NEXT_TELEMETRY_DISABLED=1 \