ctr images load to buildctl https://github.com/genuinetools/img/issues/165ResolveModePreferLocal (already implemented but seems undocumented and untested)cc @akshaymankar
This is not only ResolveModePreferLocal but ResolveModePreferLocal is a good example for how to do it. I think all the sources git/http/image (eg. LLB roots) should have a persistent LRU cache mechanism for resolving the cache key. Eg. from reference to digest on images, repo-url to commit sha on git, url to sha256 in http. Whenever a source is resolved it should add a record into that cache for future use. So in the case of images, while ResolveModePreferLocal requires a local image, this cache mechanism doesn't require the image to be present and only needs the digest to be resolved.
Should add a new flag that is exposed to all sources. Something like --validate-remote=required,fallback,offline where fallback would use cache when remote check failed.
Any update on this awesome feature?
I'd like to look into this, but I'm not really sure where to start. I think it's a pretty important feature to have for reproducible image building in CI.
The goal is to be able to track upstream images as dependencies and fetch them on our own accord (handling auth, etc. separately from buildkit) and then pass them on to buildkit. If there was some way to have buildkit load FROM images from local OCI image tarballs instead of fetching the image on its own, that would be perfect.
Most helpful comment
I'd like to look into this, but I'm not really sure where to start. I think it's a pretty important feature to have for reproducible image building in CI.
The goal is to be able to track upstream images as dependencies and fetch them on our own accord (handling auth, etc. separately from
buildkit) and then pass them on tobuildkit. If there was some way to havebuildkitloadFROMimages from local OCI image tarballs instead of fetching the image on its own, that would be perfect.