Signed-off-by: Tibor Vass <tibor@docker.com>
| ... | ... |
@@ -15,7 +15,6 @@ import ( |
| 15 | 15 |
"github.com/moby/buildkit/cache/metadata" |
| 16 | 16 |
"github.com/moby/buildkit/cache/remotecache" |
| 17 | 17 |
"github.com/moby/buildkit/control" |
| 18 |
- "github.com/moby/buildkit/executor/runcexecutor" |
|
| 19 | 18 |
"github.com/moby/buildkit/exporter" |
| 20 | 19 |
"github.com/moby/buildkit/frontend" |
| 21 | 20 |
"github.com/moby/buildkit/frontend/dockerfile" |
| ... | ... |
@@ -89,10 +88,7 @@ func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
|
| 89 | 89 |
return nil, err |
| 90 | 90 |
} |
| 91 | 91 |
|
| 92 |
- exec, err := runcexecutor.New(runcexecutor.Opt{
|
|
| 93 |
- Root: filepath.Join(root, "executor"), |
|
| 94 |
- CommandCandidates: []string{"docker-runc", "runc"},
|
|
| 95 |
- }) |
|
| 92 |
+ exec, err := newExecutor(root) |
|
| 96 | 93 |
if err != nil {
|
| 97 | 94 |
return nil, err |
| 98 | 95 |
} |
| 99 | 96 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,17 @@ |
| 0 |
+// +build !windows |
|
| 1 |
+ |
|
| 2 |
+package buildkit |
|
| 3 |
+ |
|
| 4 |
+import ( |
|
| 5 |
+ "path/filepath" |
|
| 6 |
+ |
|
| 7 |
+ "github.com/moby/buildkit/executor" |
|
| 8 |
+ "github.com/moby/buildkit/executor/runcexecutor" |
|
| 9 |
+) |
|
| 10 |
+ |
|
| 11 |
+func newExecutor(root string) (executor.Executor, error) {
|
|
| 12 |
+ return runcexecutor.New(runcexecutor.Opt{
|
|
| 13 |
+ Root: filepath.Join(root, "executor"), |
|
| 14 |
+ CommandCandidates: []string{"docker-runc", "runc"},
|
|
| 15 |
+ }) |
|
| 16 |
+} |