Fix execution build
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
e31a99c08a
commit
723a72bdf8
9 changed files with 212 additions and 250 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue