Skip to content

Commit d4148d9

Browse files
authored
Merge pull request containerd#10302 from ktock/ctr-pull-label
ctr: pull: Do not ignore labels when transfer service is used
2 parents 222db53 + cde2527 commit d4148d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/ctr/commands/images/pull.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ command. As part of this process, we do the following:
132132
} else if !context.Bool("skip-metadata") {
133133
sopts = append(sopts, image.WithAllMetadata)
134134
}
135+
labels := context.StringSlice("label")
136+
if len(labels) > 0 {
137+
sopts = append(sopts, image.WithImageLabels(commands.LabelArgs(labels)))
138+
}
135139

136140
opts := []registry.Opt{registry.WithCredentials(ch), registry.WithHostDir(context.String("hosts-dir"))}
137141
if context.Bool("plain-http") {

0 commit comments

Comments
 (0)