Merge pull request #3108 from alculquicondor/fix/import

Allow to import an image for the default platform only.
This commit is contained in:
Phil Estes
2019-03-19 13:29:57 -04:00
committed by GitHub
2 changed files with 24 additions and 3 deletions

View File

@@ -64,6 +64,10 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
Name: "index-name",
Usage: "image name to keep index as, by default index is discarded",
},
cli.BoolFlag{
Name: "all-platforms",
Usage: "imports content for all platforms, false by default",
},
}, commands.SnapshotterFlags...),
Action: func(context *cli.Context) error {
@@ -89,6 +93,8 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
opts = append(opts, containerd.WithIndexName(idxName))
}
opts = append(opts, containerd.WithAllPlatforms(context.Bool("all-platforms")))
client, ctx, cancel, err := commands.NewClient(context)
if err != nil {
return err