2017-06-19 20:39:00 +00:00
|
|
|
// +build containerd,!standalone
|
2017-06-08 19:00:31 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-06-22 20:15:46 +00:00
|
|
|
"github.com/moby/buildkit/control"
|
2017-06-08 19:00:31 +00:00
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
func appendFlags(f []cli.Flag) []cli.Flag {
|
|
|
|
return append(f, []cli.Flag{
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "containerd",
|
|
|
|
Usage: "containerd socket",
|
|
|
|
Value: "/run/containerd/containerd.sock",
|
|
|
|
},
|
|
|
|
}...)
|
|
|
|
}
|
|
|
|
|
2017-06-12 08:49:48 +00:00
|
|
|
// root must be an absolute path
|
|
|
|
func newController(c *cli.Context, root string) (*control.Controller, error) {
|
2017-06-08 19:00:31 +00:00
|
|
|
socket := c.GlobalString("containerd")
|
|
|
|
|
|
|
|
return control.NewContainerd(root, socket)
|
|
|
|
}
|