ctr: pull or fetch image metadata by default
The metadata is small and useful for viewing all platforms for an image and enabling push back to the same registry. Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
parent
20f79300cf
commit
b32638e21b
@ -69,7 +69,12 @@ Most of this is experimental and there are few leaps to make this work.`,
|
|||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all-metadata",
|
Name: "all-metadata",
|
||||||
Usage: "Pull metadata for all platforms",
|
Usage: "(Deprecated: use skip-metadata) Pull metadata for all platforms",
|
||||||
|
Hidden: true,
|
||||||
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "skip-metadata",
|
||||||
|
Usage: "Skips metadata for unused platforms (Image may be unable to be pushed without metadata)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "metadata-only",
|
Name: "metadata-only",
|
||||||
@ -141,7 +146,7 @@ func NewFetchConfig(ctx context.Context, clicontext *cli.Context) (*FetchConfig,
|
|||||||
config.AllMetadata = true
|
config.AllMetadata = true
|
||||||
// Any with an empty set is None
|
// Any with an empty set is None
|
||||||
config.PlatformMatcher = platforms.Any()
|
config.PlatformMatcher = platforms.Any()
|
||||||
} else if clicontext.Bool("all-metadata") {
|
} else if !clicontext.Bool("skip-metadata") {
|
||||||
config.AllMetadata = true
|
config.AllMetadata = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,12 @@ command. As part of this process, we do the following:
|
|||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all-metadata",
|
Name: "all-metadata",
|
||||||
Usage: "Pull metadata for all platforms",
|
Usage: "(Deprecated: use skip-metadata) Pull metadata for all platforms",
|
||||||
|
Hidden: true,
|
||||||
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "skip-metadata",
|
||||||
|
Usage: "Skips metadata for unused platforms (Image may be unable to be pushed without metadata)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "print-chainid",
|
Name: "print-chainid",
|
||||||
@ -123,7 +128,7 @@ command. As part of this process, we do the following:
|
|||||||
// Any with an empty set is None
|
// Any with an empty set is None
|
||||||
// TODO: Specify way to specify not default platform
|
// TODO: Specify way to specify not default platform
|
||||||
// config.PlatformMatcher = platforms.Any()
|
// config.PlatformMatcher = platforms.Any()
|
||||||
} else if context.Bool("all-metadata") {
|
} else if !context.Bool("skip-metadata") {
|
||||||
sopts = append(sopts, image.WithAllMetadata)
|
sopts = append(sopts, image.WithAllMetadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user