Access built images from a job in another job from the same workflow (using docker_layer_caching)

Hi there,

I recently rewrite an workflow and I’m having a hard time with docker_layer_cache. I have a wokflow with some jobs in it.

There are two particular jobs that uses docker executor with remote docker and docker_layer_cache: true. They are running sequential

The first one builds an image, tags it with the $CIRCLE_SHA1 then get up some containers and run some tests (all using docker-compose).

The second should add tag latest to this previously built image then docker push it. But it’s not been able to find the tagged image. When the following command runs

docker tag *********.amazonaws.com/my-img:201ce03d *********.amazonaws.com/my-img:201ce03d:latest;

I got this error

Error response from daemon: manifest for *********.amazonaws.com/my-img:201ce03d not found

I’ve already verified, the tag used for the image is consistent on both jobs. Then I tried to rerun the failed job (the second one) with ssh to debug it, but than it simply works this time. Also docker images returns the expected build and tag through ssh.

P.S.: I cut the $CIRCLE_SHA1 to 8 characters.