title: docker nginx deployment entrypoint
body: <p>I have a dockerized nginx that works great if I run a shell, but (naturally enough) if I give "nginx start" itself as the entrypoint, it just daemonizes and exits immediately for lack of a process to wait for.</p>
  
  <p>My inclination is just to do something like this:</p>
  
  <pre><code>pid=$(cat /run/nginx.pid)
  while ps ax | awk '{print $1}' | grep -q $pid; do
      sleep 60
  done
  </code></pre>
  
  <p>Though this seems like quite a hack. But when I google for examples, I see people running bash.</p>
  
  <p>Any pointers?</p>