Skip to content

Commit 99c56d2

Browse files
committed
ctr: fix label args used in NewContainer
Signed-off-by: Iceber Gu <[email protected]> (cherry picked from commit 92b7bc9) Signed-off-by: Iceber Gu <[email protected]>
1 parent 3dce36e commit 99c56d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/ctr/commands/run/run_unix.go

Lines changed: 2 additions & 2 deletions
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)