Conversation
EricHripko
left a comment
There was a problem hiding this comment.
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 👍 |
EricHripko
left a comment
There was a problem hiding this comment.
Looks like a solid addition! Got a quick typo and a question inline 💬
|
@EricHripko fixed, can I get your Approval on this one ? |
EricHripko
left a comment
There was a problem hiding this comment.
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-toin the compose specification, to offer a canonical binding with buildkit support for caching.cc @CrazyMax @ulyssessouza @tonistiigi