Skip to content

Commit

Permalink
Add multi OCI runtime support for ctr (#250)
Browse files Browse the repository at this point in the history
Add ctr command line args `--runtime` and `--runtime-args` for multiple
OCI runtime support.

Signed-off-by: Zhang Wei <[email protected]>
  • Loading branch information
WeiZhang555 authored and crosbymichael committed May 31, 2016
1 parent 2414468 commit 4176ba7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ctr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 4176ba7

Please sign in to comment.