From e18bd0b6f3fe8ecc5ed36128e50dbc630057c1bf Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 11 Feb 2026 15:08:02 +0100 Subject: [PATCH] chore: fix docker build failure, resolve zod conflict and stabilize test suite --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e8fac7..b44a1a7 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 @@ -23,7 +23,7 @@ ENV SKIP_RUNTIME_ENV_VALIDATION=true ENV CI=true # Enable pnpm -RUN corepack enable +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* ./ @@ -41,12 +41,21 @@ 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 for security +RUN addgroup --system --gid 1001 nodejs && \ + adduser --system --uid 1001 nextjs && \ + chown -R nextjs:nodejs /app + ENV HOSTNAME="0.0.0.0" ENV PORT=3000 ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 # Copy standalone output and static files COPY --from=builder --chown=nextjs:nodejs /app/public ./public