fix: update Dockerfile to create and set permissions for .next directory during build process

This commit is contained in:
Usman Baig
2026-01-30 00:38:27 +01:00
parent 0206e85873
commit e91902ebd1

View File

@@ -40,8 +40,8 @@ RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
# Set the correct permission for prerender cache # Set the correct permission for prerender cache
mkdir .next RUN mkdir .next
chown nextjs:nodejs .next RUN chown nextjs:nodejs .next
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # https://nextjs.org/docs/advanced-features/output-file-tracing