Merge pull request #45818 from tianon/containerd-from-scratch

Skip cache lookup for "FROM scratch" in containerd
This commit is contained in:
Bjorn Neergaard 2023-06-27 06:13:09 -06:00 committed by GitHub
commit 24ad2e5db6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,12 @@ type imageCache struct {
func (ic *imageCache) GetCache(parentID string, cfg *container.Config) (imageID string, err error) {
ctx := context.TODO()
if parentID == "" {
// TODO handle "parentless" image cache lookups ("FROM scratch")
return "", nil
}
parent, err := ic.c.GetImage(ctx, parentID, imagetype.GetImageOpts{})
if err != nil {
return "", err