title: Docker file with jenkins arficacty copy problem
body: <p>Please see the Jenkinsfile and Dockerfile below. I am trying to build and then add my .war file into the docker image that I am creating in jenkins. But it gives me error that <code>COPY failed: stat /var/lib/docker/tmp/docker-builder785780968/build/libs/demo.war: no such file or directory</code> . I tested my Dockerfile standalone and it works fine but jenkins cannot find the location of my war. how can I point jenkins where to look?
  Thanks.</p>
  <pre><code>//Dockerfile
  
  FROM tomcat:jdk8-openjdk
  WORKDIR /usr/local/tomcat/webapps
  ADD build/libs/demo.war /usr/local/tomcat/webapps/. #Fails here due to location of cant find war
  WORKDIR /usr/local/tomcat
  ENV CATALINA_OPTS &quot;-Xmx512m -Xms256m&quot;
  CMD [&quot;catalina.sh&quot;, &quot;run&quot;]
  
  //Jenkinsfile
  
  #!groovy
  
  pipeline{
      agent any
  
      stages{
          stage('Build'){
              steps{
                  sh &quot;./gradlew --no-daemon build&quot;
              }
          }
  
          stage('Unit Test'){
            steps{
              sh &quot;./gradlew --no-daemon test&quot;
              }
          }
  
          stage('Docker Image'){
              agent{
                  dockerfile true
              }
              steps{
                  echo &quot;docker complete&quot;
              }
          }
      }
  }
  
  </code></pre>