From 4176ba7b5266252a76f5eeeaccd07109e7a65cb4 Mon Sep 17 00:00:00 2001 From: zhangwei_cs Date: Wed, 1 Jun 2016 01:14:31 +0800 Subject: [PATCH] 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 --- ctr/container.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ctr/container.go b/ctr/container.go index 4a26886..b435239 100644 --- a/ctr/container.go +++ b/ctr/container.go @@ -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() {