COPY failed in a Docker Hub multi-stage build


On my macbook, this gradle Dockerfile is building with Docker 18.05.0-ce-rc1-mac63.
But on Docker Hub, I have the following issue:

Build failed: COPY failed: stat /var/lib/docker/overlay2/a76323b8722610e18ef8b037f7e706f0a945ea9a20fe59ee1d4b5642bb974688/merged/home/gradle/src/build/libs/spring-petclinic-kotlin.jar: no such file or directory

You may have the full log here: Docker

It looks like the path from the 1st stage is invalid. I don’t know why its working on my laptop and not on Docker Hub. Do you have any idea ? Maybe a different Docker version? Do you know how I can debug?