Reload Nginx in during docker build

nginx -s reload can only be used when nginx is running. It sends a signal to the master process of nginx which itself notifies the worker processes.

The problem here is, that you do not have a nginx instance running during your build process. So you are unable to reload it.

It is not a real problem though. Since nginx is not running, you do not need to reload it. After starting nginx (with an runit init file when using the phusion base image), it will be loading your provided configuration.

That said, I would not recommend running multiple services in a single container though. It is easy enough with docker-compose to orchestrate multiple containers nowadays.

Tags:

Docker

Nginx