Attempting to build docker image with COPY --from on Actions

Attempting to port the creation of my public Docker images from CircleCI to Github Actions. Most of it seems to work but when it hits a

COPY --from=build-meminfo /meminfo.so /meminfo.so

 it errors out with: 

failed to export image: failed to create image: failed to get layer sha256:c6e65bd9400184963545d1bd9a6cc5b1d4ed71ff4974e646dd2f6e637eadd85d: layer does not exist

As can be seen: https://github.com/WyriHaximusNet/docker-php/runs/282412341#step:3:2693

As there a way around this limitation/bug?

Hi,

Please add an extra command (like RUN true) between the two COPY statements for a try.

In your Docker-zts(nts), there are 3 “copy --from” command, please add 2 ‘run true’ for each. I forked your repo, and it works for me.

You can refer to ticket below for the details, same error reported here:

https://github.com/moby/moby/issues/37965

2 Likes

Thanks! That indeed does the trick, I have no clue why tho