I was reading the documentation here (https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/#Enable-Docker-BuildKit) and I noticed an apparent discrepancy.
Docker BuildKit caching limitations
The predefined docker cache used for caching the layers produced during Docker Build operations does not cache layers produced when using BuildKit.
which then appears to conflict with this:
Docker layer caching
If you have added Docker as a service, you can also add a Docker cache to your steps. Adding the cache can speed up your build by reusing previously built layers and only creating new dynamic layers as required in the step.
I have also had issues with priviledged mode when trying to cache using buildkit.
Additionally, in the documentation on caches it says: "Caches are saved on successful builds when the cache is empty. Only caches under 1GB once compressed are saved."
So a larger docker image won't get cached at all between pipelines?
Hi Edward,
Essentially those two pieces of documentation you've quoted means the following:
We have documentation related to privileged mode issues using buildkit below:
You are correct in stating that any docker image above 1GB will not be cached, I'd recommend using a smaller image.
Cheers!
- Ben (Bitbucket Cloud Support)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.