Skip to content

Commit 6b69999

Browse files
author
zhouhao
committed
add mediatype check
Signed-off-by: zhouhao <[email protected]>
1 parent 935fda0 commit 6b69999

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

schema/validator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ func validateIndex(r io.Reader) error {
136136
}
137137

138138
for _, manifest := range header.Manifests {
139+
if manifest.MediaType != string(v1.MediaTypeImageIndex) {
140+
fmt.Printf("warning: manifest %s has an unknown media type: %s\n", manifest.Digest, manifest.MediaType)
141+
}
142+
139143
checkPlatform(manifest.Platform.OS, manifest.Platform.Architecture)
140144
}
141145

0 commit comments

Comments
 (0)