mirror of https://github.com/vishvananda/netns
Merge pull request #10 from nickethier/docker-cgroup-mount
Container cgroup location under systemd
This commit is contained in:
commit
b73cffff5a
|
@ -167,8 +167,10 @@ func getPidForContainer(id string) (int, error) {
|
||||||
filepath.Join(cgroupRoot, cgroupThis, id, "tasks"),
|
filepath.Join(cgroupRoot, cgroupThis, id, "tasks"),
|
||||||
// With more recent lxc versions use, cgroup will be in lxc/
|
// With more recent lxc versions use, cgroup will be in lxc/
|
||||||
filepath.Join(cgroupRoot, cgroupThis, "lxc", id, "tasks"),
|
filepath.Join(cgroupRoot, cgroupThis, "lxc", id, "tasks"),
|
||||||
// With more recent dockee, cgroup will be in docker/
|
// With more recent docker, cgroup will be in docker/
|
||||||
filepath.Join(cgroupRoot, cgroupThis, "docker", id, "tasks"),
|
filepath.Join(cgroupRoot, cgroupThis, "docker", id, "tasks"),
|
||||||
|
// Even more recent docker versions under systemd use docker-<id>.scope/
|
||||||
|
filepath.Join(cgroupRoot, "system.slice", "docker-"+id+".scope", "tasks"),
|
||||||
}
|
}
|
||||||
|
|
||||||
var filename string
|
var filename string
|
||||||
|
|
Loading…
Reference in New Issue