How to give folder permissions inside a docker container Folder : <p>I am creating a folder inside my Dockerfile and I want to give it a write permission. But I am getting permission denied error when I try to do it</p>

<pre><code>FROM python:2.7
RUN pip install Flask==0.11.1 
RUN useradd -ms /bin/bash admin
USER admin
COPY app /app
WORKDIR /app
RUN chmod 777 /app
CMD ["python", "app.py"] 
</code></pre>

<p>My error is </p>

<pre><code>PS C:\Users\Shivanand\Documents\Notes\Praneeth's work\Flask&gt; docker build -t 
shivanand3939/test .
Sending build context to Docker daemon  209.9kB
Step 1/8 : FROM python:2.7
---&gt; 8a90a66b719a
Step 2/8 : RUN pip install Flask==0.11.1
---&gt; Using cache
---&gt; 6dc114bd7cf1
Step 3/8 : RUN useradd -ms /bin/bash admin
---&gt; Using cache
---&gt; 1cfdb6eea7dc
Step 4/8 : USER admin
---&gt; Using cache
---&gt; 27c5e8b09f15
Step 5/8 : COPY app /app
---&gt; Using cache
---&gt; 5d628573b24f
Step 6/8 : WORKDIR /app
---&gt; Using cache
---&gt; 351e19a5a007
Step 7/8 : RUN chmod 777 /app
---&gt; Running in aaad3c79e0f4
**chmod: changing permissions of ‘/app’: Operation not permitted
The command '/bin/sh -c chmod 777 /app' returned a non-zero code: 1**
</code></pre>

<p>How can I give write permissions to app folder inside my Docker container</p>
