title: Build docker image jar file : COPY failed: no source files were specified
body: <p>I have a leshan server jar file (to which I have made some changes) obtained by running the maven clean install. I specify that I work in linux and I put this jar file inside a &quot;leshan_docker&quot; folder contained in the desktop. within the same folder there is also a dockerfile to build the server image, and it is written as follows:</p>
  <pre><code>FROM openjdk:8-jre-alpine
  
  COPY /Desktop/leshan_docker/leshan-server-demo-*.jar /Desktop/leshan_docker/  
  
  CMD [&quot;java&quot;, &quot;-jar&quot;, &quot;/leshan-server-demo-2.0.0-SNAPSHOT.jar&quot;]
  </code></pre>
  <p>but when I go to build through this command:</p>
  <pre><code>sudo docker build -f Dockerfile3 -t leshan-server3 .
  </code></pre>
  <p>It reports me the following error:</p>
  <pre><code>Sending build context to Docker daemon     12MB
  Step 1/3 : FROM openjdk:8-jre-alpine
   ---&gt; f7a292bbb70c
  Step 2/3 : COPY /Desktop/leshan_docker/leshan-server-demo-*.jar /Desktop/leshan_docker/
  COPY failed: no source files were specified
  </code></pre>
  <p>How can I go about solving the problem? Thanks in advance for your answers.</p>