fix(ctr): enable networking for Windows containers

Signed-off-by: Markus Lippert <lippertmarkus@gmx.de>
This commit is contained in:
Markus Lippert
2021-12-21 07:13:39 +01:00
parent 591d7097e7
commit f39b3ac7ea
4 changed files with 47 additions and 5 deletions

View File

@@ -79,10 +79,6 @@ var platformRunFlags = []cli.Flag{
Usage: "set the cpu shares",
Value: 1024,
},
cli.BoolFlag{
Name: "cni",
Usage: "enable cni networking for the container",
},
}
// NewContainer creates a new container
@@ -449,3 +445,7 @@ func validNamespace(ns string) bool {
return false
}
}
func getNetNSPath(_ gocontext.Context, task containerd.Task) (string, error) {
return fmt.Sprintf("/proc/%d/ns/net", task.Pid()), nil
}