title: Flask Application on docker ,Windows 10 pro - OSError: [Errno 13] Permission denied
body: <p>I am using Docker(Linux Container) on Windows 10 Pro. I created a docker build for the flask application. After i run the application i get the PermissionError: </p>
  
  <blockquote>
    <p>[Errno 13] Permission denied: '/app/app.py'</p>
  </blockquote>
  
  <p>After referring some posts i have created the user and added the permissions in the dockerfile,still this doesn't work</p>
  
  <p><strong>1.docker  version</strong></p>
  
  <pre><code>Client: Docker Engine - Community
   Version:           18.09.2
  
   API version:       1.39
  
   Go version:        go1.10.8
  
   Git commit:        6247962
  
   Built:             Sun Feb 10 04:12:31 2019
  
   OS/Arch:           windows/amd64
  
   Experimental:      false
  
  
  Server: Docker Engine - Community
   Engine:
    Version:          18.09.2
  
    API version:      1.39 (minimum version 1.12)
  
    Go version:       go1.10.6
  
    Git commit:       6247962
  
    Built:            Sun Feb 10 04:13:06 2019
  
    OS/Arch:          linux/amd64
  
    Experimental:     false
  </code></pre>
  
  <p><strong>2.Docker file</strong></p>
  
  <pre><code>FROM python:3.7.3
  
  RUN useradd -ms /bin/bash admin
  
  COPY . /app 
  
  WORKDIR /app
  
  RUN pip install -r "requirements.txt"
  
  RUN chown -R admin:admin /app
  
  RUN chmod 776 /app
  
  USER admin
  
  ENTRYPOINT ["python"]
  
  CMD ["app.py"]  
  </code></pre>
  
  <p><strong>3.Requirements file</strong> </p>
  
  <pre><code>flask
  tensorflow-gpu
  flask_cors
  uuid
  librosa
  numba
  pysoundfile
  numpy
  cffi
  requests
  wave
  h5py
  pydub
  werkzeug
  </code></pre>
  
  <p><strong>4.Error Log</strong></p>
  
  <pre><code> File "app.py", line 552, in &lt;module&gt;
      app.run(debug = True, host = '0.0.0.0')
  
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 990, in run
      run_simple(host, port, self, **options)
  
    File "/usr/local/lib/python3.7/site-packages/werkzeug/serving.py", line 1007, in run_simple
  run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
  
   File "/usr/local/lib/python3.7/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
      sys.exit(reloader.restart_with_reloader())
  
    File "/usr/local/lib/python3.7/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
      exit_code = subprocess.call(args, env=new_environ, close_fds=False)
  
    File "/usr/local/lib/python3.7/subprocess.py", line 323, in call
      with Popen(*popenargs, **kwargs) as p:
  
    File "/usr/local/lib/python3.7/subprocess.py", line 775, in __init__
      restore_signals, start_new_session)
  
    File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  
  PermissionError: [Errno 13] Permission denied: '/app/app.py'
  </code></pre>