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

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

Docker executor build image caching is not '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 Docker Layer Caching (DLC) for your project it helps with building Docker images and caches layers that have been built in previous job runs. Here's how the config for using this feature looks:

Documentation on Docker Layer Caching (DLC)

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.