Fix execution build

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-12-05 16:17:46 -08:00
parent e31a99c08a
commit 723a72bdf8
9 changed files with 212 additions and 250 deletions

View file

@ -14,6 +14,7 @@ import (
"github.com/docker/containerd"
api "github.com/docker/containerd/api/execution"
"github.com/docker/containerd/execution"
"github.com/docker/containerd/execution/executors/oci"
// metrics "github.com/docker/go-metrics"
"github.com/urfave/cli"
)
@ -80,10 +81,13 @@ high performance container runtime
return err
}
execService, err := execution.New(execution.Opts{
Root: context.GlobalString("root"),
Runtime: context.GlobalString("runtime"),
})
var executor execution.Executor
switch context.GlobalString("runtime") {
case "runc":
executor = oci.New(context.GlobalString("root"))
}
execService, err := execution.New(executor)
if err != nil {
return err
}