diff --git a/Dockerfile b/Dockerfile index bdee9d0..c67e9d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,6 +52,9 @@ COPY --from=builder /app/public ./public RUN mkdir .next RUN chown nextjs:nodejs .next +# Give total ownership of the application to the nextjs system account +RUN chown -R nextjs:nodejs /app/ + # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./