From 8074837abaedf4eeed21bd5892e8539e714fece9 Mon Sep 17 00:00:00 2001 From: Nash Kaminski Date: Tue, 9 Mar 2021 23:01:14 -0600 Subject: [PATCH] Fix startup of nginx after base image changes This commit fixes an issue where the nginx container does not start as a result of the nginx packaged with raspbian daemonizing by default, as well as including a conflicting virtualhost configs from under /etc/nginx/sites-enabled. Therefore, this change disables nginx daemonizing in identical manner to the nginx upstream docker containers (https://github.com/nginxinc/docker-nginx/blob/master/Dockerfile-debian.template#L106) as well as removed the package default nginx virtualhost configuration. --- docker/Dockerfile.nginx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.nginx b/docker/Dockerfile.nginx index f426838d..1d5068f8 100644 --- a/docker/Dockerfile.nginx +++ b/docker/Dockerfile.nginx @@ -12,6 +12,7 @@ ENV GIT_SHORT_HASH=$GIT_SHORT_HASH ARG GIT_BRANCH ENV GIT_BRANCH=$GIT_BRANCH -COPY docker/nginx/nginx.conf /etc/nginx/conf.d/srly-ose.conf +COPY docker/nginx/nginx.conf /etc/nginx/sites-enabled/srly-ose.conf +RUN rm -f /etc/nginx/sites-enabled/default -CMD nginx +CMD ["nginx", "-g", "daemon off;"]