Dockerfile adjustments
Some checks are pending
Next.js App CI / docker (push) Waiting to run

This commit is contained in:
2025-09-15 15:19:29 +02:00
parent f4443822dd
commit 18d480a77e

View File

@@ -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