Add multi OCI runtime support for ctr (#250)

Add ctr command line args `--runtime` and `--runtime-args` for multiple
OCI runtime support.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
zhangwei_cs 2016-06-01 01:14:31 +08:00 committed by Michael Crosby
parent 24144682a0
commit 4176ba7b52
1 changed files with 12 additions and 0 deletions

View File

@ -152,6 +152,16 @@ var startCommand = cli.Command{
Name: "no-pivot",
Usage: "do not use pivot root",
},
cli.StringFlag{
Name: "runtime,r",
Value: "runc",
Usage: "name or path of the OCI compliant runtime to use when executing containers",
},
cli.StringSliceFlag{
Name: "runtime-args",
Value: &cli.StringSlice{},
Usage: "specify additional runtime args",
},
},
Action: func(context *cli.Context) {
var (
@ -191,6 +201,8 @@ var startCommand = cli.Command{
Stderr: s.stderr,
Labels: context.StringSlice("label"),
NoPivotRoot: context.Bool("no-pivot"),
Runtime: context.String("runtime"),
RuntimeArgs: context.StringSlice("runtime-args"),
}
)
restoreAndCloseStdin = func() {