title: Debug Docker that quits immediately?
body: <p>I am following the official docker tutorial:
  <a href="https://docs.docker.com/get-started/part2/#build-the-app" rel="nofollow noreferrer">https://docs.docker.com/get-started/part2/#build-the-app</a></p>
  
  <p>I can successfully build the Docker image (after creating the Dockerfile, app.py and requirements.txt) and see it:</p>
  
  <pre><code>docker build -t friendlyhello .
  docker ps -a
  </code></pre>
  
  <p>However, it quits immediately when running</p>
  
  <pre><code>docker run -p 4000:80 friendlyhello
  </code></pre>
  
  <p>I cannot find the way to find why it did not work</p>
  
  <p>1) "docker ps -a" - says the container exited
  2) docker logs "container name" returns no information about logs
  3) I can attach the shell to it: </p>
  
  <pre><code>docker run  -p 4000:80 friendlyhello /bin/sh
  </code></pre>
  
  <p>but I did not manage to find (grep) any logging information there (in /var/log)
  4) attaching foreground and detached mode with -t and -d did not help</p>
  
  <p>What else could I do?</p>