ctr: pull: Do not ignore labels when transfer service is used

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
Kohei Tokunaga 2024-06-05 12:26:00 +09:00
parent 222db53917
commit cde2527fce
No known key found for this signature in database
GPG Key ID: 6CE0A04690DB3FB3

View File

@ -132,6 +132,10 @@ command. As part of this process, we do the following:
} else if !context.Bool("skip-metadata") { } else if !context.Bool("skip-metadata") {
sopts = append(sopts, image.WithAllMetadata) sopts = append(sopts, image.WithAllMetadata)
} }
labels := context.StringSlice("label")
if len(labels) > 0 {
sopts = append(sopts, image.WithImageLabels(commands.LabelArgs(labels)))
}
opts := []registry.Opt{registry.WithCredentials(ch), registry.WithHostDir(context.String("hosts-dir"))} opts := []registry.Opt{registry.WithCredentials(ch), registry.WithHostDir(context.String("hosts-dir"))}
if context.Bool("plain-http") { if context.Bool("plain-http") {