From f80b25544067d30658ccc02e2bbab1a4be041c61 Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Mon, 22 Sep 2025 11:55:03 +0200 Subject: [PATCH] Dockerfile opt. experiments --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f3f6cc9..a3074abb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM node:20-alpine AS base ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable +RUN corepack enable && corepack prepare pnpm@latest --activate # Stage 2: Builder # This stage installs dependencies and builds the Next.js application. @@ -44,11 +44,11 @@ COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./ # Install ONLY production dependencies. # The pnpm CLI is already available from the 'base' stage. -RUN pnpm install --prod +RUN pnpm install --prod --frozen-lockfile # Copy the built Next.js application and public assets COPY --from=builder /app/public ./public -COPY --from=builder /app/.next ./.next +COPY --from=builder /app/.next/standalone ./ # Change ownership to the non-root user RUN chown -R nextjs:nodejs /app