Skip to content

Commit 4fddb94

Browse files
author
zhouhao
committed
schema: add check platform to manifests
Signed-off-by: zhouhao <[email protected]>
1 parent 28462ef commit 4fddb94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

schema/validator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ func validateIndex(r io.Reader) error {
164164
if manifest.MediaType != string(v1.MediaTypeImageManifest) {
165165
fmt.Printf("warning: manifest %s has an unknown media type: %s\n", manifest.Digest, manifest.MediaType)
166166
}
167+
if manifest.Platform != nil {
168+
checkPlatform(manifest.Platform.OS, manifest.Platform.Architecture)
169+
}
167170

168171
}
169172

0 commit comments

Comments
 (0)