From 4fddb944c09ab33c5e383a51a45a77fcfdb86a8d Mon Sep 17 00:00:00 2001 From: zhouhao Date: Wed, 5 Jul 2017 10:12:30 +0800 Subject: [PATCH] schema: add check platform to manifests Signed-off-by: zhouhao --- schema/validator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schema/validator.go b/schema/validator.go index b188a53a6..f7043518f 100644 --- a/schema/validator.go +++ b/schema/validator.go @@ -164,6 +164,9 @@ func validateIndex(r io.Reader) error { if manifest.MediaType != string(v1.MediaTypeImageManifest) { fmt.Printf("warning: manifest %s has an unknown media type: %s\n", manifest.Digest, manifest.MediaType) } + if manifest.Platform != nil { + checkPlatform(manifest.Platform.OS, manifest.Platform.Architecture) + } }