<p>I switched from distroless/java:8 to distroless/java:8-debug container and, when deployed to kubernetes, I started getting following error:
<em><strong>Error: Unable to access jarfile /MyApp-0.1.jar</strong></em></p>
<p>This is my Dockerfile:</p>
<pre><code>FROM gcr.io/distroless/java:8-debug
LABEL CONTAINER_NAME=my-api
ARG JAR_FILE=MyApp/core/build/libs/core-0.1-boot.jar
COPY ${JAR_FILE} MyApp-0.1.jar
ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;/MyApp-0.1.jar&quot;]
</code></pre>
<p>While I was using regular distroless (everything else was the same) I didn't have this problem.
What is interesting is that when I try to run this Dockerfile locally, I don't get this error. Is this some permission issue?</p>

Jovana Mihaljcic
<p>I redeployed and it is working now. The only logical explanation is that I tried to use nonroot one first and when I switched to root one, some of the pods with nonroot were still there causing the problem.</p>
