diff --git a/daemon/containerd/cache.go b/daemon/containerd/cache.go index 8bd01768f8..5e696c5967 100644 --- a/daemon/containerd/cache.go +++ b/daemon/containerd/cache.go @@ -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