We are using Docker in our pipelines. Usually we build an image (image A) with buildkit using buildkit inline cache.
Afterwards we run commands using the built image. Using the default docker cache this works very nicely as the image is usually cached which is what we want.
Now we started to use an external docker image (image
which is very big, far too big to ever fit into the cache. Now there's the problem:
- if we enable the docker cache the pipeline takes ages trying to compress image B, (together with image A) only to figure out they wont fit.
- if we disable the docker cache the pipeline has to build image A every time even though it would by itself fit into the cache if we were to omit image B
The question is: How can we use docker caching but prevent trying to send image B to the cache?