title: Docker build doesn't run in gitlab CI/CD
body: <p>docker build --pull -t &quot;$DOCKER_REGISTRY_IMAGE&quot; . ``` in my YML file it gives me the following error</p>
  <pre><code>#7 sha256:dfa2ef75c7954aaee8f870047cbaf47a407eb186847ff19b01de4c198fb4fa00
  #7 ERROR: lstat /var/lib/docker/tmp/buildkit-mount254857695/build/libs: no such file or directory
  ------
   &gt; [2/2] COPY build/libs/*.jar app.jar:
  ------
  lstat /var/lib/docker/tmp/buildkit-mount254857695/build/libs: no such file or directory
  </code></pre>
  <p>When I run the same command in IntelliJ it works.</p>
  <p>This is my YML file (The docker part)</p>
  <pre><code>deploy-docker:
    image: docker:latest
    stage: deploy-docker
    services:
      - docker:dind
    before_script:
      - docker login -u &quot;$DOCKER_REGISTRY_USER&quot; -p &quot;$DOCKER_REGISTRY_PSW&quot;
    script:
      - cd goatpool-backend
      - docker build --pull -t &quot;$DOCKER_REGISTRY_IMAGE&quot; .
      - docker push &quot;$DOCKER_REGISTRY_IMAGE&quot;
  </code></pre>
  <p>this is my Dockerfile content:</p>
  <pre><code>FROM openjdk:11
  VOLUME /tmp
  COPY build/libs/*.jar app.jar
  ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;/app.jar&quot;]
  </code></pre>