title: Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown
body: <p>I am trying to dockerize a simple Python-Flask application but I am getting an error while running my container.</p>
  
  <p>docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown.</p>
  
  <p>Workdir on localhost:</p>
  
  <pre><code>/home/ubuntu/flask_web
  - app.py
  - Dockerfile
  - requirements.txt
  </code></pre>
  
  <p>app.py</p>
  
  <pre><code>#flask_web/app.py
  
  from flask import Flask
  app = Flask(__name__)
  
  @app.route('/')
  def hello_world():
      return 'Hey, we have Flask in a Docker container'
  
  
  if __name__ == '__main__':
      app.run(debug=True, host='0.0.0.0')
  </code></pre>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM ubuntu:16.04
  
  MAINTAINER xyz "xyz@gmail.com"
  
  RUN apt-get update \
      &amp;&amp; apt-get install -y software-properties-common vim \
      &amp;&amp; add-apt-repository ppa:jonathonf/python-3.6 \
      &amp;&amp; apt-get update -y \
      &amp;&amp; apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv \
      &amp;&amp; pip3 install --upgrade pip
  
  # We copy just the requirements.txt first to leverage Docker cache
  COPY ./requirements.txt /app/requirements.txt
  
  WORKDIR /app
  
  RUN pip install -r requirements.txt
  
  COPY . /app
  
  ENTRYPOINT [ "python" ]
  
  CMD [ "app.py" ]
  </code></pre>
  
  <p>Commands:</p>
  
  <pre><code>docker build -t flask-test:latest .
  docker run -p 5000:5000 flask-test
  </code></pre>
  
  <p>Expected : Flask web should run on port 5000</p>
  
  <p>Actual Result: </p>
  
  <pre><code>docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown.
  </code></pre>