Skip to content

Commit

Permalink
Add nginx-unpriviliged dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nischal2015 committed Dec 17, 2023
1 parent 75ada4a commit 4b72a73
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Dockerfile.nginx.prod
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,6 @@ RUN yarn build
# 2nd stage
FROM nginx:1.23.3-alpine-slim

USER root

RUN rm /etc/nginx/conf.d/default.conf && \
rm /etc/nginx/nginx.conf && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/run && \
touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid

COPY --from=build /app/dist /usr/share/nginx/html
COPY .nginx/nginx.conf /etc/nginx/nginx.conf
COPY .nginx/conf.d /etc/nginx/conf.d

USER nginx

EXPOSE 8080

CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 4b72a73

Please sign in to comment.