title: How to change permission on file in Dockerfile?
body: <p>I have the following Dockerfile:</p>
  
  <pre><code>FROM sonarqube
  
  ADD https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases/download/4.0.0/sonar-gitlab-plugin-4.0.0.jar /opt/sonarqube/extensions/plugins/
  RUN chmod +r /opt/sonarqube/extensions/plugins/ &amp;&amp; chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/
  </code></pre>
  
  <p>And I get the following error :</p>
  
  <pre><code>Step 3/3 : RUN chmod +x /opt/sonarqube/extensions/plugins/ &amp;&amp; chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/
   ---&gt; Running in 0fd0abc88b73
  chown: changing ownership of '/opt/sonarqube/extensions/plugins/sonar-gitlab-plugin-4.0.0.jar': Operation not permitted
  The command '/bin/sh -c chmod +x /opt/sonarqube/extensions/plugins/ &amp;&amp; chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/' returned a non-zero code: 1
  </code></pre>
  
  <p>If I do :</p>
  
  <pre><code>FROM sonarqube
  
  
  ADD https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases/download/4.0.0/sonar-gitlab-plugin-4.0.0.jar /opt/sonarqube/extensions/plugins/
  RUN sudo chmod +r /opt/sonarqube/extensions/plugins/ &amp;&amp; sudo chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre><code>Step 3/3 : RUN sudo chmod +x /opt/sonarqube/extensions/plugins/ &amp;&amp; sudo chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/
   ---&gt; Running in c7dc030ea2ac
  /bin/sh: 1: sudo: not found
  The command '/bin/sh -c sudo chmod +x /opt/sonarqube/extensions/plugins/ &amp;&amp; sudo chown -R sonarqube.sonarqube /opt/sonarqube/extensions/plugins/' returned a non-zero code: 127
  </code></pre>
  
  <p>How can I change the file's permission in Dockerfile?</p>