Update Dockerfile to align with Next.js standalone build structure.

This commit is contained in:
Mathieu 2025-11-19 14:06:01 +01:00
parent 4ffc736fea
commit fd627890f2

View file

@ -31,7 +31,7 @@ RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser --system --uid 1001 nextjs
# Copy necessary files # Copy necessary files
COPY --from=builder /app/public ./public # Note: Automatically copy public folder. Next.js standalone build includes public in .next/standalone
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static