harden(frontend): switch to nginx:alpine-slim with non-root runtime and nginx dir permission fixes
This commit is contained in:
@@ -7,7 +7,10 @@ ARG VITE_API_URL=/api/v1
|
||||
ENV VITE_API_URL=${VITE_API_URL}
|
||||
RUN npm run build
|
||||
|
||||
FROM nginxinc/nginx-unprivileged:stable-alpine
|
||||
FROM nginx:1-alpine-slim
|
||||
RUN apk upgrade --no-cache \
|
||||
&& mkdir -p /var/cache/nginx /var/run /var/log/nginx /tmp/nginx \
|
||||
&& chown -R nginx:nginx /var/cache/nginx /var/run /var/log/nginx /tmp/nginx
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
USER 101
|
||||
|
||||
Reference in New Issue
Block a user