Skip to content

Commit

Permalink
run Docker image as non-root
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Feb 13, 2024
1 parent 3cf07be commit 8f7e0aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ 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 8f7e0aa

Please # to comment.