Merge pull request #382 from runcom/not-only-runc
cmd/containerd: extend to other OCI runtimes
This commit is contained in:
commit
4c848c4654
1 changed files with 8 additions and 3 deletions
|
@ -55,7 +55,7 @@ high performance container runtime
|
|||
},
|
||||
cli.StringFlag{
|
||||
Name: "runtime",
|
||||
Usage: "default runtime for execution",
|
||||
Usage: "runtime for execution",
|
||||
Value: "runc",
|
||||
},
|
||||
cli.StringFlag{
|
||||
|
@ -103,13 +103,18 @@ high performance container runtime
|
|||
return err
|
||||
}
|
||||
|
||||
var executor execution.Executor
|
||||
switch context.GlobalString("runtime") {
|
||||
var (
|
||||
executor execution.Executor
|
||||
runtime = context.GlobalString("runtime")
|
||||
)
|
||||
switch runtime {
|
||||
case "runc":
|
||||
executor, err = oci.New(context.GlobalString("root"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("oci: runtime %q not implemented", runtime)
|
||||
}
|
||||
|
||||
// Get events publisher
|
||||
|
|
Loading…
Reference in a new issue