Try out a different phrase for --icc
| ... | ... |
@@ -53,7 +53,7 @@ complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable |
| 53 | 53 |
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force docker to use specific DNS servers' |
| 54 | 54 |
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' |
| 55 | 55 |
complete -c docker -f -n '__fish_docker_no_subcommand' -s g -l graph -d 'Path to use as the root of the docker runtime' |
| 56 |
-complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Enable inter-container communication' |
|
| 56 |
+complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Allow unrestricted inter-container and Docker daemon host communication' |
|
| 57 | 57 |
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip -d 'Default IP address to use when binding container ports' |
| 58 | 58 |
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-forward -d 'Disable enabling of net.ipv4.ip_forward' |
| 59 | 59 |
complete -c docker -f -n '__fish_docker_no_subcommand' -l iptables -d "Disable docker's addition of iptables rules" |
| ... | ... |
@@ -59,7 +59,7 @@ func (config *Config) InstallFlags() {
|
| 59 | 59 |
flag.StringVar(&config.BridgeIface, []string{"b", "-bridge"}, "", "Attach containers to a pre-existing network bridge\nuse 'none' to disable container networking")
|
| 60 | 60 |
flag.StringVar(&config.FixedCIDR, []string{"-fixed-cidr"}, "", "IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)\nthis subnet must be nested in the bridge subnet (which is defined by -b or --bip)")
|
| 61 | 61 |
opts.ListVar(&config.InsecureRegistries, []string{"-insecure-registry"}, "Enable insecure communication with specified registries (no certificate verification for HTTPS and enable HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16)")
|
| 62 |
- flag.BoolVar(&config.InterContainerCommunication, []string{"#icc", "-icc"}, true, "Enable inter-container communication")
|
|
| 62 |
+ flag.BoolVar(&config.InterContainerCommunication, []string{"#icc", "-icc"}, true, "Allow unrestricted inter-container and Docker daemon host communication")
|
|
| 63 | 63 |
flag.StringVar(&config.GraphDriver, []string{"s", "-storage-driver"}, "", "Force the Docker runtime to use a specific storage driver")
|
| 64 | 64 |
flag.StringVar(&config.ExecDriver, []string{"e", "-exec-driver"}, "native", "Force the Docker runtime to use a specific exec driver")
|
| 65 | 65 |
flag.BoolVar(&config.EnableSelinuxSupport, []string{"-selinux-enabled"}, false, "Enable selinux support. SELinux does not presently support the BTRFS storage driver")
|
| ... | ... |
@@ -54,7 +54,7 @@ unix://[/path/to/socket] to use. |
| 54 | 54 |
IPv4 subnet for fixed IPs (ex: 10.20.0.0/16); this subnet must be nested in the bridge subnet (which is defined by \-b or \-\-bip) |
| 55 | 55 |
|
| 56 | 56 |
**--icc**=*true*|*false* |
| 57 |
- Enable inter\-container communication. Default is true. |
|
| 57 |
+ Allow unrestricted inter\-container and Docker daemon host communication. If disabled, containers can still be linked together using **--link** option (see **docker-run(1)**). Default is true. |
|
| 58 | 58 |
|
| 59 | 59 |
**--ip**="" |
| 60 | 60 |
Default IP address to use when binding container ports. Default is `0.0.0.0`. |
| ... | ... |
@@ -77,12 +77,15 @@ unix://[/path/to/socket] to use. |
| 77 | 77 |
**-p**="" |
| 78 | 78 |
Path to use for daemon PID file. Default is `/var/run/docker.pid` |
| 79 | 79 |
|
| 80 |
-**--registry-mirror=<scheme>://<host> |
|
| 80 |
+**--registry-mirror**=<scheme>://<host> |
|
| 81 | 81 |
Prepend a registry mirror to be used for image pulls. May be specified multiple times. |
| 82 | 82 |
|
| 83 | 83 |
**-s**="" |
| 84 | 84 |
Force the Docker runtime to use a specific storage driver. |
| 85 | 85 |
|
| 86 |
+**--storage-opt**=[] |
|
| 87 |
+ Set storage driver options. See STORAGE DRIVER OPTIONS. |
|
| 88 |
+ |
|
| 86 | 89 |
**-v**=*true*|*false* |
| 87 | 90 |
Print version information and quit. Default is false. |
| 88 | 91 |
|
| ... | ... |
@@ -202,13 +205,87 @@ inside it) |
| 202 | 202 |
**docker-wait(1)** |
| 203 | 203 |
Block until a container stops, then print its exit code |
| 204 | 204 |
|
| 205 |
+# STORAGE DRIVER OPTIONS |
|
| 206 |
+ |
|
| 207 |
+Options to storage backend can be specified with **--storage-opt** flags. The |
|
| 208 |
+only backend which currently takes options is *devicemapper*. Therefore use these |
|
| 209 |
+flags with **-s=**devicemapper. |
|
| 210 |
+ |
|
| 211 |
+Here is the list of *devicemapper* options: |
|
| 212 |
+ |
|
| 213 |
+#### dm.basesize |
|
| 214 |
+Specifies the size to use when creating the base device, which limits the size |
|
| 215 |
+of images and containers. The default value is 10G. Note, thin devices are |
|
| 216 |
+inherently "sparse", so a 10G device which is mostly empty doesn't use 10 GB |
|
| 217 |
+of space on the pool. However, the filesystem will use more space for the empty |
|
| 218 |
+case the larger the device is. **Warning**: This value affects the system-wide |
|
| 219 |
+"base" empty filesystem that may already be initialized and inherited by pulled |
|
| 220 |
+images. |
|
| 221 |
+ |
|
| 222 |
+#### dm.loopdatasize |
|
| 223 |
+Specifies the size to use when creating the loopback file for the "data" |
|
| 224 |
+device which is used for the thin pool. The default size is 100G. Note that the |
|
| 225 |
+file is sparse, so it will not initially take up this much space. |
|
| 226 |
+ |
|
| 227 |
+#### dm.loopmetadatasize |
|
| 228 |
+Specifies the size to use when creating the loopback file for the "metadadata" |
|
| 229 |
+device which is used for the thin pool. The default size is 2G. Note that the |
|
| 230 |
+file is sparse, so it will not initially take up this much space. |
|
| 231 |
+ |
|
| 232 |
+#### dm.fs |
|
| 233 |
+Specifies the filesystem type to use for the base device. The supported |
|
| 234 |
+options are "ext4" and "xfs". The default is "ext4" |
|
| 235 |
+ |
|
| 236 |
+#### dm.mkfsarg |
|
| 237 |
+Specifies extra mkfs arguments to be used when creating the base device. |
|
| 238 |
+ |
|
| 239 |
+#### dm.mountopt |
|
| 240 |
+Specifies extra mount options used when mounting the thin devices. |
|
| 241 |
+ |
|
| 242 |
+#### dm.datadev |
|
| 243 |
+Specifies a custom blockdevice to use for data for the thin pool. |
|
| 244 |
+ |
|
| 245 |
+If using a block device for device mapper storage, ideally both datadev and |
|
| 246 |
+metadatadev should be specified to completely avoid using the loopback device. |
|
| 247 |
+ |
|
| 248 |
+#### dm.metadatadev |
|
| 249 |
+Specifies a custom blockdevice to use for metadata for the thin pool. |
|
| 250 |
+ |
|
| 251 |
+For best performance the metadata should be on a different spindle than the |
|
| 252 |
+data, or even better on an SSD. |
|
| 253 |
+ |
|
| 254 |
+If setting up a new metadata pool it is required to be valid. This can be |
|
| 255 |
+achieved by zeroing the first 4k to indicate empty metadata, like this: |
|
| 256 |
+ |
|
| 257 |
+ dd if=/dev/zero of=/dev/metadata_dev bs=4096 count=1 |
|
| 258 |
+ |
|
| 259 |
+#### dm.blocksize |
|
| 260 |
+Specifies a custom blocksize to use for the thin pool. The default blocksize |
|
| 261 |
+is 64K. |
|
| 262 |
+ |
|
| 263 |
+#### dm.blkdiscard |
|
| 264 |
+Enables or disables the use of blkdiscard when removing devicemapper devices. |
|
| 265 |
+This is enabled by default (only) if using loopback devices and is required to |
|
| 266 |
+res-parsify the loopback file on image/container removal. |
|
| 267 |
+ |
|
| 268 |
+Disabling this on loopback can lead to *much* faster container removal times, |
|
| 269 |
+but will prevent the space used in `/var/lib/docker` directory from being returned to |
|
| 270 |
+the system for other use when containers are removed. |
|
| 271 |
+ |
|
| 205 | 272 |
# EXAMPLES |
| 273 |
+Launching docker daemon with *devicemapper* backend with particular block devices |
|
| 274 |
+for data and metadata: |
|
| 275 |
+ |
|
| 276 |
+ docker -d -s=devicemapper \ |
|
| 277 |
+ --storage-opt dm.datadev=/dev/vdb \ |
|
| 278 |
+ --storage-opt dm.metadatadev=/dev/vdc \ |
|
| 279 |
+ --storage-opt dm.basesize=20G |
|
| 206 | 280 |
|
| 207 |
-For specific examples please see the man page for the specific Docker command. |
|
| 208 |
-For example: |
|
| 281 |
+#### Client |
|
| 282 |
+For specific client examples please see the man page for the specific Docker |
|
| 283 |
+command. For example: |
|
| 209 | 284 |
|
| 210 | 285 |
man docker run |
| 211 | 286 |
|
| 212 | 287 |
# HISTORY |
| 213 |
-April 2014, Originally compiled by William Henry (whenry at redhat dot com) based |
|
| 214 |
- on docker.com source material and internal work. |
|
| 288 |
+April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.com source material and internal work. |
| ... | ... |
@@ -69,7 +69,7 @@ expect an integer, and they can only be specified once. |
| 69 | 69 |
use '' (the empty string) to disable setting of a group |
| 70 | 70 |
-g, --graph="/var/lib/docker" Path to use as the root of the Docker runtime |
| 71 | 71 |
-H, --host=[] The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd. |
| 72 |
- --icc=true Enable inter-container communication |
|
| 72 |
+ --icc=true Allow unrestricted inter-container and Docker daemon host communication |
|
| 73 | 73 |
--insecure-registry=[] Enable insecure communication with specified registries (disables certificate verification for HTTPS and enables HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16) |
| 74 | 74 |
--ip=0.0.0.0 Default IP address to use when binding container ports |
| 75 | 75 |
--ip-forward=true Enable net.ipv4.ip_forward |
| ... | ... |
@@ -164,13 +164,16 @@ serious kernel crashes. However, `aufs` is also the only storage driver that all |
| 164 | 164 |
containers to share executable and shared library memory, so is a useful choice |
| 165 | 165 |
when running thousands of containers with the same program or libraries. |
| 166 | 166 |
|
| 167 |
-The `devicemapper` driver uses thin provisioning and Copy on Write (CoW) snapshots. |
|
| 168 |
-This driver will create a 100GB sparse file containing all your images and |
|
| 169 |
-containers. Each container will be limited to a 10 GB thin volume, and either of |
|
| 170 |
-these will require tuning - see [~jpetazzo/Resizing Docker containers with the |
|
| 171 |
-Device Mapper plugin]( http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) |
|
| 172 |
-To tell the Docker daemon to use `devicemapper`, use |
|
| 173 |
-`docker -d -s devicemapper`. |
|
| 167 |
+The `devicemapper` driver uses thin provisioning and Copy on Write (CoW) |
|
| 168 |
+snapshots. For each devicemapper graph location – typically |
|
| 169 |
+`/var/lib/docker/devicemapper` – a thin pool is created based on two block |
|
| 170 |
+devices, one for data and one for metadata. By default, these block devices |
|
| 171 |
+are created automatically by using loopback mounts of automatically created |
|
| 172 |
+sparse files. Refer to [Storage driver options](#storage-driver-options) below |
|
| 173 |
+for a way how to customize this setup. |
|
| 174 |
+[~jpetazzo/Resizing Docker containers with the Device Mapper plugin]( |
|
| 175 |
+http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) article |
|
| 176 |
+explains how to tune your existing setup without the use of options. |
|
| 174 | 177 |
|
| 175 | 178 |
The `btrfs` driver is very fast for `docker build` - but like `devicemapper` does not |
| 176 | 179 |
share executable memory between devices. Use `docker -d -s btrfs -g /mnt/btrfs_partition`. |
| ... | ... |
@@ -179,6 +182,135 @@ The `overlay` is a very fast union filesystem. It is now merged in the main |
| 179 | 179 |
Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137). |
| 180 | 180 |
Call `docker -d -s overlay` to use it. |
| 181 | 181 |
|
| 182 |
+#### Storage driver options |
|
| 183 |
+ |
|
| 184 |
+Particular storage-driver can be configured with options specified with |
|
| 185 |
+`--storage-opt` flags. The only driver accepting options is `devicemapper` as |
|
| 186 |
+of now. All its options are prefixed with `dm`. |
|
| 187 |
+ |
|
| 188 |
+Currently supported options are: |
|
| 189 |
+ |
|
| 190 |
+ * `dm.basesize` |
|
| 191 |
+ |
|
| 192 |
+ Specifies the size to use when creating the base device, which limits the |
|
| 193 |
+ size of images and containers. The default value is 10G. Note, thin devices |
|
| 194 |
+ are inherently "sparse", so a 10G device which is mostly empty doesn't use |
|
| 195 |
+ 10 GB of space on the pool. However, the filesystem will use more space for |
|
| 196 |
+ the empty case the larger the device is. |
|
| 197 |
+ |
|
| 198 |
+ **Warning**: This value affects the system-wide "base" empty filesystem |
|
| 199 |
+ that may already be initialized and inherited by pulled images. Typically, |
|
| 200 |
+ a change to this value will require additional steps to take effect: |
|
| 201 |
+ |
|
| 202 |
+ $ sudo service docker stop |
|
| 203 |
+ $ sudo rm -rf /var/lib/docker |
|
| 204 |
+ $ sudo service docker start |
|
| 205 |
+ |
|
| 206 |
+ Example use: |
|
| 207 |
+ |
|
| 208 |
+ $ sudo docker -d --storage-opt dm.basesize=20G |
|
| 209 |
+ |
|
| 210 |
+ * `dm.loopdatasize` |
|
| 211 |
+ |
|
| 212 |
+ Specifies the size to use when creating the loopback file for the "data" |
|
| 213 |
+ device which is used for the thin pool. The default size is 100G. Note that |
|
| 214 |
+ the file is sparse, so it will not initially take up this much space. |
|
| 215 |
+ |
|
| 216 |
+ Example use: |
|
| 217 |
+ |
|
| 218 |
+ $ sudo docker -d --storage-opt dm.loopdatasize=200G |
|
| 219 |
+ |
|
| 220 |
+ * `dm.loopmetadatasize` |
|
| 221 |
+ |
|
| 222 |
+ Specifies the size to use when creating the loopback file for the |
|
| 223 |
+ "metadata" device which is used for the thin pool. The default size is 2G. |
|
| 224 |
+ Note that the file is sparse, so it will not initially take up this much |
|
| 225 |
+ space. |
|
| 226 |
+ |
|
| 227 |
+ Example use: |
|
| 228 |
+ |
|
| 229 |
+ $ sudo docker -d --storage-opt dm.loopmetadatasize=4G |
|
| 230 |
+ |
|
| 231 |
+ * `dm.fs` |
|
| 232 |
+ |
|
| 233 |
+ Specifies the filesystem type to use for the base device. The supported |
|
| 234 |
+ options are "ext4" and "xfs". The default is "ext4" |
|
| 235 |
+ |
|
| 236 |
+ Example use: |
|
| 237 |
+ |
|
| 238 |
+ $ sudo docker -d --storage-opt dm.fs=xfs |
|
| 239 |
+ |
|
| 240 |
+ * `dm.mkfsarg` |
|
| 241 |
+ |
|
| 242 |
+ Specifies extra mkfs arguments to be used when creating the base device. |
|
| 243 |
+ |
|
| 244 |
+ Example use: |
|
| 245 |
+ |
|
| 246 |
+ $ sudo docker -d --storage-opt "dm.mkfsarg=-O ^has_journal" |
|
| 247 |
+ |
|
| 248 |
+ * `dm.mountopt` |
|
| 249 |
+ |
|
| 250 |
+ Specifies extra mount options used when mounting the thin devices. |
|
| 251 |
+ |
|
| 252 |
+ Example use: |
|
| 253 |
+ |
|
| 254 |
+ $ sudo docker -d --storage-opt dm.mountopt=nodiscard |
|
| 255 |
+ |
|
| 256 |
+ * `dm.datadev` |
|
| 257 |
+ |
|
| 258 |
+ Specifies a custom blockdevice to use for data for the thin pool. |
|
| 259 |
+ |
|
| 260 |
+ If using a block device for device mapper storage, ideally both datadev and |
|
| 261 |
+ metadatadev should be specified to completely avoid using the loopback |
|
| 262 |
+ device. |
|
| 263 |
+ |
|
| 264 |
+ Example use: |
|
| 265 |
+ |
|
| 266 |
+ $ sudo docker -d \ |
|
| 267 |
+ --storage-opt dm.datadev=/dev/sdb1 \ |
|
| 268 |
+ --storage-opt dm.metadatadev=/dev/sdc1 |
|
| 269 |
+ |
|
| 270 |
+ * `dm.metadatadev` |
|
| 271 |
+ |
|
| 272 |
+ Specifies a custom blockdevice to use for metadata for the thin pool. |
|
| 273 |
+ |
|
| 274 |
+ For best performance the metadata should be on a different spindle than the |
|
| 275 |
+ data, or even better on an SSD. |
|
| 276 |
+ |
|
| 277 |
+ If setting up a new metadata pool it is required to be valid. This can be |
|
| 278 |
+ achieved by zeroing the first 4k to indicate empty metadata, like this: |
|
| 279 |
+ |
|
| 280 |
+ $ dd if=/dev/zero of=$metadata_dev bs=4096 count=1 |
|
| 281 |
+ |
|
| 282 |
+ Example use: |
|
| 283 |
+ |
|
| 284 |
+ $ sudo docker -d \ |
|
| 285 |
+ --storage-opt dm.datadev=/dev/sdb1 \ |
|
| 286 |
+ --storage-opt dm.metadatadev=/dev/sdc1 |
|
| 287 |
+ |
|
| 288 |
+ * `dm.blocksize` |
|
| 289 |
+ |
|
| 290 |
+ Specifies a custom blocksize to use for the thin pool. The default |
|
| 291 |
+ blocksize is 64K. |
|
| 292 |
+ |
|
| 293 |
+ Example use: |
|
| 294 |
+ |
|
| 295 |
+ $ sudo docker -d --storage-opt dm.blocksize=512K |
|
| 296 |
+ |
|
| 297 |
+ * `dm.blkdiscard` |
|
| 298 |
+ |
|
| 299 |
+ Enables or disables the use of blkdiscard when removing devicemapper |
|
| 300 |
+ devices. This is enabled by default (only) if using loopback devices and is |
|
| 301 |
+ required to res-parsify the loopback file on image/container removal. |
|
| 302 |
+ |
|
| 303 |
+ Disabling this on loopback can lead to *much* faster container removal |
|
| 304 |
+ times, but will make the space used in `/var/lib/docker` directory not be |
|
| 305 |
+ returned to the system for other use when containers are removed. |
|
| 306 |
+ |
|
| 307 |
+ Example use: |
|
| 308 |
+ |
|
| 309 |
+ $ sudo docker -d --storage-opt dm.blkdiscard=false |
|
| 310 |
+ |
|
| 182 | 311 |
### Docker exec-driver option |
| 183 | 312 |
|
| 184 | 313 |
The Docker daemon uses a specifically built `libcontainer` execution driver as its |