Add support for systemd cgroups

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2016-12-19 15:06:27 -08:00
parent 5eab56e002
commit 6df58df215
4 changed files with 38 additions and 14 deletions

View file

@ -104,7 +104,11 @@ func (r *Runtime) CreateContainer(c *Container) error {
}
defer parentPipe.Close()
args := []string{"-c", c.name}
var args []string
if r.cgroupManager == "systemd" {
args = append(args, "-s")
}
args = append(args, "-c", c.name)
args = append(args, "-r", r.path)
args = append(args, "-b", c.bundlePath)
args = append(args, "-p", filepath.Join(c.bundlePath, "pidfile"))