cri: fix using the pinned label to pin image

Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
This commit is contained in:
Iceber Gu
2023-07-25 18:28:00 +08:00
parent 8348a8cecb
commit 7f7ba31b64
2 changed files with 11 additions and 1 deletions

View File

@@ -213,6 +213,7 @@ func (s *store) add(img Image) error {
}
// Or else, merge and sort the references.
i.References = docker.Sort(util.MergeStringSlices(i.References, img.References))
i.Pinned = i.Pinned || img.Pinned
s.images[img.ID] = i
return nil
}