From a07c935d345bef1bce4f3411da0e4b69fa9bf266 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 14 Nov 2023 14:27:51 -0800 Subject: [PATCH] ignore non blobs --- server/images.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/images.go b/server/images.go index 42def270..893fc4f2 100644 --- a/server/images.go +++ b/server/images.go @@ -782,7 +782,9 @@ func PruneLayers() error { if runtime.GOOS == "windows" { name = strings.ReplaceAll(name, "-", ":") } - deleteMap[name] = struct{}{} + if strings.HasPrefix(name, "sha256:") { + deleteMap[name] = struct{}{} + } } log.Printf("total blobs: %d", len(deleteMap))