Skip to content

Commit

Permalink
remove shells to make nginx the main process of the container
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Schuster committed Feb 11, 2018
1 parent 02a34b8 commit 048a46f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ FROM nginx:alpine
ADD run.sh /run.sh
ADD default.conf /etc/nginx/conf.d/default.conf

CMD sh run.sh
RUN chmod +x /run.sh

CMD ["/run.sh"]
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ sed -i "s|\${SERVER_REDIRECT_CODE}|${SERVER_REDIRECT_CODE}|" /etc/nginx/conf.d/d
sed -i "s|\${SERVER_REDIRECT_PATH}|${SERVER_REDIRECT_PATH}|" /etc/nginx/conf.d/default.conf
sed -i "s|\${SERVER_REDIRECT_SCHEME}|${SERVER_REDIRECT_SCHEME}|" /etc/nginx/conf.d/default.conf

nginx -g 'daemon off;'
exec nginx -g 'daemon off;'

0 comments on commit 048a46f

Please sign in to comment.