Skip to content

Commit 4f7e1cc

Browse files
committed
fix(frontend): use nginx-unprivileged to avoid chown permission error in K8s
1 parent 431247d commit 4f7e1cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frontend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ COPY src ./src
2222
RUN npm run build
2323

2424
# Production stage
25-
FROM nginx:${NGINX_TAG}
25+
# Use unprivileged nginx: runs as UID 101, no chown needed, works with dropped capabilities
26+
FROM nginxinc/nginx-unprivileged:${NGINX_TAG}
2627

2728
# Copy nginx config with SPA fallback (try_files → index.html)
2829
COPY nginx.conf /etc/nginx/conf.d/default.conf

0 commit comments

Comments
 (0)