Skip to content

Commit

Permalink
fix(nginx4spa): use non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Jan 4, 2022
1 parent 7643c98 commit 630cd5c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nginx4spa/Dockerfile
Expand Up @@ -4,4 +4,13 @@ COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./entrypoint.sh /entrypoint.sh
COPY ./envsub.sh /envsub.sh

## adjust permissions
RUN chown -R nginx:nginx /usr/share/nginx/html && chmod -R 755 /usr/share/nginx/html && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
chown -R nginx:nginx /etc/nginx

RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit 630cd5c

Please sign in to comment.