Skip to content
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

Merged
merged 2 commits into from Mar 1, 2022
Merged

introduce cache-to #211

merged 2 commits into from Mar 1, 2022

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Nov 8, 2021

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

build.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@EricHripko EricHripko left a 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).

@ndeloof
Copy link
Collaborator Author

ndeloof commented Nov 19, 2021

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.

@EricHripko
Copy link
Collaborator

Thank you for elaborating! I guess there's image, registry and inline caches that aren't machine-specific, strictly speaking 👍

Copy link
Collaborator

@EricHripko EricHripko left a 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 💬

build.md Outdated Show resolved Hide resolved
build.md Show resolved Hide resolved
@ndeloof
Copy link
Collaborator Author

ndeloof commented Nov 28, 2021

@EricHripko fixed, can I get your Approval on this one ?

Copy link
Contributor

@ulyssessouza ulyssessouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

build.md Outdated Show resolved Hide resolved
build.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@EricHripko EricHripko left a 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 👍

build.md Outdated Show resolved Hide resolved
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof merged commit ffd2294 into compose-spec:master Mar 1, 2022
@ndeloof ndeloof deleted the cache-to branch March 1, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants