title: keytool error: java.io.FileNotFoundException (Permission denied) while calling from docker file
body: <p>I'm trying to install a certificate in docker image using my docker file</p>
  
  <pre><code>ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
  
  COPY app-module/src/main/resources/certificates/A.crt /etc/ssl/certs/
  COPY app-module/src/main/resources/certificates/B.crt /etc/ssl/certs/
  
  RUN $JAVA_HOME/bin/keytool -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -file /etc/ssl/certs/A.crt -alias A
  RUN $JAVA_HOME/bin/keytool -import -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -file /etc/ssl/certs/B.crt -alias B
  </code></pre>
  
  <p>I get the error</p>
  
  <pre><code>keytool error: java.io.FileNotFoundException: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts (Permission denied)
  </code></pre>
  
  <p>Other answers I found suggested running the above command in root/administrator mode. However, I'm running these commands in Dockerfile. How do I get past this error?</p>