Docker Hub build with multiple targets

Hello all,

For unknown reason build failed on Docker Hub when it trying to copy from a just built target into the same Dockerfile. When, I try on local machine (Fedora 27, Docker CE 17.12), the build succeed.

Here the failed build log : https://hub.docker.com/r/emmanuelgautier/react-app/builds/bsygsbahuzdxfbsqr5r9er4/

Anyone have a solution ?

OK. The reason why the build failed is because CMD does not execute the command, so the build dir does not exist for the second target.