From cde2527fceb5c612f5ae521da194e276ff7c7bc3 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Wed, 5 Jun 2024 12:26:00 +0900 Subject: [PATCH] ctr: pull: Do not ignore labels when transfer service is used Signed-off-by: Kohei Tokunaga --- cmd/ctr/commands/images/pull.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/ctr/commands/images/pull.go b/cmd/ctr/commands/images/pull.go index 0b0de7c05..c7752a861 100644 --- a/cmd/ctr/commands/images/pull.go +++ b/cmd/ctr/commands/images/pull.go @@ -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") {