Skip to content

Commit 92b7bc9

Browse files
committed
ctr: fix label args used in NewContainer
Signed-off-by: Iceber Gu <[email protected]>
1 parent 42c6be8 commit 92b7bc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/ctr/commands/run/run_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
101101
)
102102

103103
if config {
104-
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
104+
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
105105
opts = append(opts, oci.WithSpecFromFile(context.String("config")))
106106
} else {
107107
var (
@@ -122,7 +122,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
122122
return nil, err
123123
}
124124
opts = append(opts, oci.WithRootFSPath(rootfs))
125-
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
125+
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
126126
} else {
127127
snapshotter := context.String("snapshotter")
128128
var image containerd.Image

0 commit comments

Comments
 (0)