ソースを参照

Add docs for `--exec-opt` and setting `native.cgroupdriver`.

update man pages.
update bash completion.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Jessica Frazelle 10 年 前
コミット
d4bbbe58dd

+ 1 - 0
contrib/completion/bash/docker

@@ -1151,6 +1151,7 @@ _docker() {
 		--dns
 		--dns
 		--dns-search
 		--dns-search
 		--exec-driver -e
 		--exec-driver -e
+		--exec-opt
 		--fixed-cidr
 		--fixed-cidr
 		--fixed-cidr-v6
 		--fixed-cidr-v6
 		--graph -g
 		--graph -g

+ 1 - 0
contrib/completion/fish/docker.fish

@@ -51,6 +51,7 @@ complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable
 complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
 complete -c docker -f -n '__fish_docker_no_subcommand' -s e -l exec-driver -d 'Force the Docker runtime to use a specific exec driver'
 complete -c docker -f -n '__fish_docker_no_subcommand' -s e -l exec-driver -d 'Force the Docker runtime to use a specific exec driver'
+complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set exec driver options'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
 complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
 complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'
 complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'

+ 15 - 0
docs/man/docker.1.md

@@ -124,6 +124,9 @@ unix://[/path/to/socket] to use.
 **-v**, **--version**=*true*|*false*
 **-v**, **--version**=*true*|*false*
   Print version information and quit. Default is false.
   Print version information and quit. Default is false.
 
 
+**--exec-opt**=[]
+  Set exec driver options. See EXEC DRIVER OPTIONS.
+
 **--selinux-enabled**=*true*|*false*
 **--selinux-enabled**=*true*|*false*
   Enable selinux support. Default is false. SELinux does not presently support the BTRFS storage driver.
   Enable selinux support. Default is false. SELinux does not presently support the BTRFS storage driver.
 
 
@@ -319,6 +322,18 @@ for data and metadata:
       --storage-opt dm.metadatadev=/dev/vdc \
       --storage-opt dm.metadatadev=/dev/vdc \
       --storage-opt dm.basesize=20G
       --storage-opt dm.basesize=20G
 
 
+# EXEC DRIVER OPTIONS
+
+Options to the exec-driver can be specified with the **--exec-opt** flags. The
+only driver accepting options is the *native* (libcontainer) driver. Therefore
+use these flags with **-s=**native.
+
+The following is the only *native* option:
+
+#### native.cgroupdriver
+Specifies the management of the container's cgroups. As of now the only viable
+options are `cgroupfs` and `systemd`. The option will always fallback to `cgroupfs`.
+
 #### Client
 #### Client
 For specific client examples please see the man page for the specific Docker
 For specific client examples please see the man page for the specific Docker
 command. For example:
 command. For example:

+ 21 - 0
docs/sources/reference/commandline/cli.md

@@ -452,6 +452,27 @@ https://linuxcontainers.org/) via the `lxc` execution driver, however, this is
 not where the primary development of new functionality is taking place.
 not where the primary development of new functionality is taking place.
 Add `-e lxc` to the daemon flags to use the `lxc` execution driver.
 Add `-e lxc` to the daemon flags to use the `lxc` execution driver.
 
 
+#### Exec driver options
+
+Particular exec-driver can be configured with options specified with
+`--exec-opt` flags. The only driver accepting options is `native`
+(libcontainer) as of now. All its options are prefixed with `native`.
+
+Currently supported options are:
+
+ *  `native.cgroupdriver`
+
+    Specifies the management of the container's cgroups. As of now the only
+    viable options are `cgroupfs` and `systemd`. The option will always
+    fallback to `cgroupfs`. By default, if no option is specified, the
+    execdriver will try `systemd` and fallback to `cgroupfs`. Same applies if
+    `systemd` is passed as the `cgroupdriver` but is not capable of being used.
+
+    Example use:
+
+        $ sudo docker -d --exec-opt native.cgroupdriver=cgroupfs
+
+
 
 
 ### Daemon DNS options
 ### Daemon DNS options