Merge pull request #3455 from dmcgowan/fix-default-import-compression
Add option to compress blobs on import
This commit is contained in:
@@ -72,6 +72,10 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
|
||||
Name: "no-unpack",
|
||||
Usage: "skip unpacking the images, false by default",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "compress-blobs",
|
||||
Usage: "compress uncompressed blobs when creating manifest (Docker format only)",
|
||||
},
|
||||
}, commands.SnapshotterFlags...),
|
||||
|
||||
Action: func(context *cli.Context) error {
|
||||
@@ -97,6 +101,10 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
|
||||
opts = append(opts, containerd.WithIndexName(idxName))
|
||||
}
|
||||
|
||||
if context.Bool("compress-blobs") {
|
||||
opts = append(opts, containerd.WithImportCompression())
|
||||
}
|
||||
|
||||
opts = append(opts, containerd.WithAllPlatforms(context.Bool("all-platforms")))
|
||||
|
||||
client, ctx, cancel, err := commands.NewClient(context)
|
||||
|
Reference in New Issue
Block a user