I am wondering about the pros and cons of having or not having nginx inside your docker image. There are plenty of tutorials on how to install nginx on docker, but what I am asking is, should you or should you not?
Should you install nginx on the docker host, and have it point to the individual running containers (which could be running rainbows etc.)? or
Should you install another nginx layer inside your containers?
I don't see any benefit of having another nginx inside docker containers, but then I wonder why there are so many tutorials on that, as if that's the common sense, and I am not getting the common sense, which frustrates me.
edit:
The less config per container the better it is for me. If there's tight coupling between the nginx container and the app container behind it, then it is certainly not the solution I am looking for, and beats the purpose of having containers in the first place. This is why I am leaning toward having nginx installed on the Docker host.
If we are to have an nginx container, the container should be independent of the apps. App-specific configuration, such as port numbers and ip addresses, number of worker processes, client_max_body_size
should not be configured into the container unless they can be customized when executing docker run
.