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

Clarification on application/vnd.buildkit.cacheconfig.v0 ? #2220

Closed
valorl opened this issue Jul 2, 2021 · 2 comments
Closed

Clarification on application/vnd.buildkit.cacheconfig.v0 ? #2220

valorl opened this issue Jul 2, 2021 · 2 comments

Comments

@valorl
Copy link

valorl commented Jul 2, 2021

Hi,

There's a couple of issues here about some registries not supporting --export-cache of type=registry and I'm experiencing the same thing with JFrog Artifactory.

So far I've gathered that this is likely because of the special application/vnd.buildkit.cacheconfig.v0 media type being pushed, which doesn't appear to be a part of either the Docker (v2 schema 2) spec or the OCI spec.

Is there a plan for this becoming part of OCI or some other standard?

Correct me if I'm wrong please, but when it comes to the usefulness of buildkit caching (and therefore buildkit in general for many people), it is strange to me that the functionality depends on this buildkit-specific media type, which, because of not being part of any of the specs, is unlikely to be generally supported by registries.

Additionally, I think it would be really useful to mention this in some way in the docs and perhaps track common registry provider support.

Since this is something I'm running into as a mere mortal container user who just wants to be able to efficiently build containers (rootless in Kubernetes, which buildkit seems to be the best fit for right now), there's a chance I'm missing something fundamental here, so please do feel free to educate me :)

Thanks in advance!

@tonistiigi
Copy link
Member

This is a common pattern used by other tools like containerd checkpoints or some cnab collections. Docker spec does not forbid specific mediatypes in the decriptors. Reference registry has always supported this since 2016 so no Buildkit specific hacks were done to enable this. OCI spec was written years after(by other people), doesn't strictly forbid it but leaves it to the implementation.

All the blobs are pushed with blob API, not manifest. So registries should not hardcode any buildkit specific mediatypes but just should not handle descriptors as manifests if they don't have a manifest mediatype. If you want to propose changes to OCI spec that make this more clear I support that.

@valorl
Copy link
Author

valorl commented Jul 5, 2021

Thanks for adding some context to this, I see it's not that straightforward. I'll close in favor of docker/buildx#173. Seems like there's a decent representation of the different perspectives. I don't feel qualified to comment on the technical details, it's just a bummer that this really useful feature isn't available in most registries.

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

No branches or pull requests

2 participants