Fix default platform matcher when ctr import

Signed-off-by: Wang Xinwen <wxw0504@outlook.com>
This commit is contained in:
Wang Xinwen 2023-07-30 19:37:32 +08:00
parent 40f26543bd
commit 710d987d29
No known key found for this signature in database
GPG Key ID: A88C4DECE9264436

View File

@ -267,7 +267,7 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
for _, img := range imgs { for _, img := range imgs {
if platformMatcher == nil { // if platform not specified use default. if platformMatcher == nil { // if platform not specified use default.
platformMatcher = platforms.Default() platformMatcher = platforms.DefaultStrict()
} }
image := containerd.NewImageWithPlatform(client, img, platformMatcher) image := containerd.NewImageWithPlatform(client, img, platformMatcher)