title: Why docker container doesn't run
body: <p>I am trying to run a flask application in a docker on windows, and python 3.7. </p>
  
  <p>This is my flask application:</p>
  
  <p>app.py:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  @app.route('/')
  def hello_world():
     #some lines of code
     return render_template('home.html', url=url, host='0.0.0.0')
  
  if __name__ == '__main__':
     app.run(debug=True, host='0.0.0.0')
  </code></pre>
  
  <p>Then I created a dockerfile.txt as a DockerFile and put the following contents inside:</p>
  
  <pre><code>FROM python:3.7
  MAINTAINER &lt;&lt;Your Name&gt;&gt;
  RUN apt-get update -y &amp;&amp; \
     apt-get install -y python3-pip python3-dev
  COPY ./requirements.txt /app/requirements.txt
  WORKDIR /app
  RUN pip3 install -t lib -r requirements.txt
  COPY . /app
  ENTRYPOINT [ "python3" ]
  CMD [ "app.py" ]
  </code></pre>
  
  <p>Then I run the following comments in command prompt:</p>
  
  <pre><code>docker build -t flask-image:latest .
  docker run -d -p 5000:5000 --name name-container1 flask-image
  </code></pre>
  
  <p>My problem is that after <code>docker ps -a</code> I see container <code>name-container1</code> is exited. But have no idea why???</p>
  
  <p>This is output:</p>
  
  <pre><code>CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS                          PORTS               NAMES
  d925f21f165c        flask-image         "python3 app.py"    About a minute ago   Exited (1) About a minute ago                       name-container1
  </code></pre>