From 18d480a77e956c4b8aaaa6f0dfb7b984eff16120 Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Mon, 15 Sep 2025 15:19:29 +0200 Subject: [PATCH] Dockerfile adjustments --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 781c5f08..0fe0a7b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,13 +23,13 @@ RUN ls -la /scripts RUN chmod +x ./scripts/*.sh && ./scripts/first_page_image.sh # Run the build command -RUN pnpm run build +RUN pnpm build # --- # Stage 2: Runner FROM node:20-alpine AS runner -WORKDIR /app +# WORKDIR /app # Create a non-root user for security RUN addgroup --system --gid 1001 nodejs @@ -38,9 +38,9 @@ USER nextjs # Copy the standalone output from the builder stage # The './public' directory now contains the newly generated assets -COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +COPY --from=builder /public ./public +COPY --from=builder --chown=nextjs:nodejs .next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs .next/static ./.next/static EXPOSE 3000 ENV PORT=3000