New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce cache-to #211
introduce cache-to #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for putting this together - I got a general question to better understand the use case ❓
I can certainly see the value for a shared cache (e.g., on NFS or in the registry) being referenced by Compose via cache_from
. What is the use case for specifying cache_to
in Compose though? Something like a local path especially seems rather machine-specific and possibly better off left to the tooling (e.g., via some CLI interface or export
command).
cache_to supports allows to share layers from intermediary images in a multi-stage Dockerfile, which are not pushed with the main image. Also allows to configure cache mechanisms not based on image registry, like github actions cache. |
Thank you for elaborating! I guess there's image, registry and inline caches that aren't machine-specific, strictly speaking 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a solid addition! Got a quick typo and a question inline 💬
@EricHripko fixed, can I get your Approval on this one ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once the typos inline are sorted ✅ Thank you for seeing this through 👍
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
What this PR does / why we need it:
Introduce
cache-to
in the compose specification, to offer a canonical binding with buildkit support for caching.cc @CrazyMax @ulyssessouza @tonistiigi