Wrong nginx image being used if COMPOSE_PROJECT_NAME not set
Closed this issue · 1 comments
jbrunton commented
Without this variable set, the nginx container crashes for me:
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1 | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/nginx.conf.template to /etc/nginx/conf.d/nginx.conf
nginx_1 | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/listen.conf.template to /etc/nginx/conf.d/listen.conf
nginx_1 | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/http_server.conf.template to /etc/nginx/conf.d/http_server.conf
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1 | 2021/01/19 21:20:22 [emerg] 1#1: "listen" directive is not allowed here in /etc/nginx/conf.d/listen.conf:1
nginx_1 | nginx: [emerg] "listen" directive is not allowed here in /etc/nginx/conf.d/listen.conf:1
These files don't exist in the flow metrics nginx image; they're from a separate project. TBC: how to prevent this? Change service/image names? Why does the project name help here?
jbrunton commented
This was actually a problem in the other project (accidentally overwriting the local nginx image).
Unsure why the project name acted as a temporary fix, though.