title: ADD failed: stat /var/lib/docker/tmp/docker-builder673702145/target/xxx.jar: no such file or directory
body: <p>I got the following issue while trying to create a docker image from openjdk base image. </p>
  
  <pre><code>ADD ${JAR_FILE} websocket-demo.jar
  ADD failed: stat /var/lib/docker/tmp/docker-builder673702145/target/websocket-demo-0.0.1-SNAPSHOT.jar: no such file or directory
  </code></pre>
  
  <p>Actually I was following <a href="https://www.callicoder.com/spring-boot-docker-example/%22this%22" rel="nofollow noreferrer">this</a> tutorial and got this issue while trying to compile Docker file.</p>
  
  <p>Here is my docker file :</p>
  
  <pre><code># Start with a base image containing Java runtime
  FROM openjdk:8-jdk-alpine
  
  # Add Maintainer Info
  LABEL maintainer="Nuibb&lt;*****@gmail.com&gt;"
  
  # Add a volume pointing to /tmp
  VOLUME /tmp
  
  # Make port 8080 available to the world outside this container
  EXPOSE 8080
  
  # The application's jar file
  ARG JAR_FILE=target/websocket-demo-0.0.1-SNAPSHOT.jar
  
  # Add the application's jar to the container
  ADD ${JAR_FILE} websocket-demo.jar
  
  # Run the jar file 
  ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/websocket-demo.jar"]
  </code></pre>
  
  <p>Can you please let me know how can I fix this issue ?</p>