Skip to content

Commit

Permalink
Remove sock files on nginx startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ciarams87 committed Jun 13, 2024
1 parent 7654cb6 commit 1486905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build/Dockerfile.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ RUN chown -R 101:1001 /etc/nginx /var/cache/nginx /var/lib/nginx
LABEL org.nginx.ngf.image.build.agent="${BUILD_AGENT}"

USER 101:1001

CMD ["sh", "-c", "rm -rf /var/run/nginx/* /var/lib/nginx/*.sock && /docker-entrypoint.sh nginx -g 'daemon off;'"]
2 changes: 1 addition & 1 deletion build/Dockerfile.nginxplus
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ USER 101:1001

LABEL org.nginx.ngf.image.build.agent="${BUILD_AGENT}"

CMD ["nginx", "-g", "daemon off;"]
CMD ["sh", "-c", "rm -rf /var/run/nginx/* /var/lib/nginx/*.sock && nginx -g 'daemon off;'"]

0 comments on commit 1486905

Please sign in to comment.