Run as root in dev mode for file write permissions

This commit is contained in:
2025-12-02 13:26:15 +00:00
parent 9f25b30083
commit b9b28ad92c

View File

@@ -36,9 +36,10 @@ RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# Copy all files from builder
COPY --from=builder --chown=nextjs:nodejs /app ./
COPY --from=builder /app ./
USER nextjs
# Don't switch to nextjs user for dev mode - needs write permissions
# USER nextjs
EXPOSE 3000