Quantcast
Channel: CircleCI Discuss - Latest posts
Viewing all articles
Browse latest Browse all 14879

Is it possible to cache images for docker-compose in CircleCI?

$
0
0

This isn’t possible in any meaningful way with one exception.

If you are building an image as a part of docker-compose up, you can use Docker Layer Caching to speed up the build portion.

If you’re not building an image, but instead spinning up a stack with docker-compose this feature will not be useful.

Even if you could cache docker images, the performance gains would be minimal in my opinion. The cache is stored on S3 and needs to be downloaded for each build. If you cache a bunch of docker images the cache size would be quite large and would likely not be faster than pulling in images the normal way.

In practice, the best way to speed this up is to make the images that you are using as small as possible. Alpine based images are a good option for this (with some caveats).


Viewing all articles
Browse latest Browse all 14879