Skip to content

Commit 6309dc4

Browse files
authored
Merge pull request containerd#7051 from Iceber/fix-run-controller-manager-1.6
[release/1.6] ctr: fix label args used in NewContainer
2 parents 3dce36e + 99c56d2 commit 6309dc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: cmd/ctr/commands/run/run_unix.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
100100
)
101101

102102
if config {
103-
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
103+
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
104104
opts = append(opts, oci.WithSpecFromFile(context.String("config")))
105105
} else {
106106
var (
@@ -121,7 +121,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
121121
return nil, err
122122
}
123123
opts = append(opts, oci.WithRootFSPath(rootfs))
124-
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
124+
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
125125
} else {
126126
snapshotter := context.String("snapshotter")
127127
var image containerd.Image

0 commit comments

Comments
 (0)