Why isn't Docker Layer Caching speeding up my "spin up" time?


Docker Layer Caching (DLC) is a feature that speeds up building Docker images on CircleCI.

Docker executor build image caching is not the same as Docker Layer Caching

When you launch a build using the Docker executor, CircleCI pulls the Docker image you specify in your .circleci/config.yml from Docker Hub.

If we find cached layers for that image on the host being used for your job we will use them. For this reason, we recommend using our CircleCI convenience images since they are popular and have a good chance of being fully cached on our hosts.

Here's a 'Spin Up Environment' step for an image that has some layers cached on the builder:

There is currently no way to force us to "cache" your executor image.

If you've enabled Docker Layer Caching for your project and you see 'image cache not found on this host', that's the correct output because Docker Layer Caching does not affect this part of the build.

Use Docker Layer Caching when BUILDING a Docker image

If you've enabled DLC for your project it helps with building Docker images and caches layers that have been built in the previous job runs. Here's how the config for using this feature looks:

Additional Resources:

Documentation on Docker Layer Caching

Was this article helpful?
15 out of 28 found this helpful



Article is closed for comments.