Merge pull request #1144 from tonistiigi/nil-platform

imagetools: handle manifest with nil platform
pull/1145/head
Tõnis Tiigi 3 years ago committed by GitHub
commit 1beb3359a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,8 +59,10 @@ func NewPrinter(ctx context.Context, opt Opt, name string, format string) (*Prin
switch manifest.MediaType {
case images.MediaTypeDockerSchema2ManifestList, ocispecs.MediaTypeImageIndex:
for _, m := range index.Manifests {
if m.Platform != nil {
pforms = append(pforms, *m.Platform)
}
}
default:
pforms = append(pforms, platforms.DefaultSpec())
}

Loading…
Cancel
Save