Permalink
Browse files

Merge pull request #382 from runcom/not-only-runc

cmd/containerd: extend to other OCI runtimes
  • Loading branch information...
2 parents 549b207 + 98b3900 commit 4c848c4654c7eb6edd57654c643b8255f079b298 @crosbymichael crosbymichael committed on GitHub Jan 10, 2017
Showing with 8 additions and 3 deletions.
  1. +8 −3 cmd/containerd/main.go
@@ -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

0 comments on commit 4c848c4

Please sign in to comment.