From 31c32956ca76999c280b7e00bd4956ac1884f538 Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Thu, 24 Mar 2016 09:18:03 -0700 Subject: [PATCH] When using systemd, pass expected cgroupsPath and cli options to runc. runc expects a systemd cgroupsPath to be in slice:scopePrefix:containerName format and the "--systemd-cgroup" option to be set. Update docker accordingly. Fixes 21475 Signed-off-by: Anusha Ragunathan --- docs/reference/commandline/daemon.md | 7 ++++--- man/docker.1.md | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/reference/commandline/daemon.md b/docs/reference/commandline/daemon.md index 5ca4df782f..5ca00242c7 100644 --- a/docs/reference/commandline/daemon.md +++ b/docs/reference/commandline/daemon.md @@ -491,12 +491,13 @@ with the `--exec-opt` flag. All the flag's options have the `native` prefix. A single `native.cgroupdriver` option is available. The `native.cgroupdriver` option specifies the management of the container's -cgroups. You can specify only specify `cgroupfs` at the moment. If you omit the +cgroups. You can specify only specify `cgroupfs` or `systemd`. If you specify +`systemd` and it is not available, the system errors out. If you omit the `native.cgroupdriver` option,` cgroupfs` is used. -This example explicitely sets the `cgroupdriver` to `cgroupfs`: +This example sets the `cgroupdriver` to `systemd`: - $ sudo docker daemon --exec-opt native.cgroupdriver=cgroupfs + $ sudo docker daemon --exec-opt native.cgroupdriver=systemd Setting this option applies to all containers the daemon launches. diff --git a/man/docker.1.md b/man/docker.1.md index c34d9c8d9a..6f4f6ab836 100644 --- a/man/docker.1.md +++ b/man/docker.1.md @@ -230,8 +230,9 @@ Use the **--exec-opt** flags to specify options to the execution driver. The following options are available: #### native.cgroupdriver -Specifies the management of the container's `cgroups`. Only `cgroupfs` can be specified -`cgroupfs` at the moment. +Specifies the management of the container's `cgroups`. You can specify `cgroupfs` +or `systemd`. If you specify `systemd` and it is not available, the system errors +out. #### Client For specific client examples please see the man page for the specific Docker