Merge pull request #6954 from Iceber/fix_ctr_new_container
ctr: fix label args used in NewContainer
This commit is contained in:
commit
8ba075c3dd
@ -101,7 +101,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
)
|
||||
|
||||
if config {
|
||||
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
|
||||
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
|
||||
opts = append(opts, oci.WithSpecFromFile(context.String("config")))
|
||||
} else {
|
||||
var (
|
||||
@ -122,7 +122,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
return nil, err
|
||||
}
|
||||
opts = append(opts, oci.WithRootFSPath(rootfs))
|
||||
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("labels"))))
|
||||
cOpts = append(cOpts, containerd.WithContainerLabels(commands.LabelArgs(context.StringSlice("label"))))
|
||||
} else {
|
||||
snapshotter := context.String("snapshotter")
|
||||
var image containerd.Image
|
||||
|
Loading…
Reference in New Issue
Block a user