Docker + workflows



I’m trying out using workflows to speed up one of our builds. Currently, our build runs on CircleCI 2.0, and does deploys to staging and production environments on certain branches. We build and push around 20 or so docker images to, each of these taking about a minute or so, so the time really adds up.

What I’d like to do with workflows is separate out the build and push steps, so that if the push fails, we can redo just the push. Is this possible to do with workflows? I tried using a reusable docker engine, but the push step doesn’t have the tagged images from the previous step. Caching ~/.docker doesn’t work, as it’s empty on the actual machine.

Is there anything else I can try, or is something like this not possible?


Docker images between jobs in Workflows

Do you mean the docker storage directory? You’re on a container that access to a remote docker engine; so when I ask docker about this:

~ # docker info
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
Docker Root Dir: /var/lib/docker

You could mount /var/lib/docker/{aufs,image} from the remote, copy it to your workspace, then do the inverse before/during the push step.

IMO it would be nice if circle provided some less-visibly-hacky sugar for “persist all of the images I make into my workspace”.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.