export: add --skip-non-distributable
The flag skips adding non-distributable blobs such as Windows layers to archive. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -44,6 +44,10 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
||||
Name: "skip-manifest-json",
|
||||
Usage: "do not add Docker compatible manifest.json to archive",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "skip-non-distributable",
|
||||
Usage: "do not add non-distributable blobs such as Windows layers to archive",
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "platform",
|
||||
Usage: "Pull content from a specific platform",
|
||||
@@ -86,6 +90,10 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
||||
exportOpts = append(exportOpts, archive.WithSkipDockerManifest())
|
||||
}
|
||||
|
||||
if context.Bool("skip-non-distributable") {
|
||||
exportOpts = append(exportOpts, archive.WithSkipNonDistributableBlobs())
|
||||
}
|
||||
|
||||
client, ctx, cancel, err := commands.NewClient(context)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user