Browse Source

ignore non blobs

Michael Yang 1 năm trước cách đây
mục cha
commit
a07c935d34
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      server/images.go

+ 3 - 1
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))