From 5e82d6edc9af984ccafc776af970a30add5acbdb Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 11 Feb 2026 14:44:03 +0100 Subject: [PATCH] ci: fix pipeline by reverting to stable node:20-alpine base images --- Dockerfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81fb3692..d9dd7329 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Stage 1: Builder -FROM registry.infra.mintel.me/mintel/nextjs:latest AS builder +FROM node:20-alpine AS builder WORKDIR /app -# Clean the workspace in case the base image is dirty +# Clean the workspace RUN rm -rf ./* # Arguments for build-time configuration @@ -18,8 +18,8 @@ ENV DIRECTUS_URL=$DIRECTUS_URL ENV SKIP_RUNTIME_ENV_VALIDATION=true ENV CI=true -# Enable pnpm -RUN corepack enable +# Enable pnpm v10 +RUN corepack enable && corepack prepare pnpm@10.3.0 --activate # Copy lockfile and manifest for dependency installation caching COPY pnpm-lock.yaml package.json .npmrc* ./ @@ -37,9 +37,17 @@ COPY . . RUN pnpm build # Stage 2: Runner -FROM registry.infra.mintel.me/mintel/runtime:latest AS runner +FROM node:20-alpine AS runner WORKDIR /app +# Install curl for health checks +RUN apk add --no-cache curl + +# Create nextjs user and group +RUN addgroup --system --gid 1001 nodejs && \ + adduser --system --uid 1001 nextjs && \ + chown nextjs:nodejs /app + ENV HOSTNAME="0.0.0.0" ENV PORT=3000 ENV NODE_ENV=production