Merge pull request #10302 from ktock/ctr-pull-label

ctr: pull: Do not ignore labels when transfer service is used
This commit is contained in:
Fu Wei 2024-06-05 06:06:11 +00:00 committed by GitHub
commit d4148d94cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,6 +132,10 @@ command. As part of this process, we do the following:
} else if !context.Bool("skip-metadata") {
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"))}
if context.Bool("plain-http") {