Update Dockerfile
chore: grant ownership of `/app` directory to `nextjs` system account
This commit is contained in:
parent
8da636cf85
commit
64af53361a
1 changed files with 3 additions and 0 deletions
|
|
@ -52,6 +52,9 @@ COPY --from=builder /app/public ./public
|
||||||
RUN mkdir .next
|
RUN mkdir .next
|
||||||
RUN chown nextjs:nodejs .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
|
# 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
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue