Skip to content

Commit

Permalink
passage à nginx unprivileged
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Feb 13, 2024
1 parent 8f7e0aa commit 54ef521
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ COPY . /app/
RUN yarn build

# => Run container
FROM nginx:1.15.2-alpine
# FROM nginx:1.15.2-alpine
ARG registry=docker.io
FROM ${registry}/nginxinc/nginx-unprivileged:stable

# Nginx config
RUN rm -rf /etc/nginx/conf.d
Expand All @@ -31,9 +33,5 @@ RUN apk add --no-cache bash
# Make our shell script executable
RUN chmod +x env.sh

# change to non-root user
USER node
RUN chown -R node:node /usr/share/nginx/html

# Start Nginx server
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]

0 comments on commit 54ef521

Please # to comment.