title: Should you install nginx inside docker?
body: <p>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?</p>
  
  <p>Should you install nginx on the docker host, and have it point to the individual running containers (which could be running rainbows etc.)? or</p>
  
  <p>Should you install another nginx layer inside your containers?</p>
  
  <p>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.</p>
  
  <p>edit:</p>
  
  <p>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.</p>
  
  <p>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, <code>client_max_body_size</code> should not be configured into the container unless they can be customized when executing <code>docker run</code>.</p>