Skip to content

Commit d154e23

Browse files
dmcgowank8s-infra-cherrypick-robot
authored andcommitted
Update the ctr pull defaults when using the transfer service
Match the defaults set by the transfer service which will configure linux by default on darwin hosts. Signed-off-by: Derek McGowan <[email protected]>
1 parent 0936421 commit d154e23

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/ctr/commands/images/pull.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ command. As part of this process, we do the following:
129129
return errors.New("cannot specify both --platform and --all-platforms")
130130
}
131131
if len(p) == 0 && !allPlatforms {
132-
p = append(p, platforms.DefaultSpec())
132+
spec := platforms.DefaultSpec()
133+
// Use linux by default for unpacking images on darwin as configured by transfer service
134+
if spec.OS == "darwin" {
135+
spec.OS = "linux"
136+
}
137+
p = append(p, spec)
133138
}
134139
// we use an empty `Platform` slice to indicate that we want to pull all platforms
135140
sopts = append(sopts, image.WithPlatforms(p...))

0 commit comments

Comments
 (0)