Merge pull request #45818 from tianon/containerd-from-scratch
Skip cache lookup for "FROM scratch" in containerd
This commit is contained in:
commit
24ad2e5db6
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue