Docker Cache



It would nice if CircleCi could cache the docker images and save a lot of time spend in docker builds. Like Codeship does.

I have an image that is taking some minutes to build and my CircleCi builds are taking more than 10minutos to finish, which is awful.

The only way I found to actually cache the docker images with circleci is do what is explained in this CircleCi doc and this blog post. But this is a lot of work, scripts to build and maintain, specially if you have multiple images and multiple projects.

Docker image too large for cache?

This should be definitely implement as it would save a lot of time of docker buildings. :+1:


Great idea Roberto!


+1, this would be very good to have. I tried to do this by just specifying

    - "/var/lib/docker"

but that didn’t seem to do anything.


+1 - this would lock a ton of use-cases, especially if your app builds or depends on more than a single container.


Is there any update on this?


+1 for this


+1 for this.

We are not building images, but we use several docker images both on production and in development. And of course we launch those very same images for testing our applications on CircleCI, but it causes our tests to be much longer. Caching the images is a really big pro of CodeShip right now.


I made a shell script that may help the caching issue Workaround Docker cache issue with docker-cache-shim

It’s working for my workflow now. Hopefully it does for others.


Pulling images before building allows cached layers and is most likely significantly faster than building every layer every time. It would be nice if that was not needed though.


Definitely looking forward to this being implemented. It would greatly increase our build times.


Our build times would decrease from 12 minutes to just about 2 if this would be implemented. Absolutely a huge priority for a serious CI company :slight_smile:


The good news is this is on our radar. In the coming weeks and months there will be non-trivial progress on this front, so stay tuned…


Both codefresh and apparently codeship support it. it would be really helpful to understand what the timelines are because my builds are taking forever


+1 for this. caching is one of the cooles docker features


Any updates on this @ndintenfass?


In the short term, Kim’s workaround earlier in this thread (Docker Cache) is what I would try. In the coming months, CircleCI 2.0 is our permanent solution to this problem: CircleCI 2.0 Now in Closed Beta


+1, will use a workaround for now but this is a big deal for us.


CircleCI 2.0 provides native docker support, faster build performance and greater environment control.

2.0 is now in Beta and you can start building on our latest platform by signing up at


Updated documentation for Docker Layer Caching: