fix: use Alpine-compatible flags for addgroup/adduser in frontend Dockerfile

node:20-alpine uses BusyBox which does not support GNU-style
--system/--ingroup flags. Switch to -S/-G equivalents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hugh Brown
2026-03-03 22:36:56 -07:00
committed by Abhimanyu Saharan
parent 433021b02c
commit ebe148e537

View File

@@ -39,7 +39,7 @@ COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/next.config.ts ./next.config.ts
# Run as non-root user
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser \
RUN addgroup -S appgroup && adduser -S -G appgroup appuser \
&& chown -R appuser:appgroup /app
USER appuser