Reuse docker image across jobs in workflows

Hi,
I am trying to speed up my build using workflows. However, each of my job in the workflow requires the same docker image (~3GB). It turns out that instead of caching the image across jobs in the workflow, it tries to download the image for every single job. I thought that the jobs in the same workflow share the workspace, but I guess that does not include the image itself. Is there a way to not re-download the image every single time?

Not that I’ve found. I have a workflow that builds a docker image then run tests on it in 3 separate jobs then pushes it. I had to resort to tarring the docker image and passing it between workflows using the workflow cache save/restore feature. This turned out to be slower than just building the image in each of the test jobs! It is really unfortunate that circle does not (yet?) have better support for docker images moving between jobs in a workflow.

1 Like