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:
committed by
Abhimanyu Saharan
parent
433021b02c
commit
ebe148e537
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user