Browse code

doc cli lint.

- 79 char line length (non-command).
- Consistent single space between sentences.
- Replace start of line tabs with spaces.
- Remove trailing white space.
- Consistent "**Note:**" style.
https://docs.docker.com/project/doc-style/#notes
- Replace the ``` sections with indented code.

Signed-off-by: Lloyd Dewolf <foolswisdom@gmail.com>

Lloyd Dewolf authored on 2015/05/28 02:38:29
Showing 1 changed files
... ...
@@ -16,9 +16,10 @@ or execute `docker help`:
16 16
       A self-sufficient runtime for Linux containers.
17 17
 
18 18
       ...
19
-Depending on your Docker system configuration, you may be required
20
-to preface each `docker` command with `sudo`. To avoid having to use `sudo` with
21
-the `docker` command, your system administrator can create a Unix group called
19
+
20
+Depending on your Docker system configuration, you may be required to preface
21
+each `docker` command with `sudo`. To avoid having to use `sudo` with the
22
+`docker` command, your system administrator can create a Unix group called
22 23
 `docker` and add users to it.
23 24
 
24 25
 For more information about installing Docker or `sudo` configuration, refer to
... ...
@@ -32,7 +33,8 @@ by the `docker` command line:
32 32
 * `DOCKER_CERT_PATH` The location of your authentication keys.
33 33
 * `DOCKER_DRIVER` The graph driver to use.
34 34
 * `DOCKER_HOST` Daemon socket to connect to.
35
-* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is unsuitable for Docker.
35
+* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
36
+  unsuitable for Docker.
36 37
 * `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
37 38
 * `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
38 39
 * `DOCKER_TMPDIR` Location for temporary Docker files.
... ...
@@ -56,18 +58,18 @@ The Docker command line stores its configuration files in a directory called
56 56
 `.docker/config.json` file to control certain aspects of how the `docker`
57 57
 command behaves.
58 58
 
59
-Currently, you can modify the `docker` command behavior using environment 
60
-variables or command-line options. You can also use options within 
61
-`config.json` to modify some of the same behavior.  When using these 
62
-mechanisms, you must keep in mind the order of precedence among them. Command 
63
-line options override environment variables and environment variables override 
59
+Currently, you can modify the `docker` command behavior using environment
60
+variables or command-line options. You can also use options within
61
+`config.json` to modify some of the same behavior. When using these
62
+mechanisms, you must keep in mind the order of precedence among them. Command
63
+line options override environment variables and environment variables override
64 64
 properties you specify in a `config.json` file.
65 65
 
66 66
 The `config.json` file stores a JSON encoding of a single `HttpHeaders`
67
-property. The property specifies a set of headers to include in all
68
-messages sent from the Docker client to the daemon. Docker does not try to
69
-interpret or understand these header; it simply puts them into the messages.
70
-Docker does not allow these headers to change any headers it sets for itself.
67
+property. The property specifies a set of headers to include in all messages
68
+sent from the Docker client to the daemon. Docker does not try to interpret or
69
+understand these header; it simply puts them into the messages. Docker does
70
+not allow these headers to change any headers it sets for itself.
71 71
 
72 72
 Following is a sample `config.json` file:
73 73
 
... ...
@@ -78,7 +80,9 @@ Following is a sample `config.json` file:
78 78
     }
79 79
 
80 80
 ## Help
81
-To list the help on any command just execute the command, followed by the `--help` option.
81
+
82
+To list the help on any command just execute the command, followed by the
83
+`--help` option.
82 84
 
83 85
     $ docker run --help
84 86
 
... ...
@@ -98,16 +102,16 @@ you can write `docker run -it --name test busybox sh`.
98 98
 
99 99
 ### Boolean
100 100
 
101
-Boolean options take the form `-d=false`. The value you see in the help text is the
102
-default value which is set if you do **not** specify that flag. If you specify
103
-a Boolean flag without a value, this will set the flag to `true`, irrespective
104
-of the default value.
101
+Boolean options take the form `-d=false`. The value you see in the help text is
102
+the default value which is set if you do **not** specify that flag. If you
103
+specify a Boolean flag without a value, this will set the flag to `true`,
104
+irrespective of the default value.
105 105
 
106
-For example, running `docker run -d` will set the value to `true`, so
107
-your container **will** run in "detached" mode, in the background.
106
+For example, running `docker run -d` will set the value to `true`, so your
107
+container **will** run in "detached" mode, in the background.
108 108
 
109
-Options which default to `true` (e.g., `docker build --rm=true`) can only
110
-be set to the non-default value by explicitly setting them to `false`:
109
+Options which default to `true` (e.g., `docker build --rm=true`) can only be
110
+set to the non-default value by explicitly setting them to `false`:
111 111
 
112 112
     $ docker build --rm=false .
113 113
 
... ...
@@ -119,13 +123,15 @@ for example in these commands:
119 119
     $ docker run -a stdin -a stdout -i -t ubuntu /bin/bash
120 120
     $ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls
121 121
 
122
-Sometimes, multiple options can call for a more complex value string as for `-v`:
122
+Sometimes, multiple options can call for a more complex value string as for
123
+`-v`:
123 124
 
124 125
     $ docker run -v /host:/container example/mysql
125 126
 
126
-> **Note**:
127
-> Do not use the `-t` and `-a stderr` options together due to limitations
128
-> in the `pty` implementation. All `stderr` in `pty` mode simply goes to `stdout`.
127
+> **Note:**
128
+> Do not use the `-t` and `-a stderr` options together due to
129
+> limitations in the `pty` implementation. All `stderr` in `pty` mode
130
+> simply goes to `stdout`.
129 131
 
130 132
 ### Strings and Integers
131 133
 
... ...
@@ -185,10 +191,9 @@ expect an integer, and they can only be specified once.
185 185
 
186 186
 Options with [] may be specified multiple times.
187 187
 
188
-The Docker daemon is the persistent process that manages containers.
189
-Docker uses the same binary for both the daemon and client. To run the
190
-daemon you provide the `-d` flag.
191
-
188
+The Docker daemon is the persistent process that manages containers. Docker
189
+uses the same binary for both the daemon and client. To run the daemon you
190
+provide the `-d` flag.
192 191
 
193 192
 To run the daemon with debug output, use `docker -d -D`.
194 193
 
... ...
@@ -197,30 +202,32 @@ To run the daemon with debug output, use `docker -d -D`.
197 197
 The Docker daemon can listen for [Docker Remote API](/reference/api/docker_remote_api/)
198 198
 requests via three different types of Socket: `unix`, `tcp`, and `fd`.
199 199
 
200
-By default, a `unix` domain socket (or IPC socket) is created at `/var/run/docker.sock`,
201
-requiring either `root` permission, or `docker` group membership.
200
+By default, a `unix` domain socket (or IPC socket) is created at
201
+`/var/run/docker.sock`, requiring either `root` permission, or `docker` group
202
+membership.
202 203
 
203 204
 If you need to access the Docker daemon remotely, you need to enable the `tcp`
204
-Socket. Beware that the default setup provides un-encrypted and un-authenticated
205
-direct access to the Docker daemon - and should be secured either using the
206
-[built in HTTPS encrypted socket](/articles/https/), or by putting a secure web
207
-proxy in front of it. You can listen on port `2375` on all network interfaces
208
-with `-H tcp://0.0.0.0:2375`, or on a particular network interface using its IP
209
-address: `-H tcp://192.168.59.103:2375`. It is conventional to use port `2375`
210
-for un-encrypted, and port `2376` for encrypted communication with the daemon.
211
-
212
-> **Note** If you're using an HTTPS encrypted socket, keep in mind that only TLS1.0
213
-> and greater are supported. Protocols SSLv3 and under are not supported anymore
214
-> for security reasons.
205
+Socket. Beware that the default setup provides un-encrypted and
206
+un-authenticated direct access to the Docker daemon - and should be secured
207
+either using the [built in HTTPS encrypted socket](/articles/https/), or by
208
+putting a secure web proxy in front of it. You can listen on port `2375` on all
209
+network interfaces with `-H tcp://0.0.0.0:2375`, or on a particular network
210
+interface using its IP address: `-H tcp://192.168.59.103:2375`. It is
211
+conventional to use port `2375` for un-encrypted, and port `2376` for encrypted
212
+communication with the daemon.
213
+
214
+> **Note:**
215
+> If you're using an HTTPS encrypted socket, keep in mind that only
216
+> TLS1.0 and greater are supported. Protocols SSLv3 and under are not
217
+> supported anymore for security reasons.
215 218
 
216 219
 On Systemd based systems, you can communicate with the daemon via
217
-[Systemd socket activation](http://0pointer.de/blog/projects/socket-activation.html), use
218
-`docker -d -H fd://`. Using `fd://` will work perfectly for most setups but
220
+[Systemd socket activation](http://0pointer.de/blog/projects/socket-activation.html),
221
+use `docker -d -H fd://`. Using `fd://` will work perfectly for most setups but
219 222
 you can also specify individual sockets: `docker -d -H fd://3`. If the
220
-specified socket activated files aren't found, then Docker will exit. You
221
-can find examples of using Systemd socket activation with Docker and
222
-Systemd in the [Docker source tree](
223
-https://github.com/docker/docker/tree/master/contrib/init/systemd/).
223
+specified socket activated files aren't found, then Docker will exit. You can
224
+find examples of using Systemd socket activation with Docker and Systemd in the
225
+[Docker source tree](https://github.com/docker/docker/tree/master/contrib/init/systemd/).
224 226
 
225 227
 You can configure the Docker daemon to listen to multiple sockets at the same
226 228
 time using multiple `-H` options:
... ...
@@ -228,8 +235,8 @@ time using multiple `-H` options:
228 228
     # listen using the default unix socket, and on 2 specific IP addresses on this host.
229 229
     docker -d -H unix:///var/run/docker.sock -H tcp://192.168.59.106 -H tcp://10.10.10.2
230 230
 
231
-The Docker client will honor the `DOCKER_HOST` environment variable to set
232
-the `-H` flag for the client.
231
+The Docker client will honor the `DOCKER_HOST` environment variable to set the
232
+`-H` flag for the client.
233 233
 
234 234
     $ docker -H tcp://0.0.0.0:2375 ps
235 235
     # or
... ...
@@ -237,8 +244,9 @@ the `-H` flag for the client.
237 237
     $ docker ps
238 238
     # both are equal
239 239
 
240
-Setting the `DOCKER_TLS_VERIFY` environment variable to any value other than the empty
241
-string is equivalent to setting the `--tlsverify` flag. The following are equivalent:
240
+Setting the `DOCKER_TLS_VERIFY` environment variable to any value other than
241
+the empty string is equivalent to setting the `--tlsverify` flag. The following
242
+are equivalent:
242 243
 
243 244
     $ docker --tlsverify ps
244 245
     # or
... ...
@@ -251,37 +259,39 @@ precedence over `HTTP_PROXY`.
251 251
 
252 252
 ### Daemon storage-driver option
253 253
 
254
-The Docker daemon has support for several different image layer storage drivers: `aufs`,
255
-`devicemapper`, `btrfs`, `zfs` and `overlay`.
254
+The Docker daemon has support for several different image layer storage
255
+drivers: `aufs`, `devicemapper`, `btrfs`, `zfs` and `overlay`.
256 256
 
257 257
 The `aufs` driver is the oldest, but is based on a Linux kernel patch-set that
258
-is unlikely to be merged into the main kernel. These are also known to cause some
259
-serious kernel crashes. However, `aufs` is also the only storage driver that allows
260
-containers to share executable and shared library memory, so is a useful choice
261
-when running thousands of containers with the same program or libraries.
258
+is unlikely to be merged into the main kernel. These are also known to cause
259
+some serious kernel crashes. However, `aufs` is also the only storage driver
260
+that allows containers to share executable and shared library memory, so is a
261
+useful choice when running thousands of containers with the same program or
262
+libraries.
262 263
 
263 264
 The `devicemapper` driver uses thin provisioning and Copy on Write (CoW)
264 265
 snapshots. For each devicemapper graph location – typically
265 266
 `/var/lib/docker/devicemapper` – a thin pool is created based on two block
266
-devices, one for data and one for metadata.  By default, these block devices
267
+devices, one for data and one for metadata. By default, these block devices
267 268
 are created automatically by using loopback mounts of automatically created
268 269
 sparse files. Refer to [Storage driver options](#storage-driver-options) below
269 270
 for a way how to customize this setup.
270
-[~jpetazzo/Resizing Docker containers with the Device Mapper plugin](
271
-http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) article
272
-explains how to tune your existing setup without the use of options.
271
+[~jpetazzo/Resizing Docker containers with the Device Mapper plugin](http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/)
272
+article explains how to tune your existing setup without the use of options.
273 273
 
274
-The `btrfs` driver is very fast for `docker build` - but like `devicemapper` does not
275
-share executable memory between devices. Use `docker -d -s btrfs -g /mnt/btrfs_partition`.
274
+The `btrfs` driver is very fast for `docker build` - but like `devicemapper`
275
+does not share executable memory between devices. Use
276
+`docker -d -s btrfs -g /mnt/btrfs_partition`.
276 277
 
277 278
 The `zfs` driver is probably not fast as `btrfs` but has a longer track record
278 279
 on stability. Thanks to `Single Copy ARC` shared blocks between clones will be
279 280
 cached only once. Use `docker -d -s zfs`. To select a different zfs filesystem
280
-set `zfs.fsname` option as described in [Storage driver options](#storage-driver-options):
281
+set `zfs.fsname` option as described in [Storage driver options](#storage-driver-options).
281 282
 
282 283
 The `overlay` is a very fast union filesystem. It is now merged in the main
283
-Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137).
284
-Call `docker -d -s overlay` to use it.
284
+Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137). Call
285
+`docker -d -s overlay` to use it.
286
+
285 287
 > **Note:**
286 288
 > It is currently unsupported on `btrfs` or any Copy on Write filesystem
287 289
 > and should only be used over `ext4` partitions.
... ...
@@ -302,7 +312,7 @@ Currently supported options of `devicemapper`:
302 302
     10 GB of space on the pool. However, the filesystem will use more space for
303 303
     the empty case the larger the device is.
304 304
 
305
-     **Warning**: This value affects the system-wide "base" empty filesystem
305
+     **Warning:** This value affects the system-wide "base" empty filesystem
306 306
      that may already be initialized and inherited by pulled images. Typically,
307 307
      a change to this value will require additional steps to take effect:
308 308
 
... ...
@@ -424,9 +434,9 @@ Currently supported options of `devicemapper`:
424 424
     `devicemapper` driver, run:
425 425
 
426 426
         $ docker info
427
-	[...]
428
-	 Udev Sync Supported: true
429
-	[...]
427
+        [...]
428
+        Udev Sync Supported: true
429
+        [...]
430 430
 
431 431
     When `udev` sync support is `true`, then `devicemapper` and udev can
432 432
     coordinate the activation and deactivation of devices for containers.
... ...
@@ -444,13 +454,15 @@ Currently supported options of `devicemapper`:
444 444
     When this value is `true`, the  `devicemapper` continues and simply warns
445 445
     you the errors are happening.
446 446
 
447
-    > **Note**: The ideal is to pursue a `docker` daemon and environment that
448
-    > does support synchronizing with `udev`. For further discussion on this
447
+    > **Note:**
448
+    > The ideal is to pursue a `docker` daemon and environment that does
449
+    > support synchronizing with `udev`. For further discussion on this
449 450
     > topic, see [docker#4036](https://github.com/docker/docker/issues/4036).
450
-    > Otherwise, set this flag for migrating existing Docker daemons to a
451
-    > daemon with a supported environment.
451
+    > Otherwise, set this flag for migrating existing Docker daemons to
452
+    > a daemon with a supported environment.
452 453
 
453 454
 ### Docker execdriver option
455
+
454 456
 Currently supported options of `zfs`:
455 457
 
456 458
  * `zfs.fsname`
... ...
@@ -461,10 +473,10 @@ Currently supported options of `zfs`:
461 461
 
462 462
     Example use:
463 463
 
464
-       $ docker -d -s zfs --storage-opt zfs.fsname=zroot/docker
464
+        $ docker -d -s zfs --storage-opt zfs.fsname=zroot/docker
465 465
 
466
-The Docker daemon uses a specifically built `libcontainer` execution driver as its
467
-interface to the Linux kernel `namespaces`, `cgroups`, and `SELinux`.
466
+The Docker daemon uses a specifically built `libcontainer` execution driver as
467
+its interface to the Linux kernel `namespaces`, `cgroups`, and `SELinux`.
468 468
 
469 469
 There is still legacy support for the original [LXC userspace tools](
470 470
 https://linuxcontainers.org/) via the `lxc` execution driver, however, this is
... ...
@@ -477,14 +489,14 @@ You can configure the `native` (libcontainer) execdriver using options specified
477 477
 with the `--exec-opt` flag. All the flag's options have the `native` prefix. A
478 478
 single `native.cgroupdriver` option is available.
479 479
 
480
-The `native.cgroupdriver` option specifies the management of the container's 
481
-cgroups. You can specify `cgroupfs` or `systemd`. If you specify `systemd` and 
482
-it is not available, the system uses `cgroupfs`. By default, if no option is 
483
-specified, the execdriver first tries `systemd` and falls back to `cgroupfs`. 
480
+The `native.cgroupdriver` option specifies the management of the container's
481
+cgroups. You can specify `cgroupfs` or `systemd`. If you specify `systemd` and
482
+it is not available, the system uses `cgroupfs`. By default, if no option is
483
+specified, the execdriver first tries `systemd` and falls back to `cgroupfs`.
484 484
 This example sets the execdriver to `cgroupfs`:
485 485
 
486 486
     $ sudo docker -d --exec-opt native.cgroupdriver=cgroupfs
487
-     
487
+
488 488
 Setting this option applies to all containers the daemon launches.
489 489
 
490 490
 ### Daemon DNS options
... ...
@@ -497,75 +509,82 @@ To set the DNS search domain for all Docker containers, use
497 497
 
498 498
 ### Insecure registries
499 499
 
500
-Docker considers a private registry either secure or insecure.
501
-In the rest of this section, *registry* is used for *private registry*, and `myregistry:5000`
500
+Docker considers a private registry either secure or insecure. In the rest of
501
+this section, *registry* is used for *private registry*, and `myregistry:5000`
502 502
 is a placeholder example for a private registry.
503 503
 
504
-A secure registry uses TLS and a copy of its CA certificate is placed on the Docker host at
505
-`/etc/docker/certs.d/myregistry:5000/ca.crt`.
506
-An insecure registry is either not using TLS (i.e., listening on plain text HTTP), or is using
507
-TLS with a CA certificate not known by the Docker daemon. The latter can happen when the
508
-certificate was not found under `/etc/docker/certs.d/myregistry:5000/`, or if the certificate
509
-verification failed (i.e., wrong CA).
510
-
511
-By default, Docker assumes all, but local (see local registries below), registries are secure.
512
-Communicating with an insecure registry is not possible if Docker assumes that registry is secure.
513
-In order to communicate with an insecure registry, the Docker daemon requires `--insecure-registry`
514
-in one of the following two forms:
515
-
516
-* `--insecure-registry myregistry:5000` tells the Docker daemon that myregistry:5000 should be considered insecure.
517
-* `--insecure-registry 10.1.0.0/16` tells the Docker daemon that all registries whose domain resolve to an IP address is part
518
-of the subnet described by the CIDR syntax, should be considered insecure.
519
-
520
-The flag can be used multiple times to allow multiple registries to be marked as insecure.
521
-
522
-If an insecure registry is not marked as insecure, `docker pull`, `docker push`, and `docker search`
523
-will result in an error message prompting the user to either secure or pass the `--insecure-registry`
524
-flag to the Docker daemon as described above.
525
-
526
-Local registries, whose IP address falls in the 127.0.0.0/8 range, are automatically marked as insecure
527
-as of Docker 1.3.2. It is not recommended to rely on this, as it may change in the future.
504
+A secure registry uses TLS and a copy of its CA certificate is placed on the
505
+Docker host at `/etc/docker/certs.d/myregistry:5000/ca.crt`. An insecure
506
+registry is either not using TLS (i.e., listening on plain text HTTP), or is
507
+using TLS with a CA certificate not known by the Docker daemon. The latter can
508
+happen when the certificate was not found under
509
+`/etc/docker/certs.d/myregistry:5000/`, or if the certificate verification
510
+failed (i.e., wrong CA).
511
+
512
+By default, Docker assumes all, but local (see local registries below),
513
+registries are secure. Communicating with an insecure registry is not possible
514
+if Docker assumes that registry is secure. In order to communicate with an
515
+insecure registry, the Docker daemon requires `--insecure-registry` in one of
516
+the following two forms:
517
+
518
+* `--insecure-registry myregistry:5000` tells the Docker daemon that
519
+  myregistry:5000 should be considered insecure.
520
+* `--insecure-registry 10.1.0.0/16` tells the Docker daemon that all registries
521
+  whose domain resolve to an IP address is part of the subnet described by the
522
+  CIDR syntax, should be considered insecure.
523
+
524
+The flag can be used multiple times to allow multiple registries to be marked
525
+as insecure.
526
+
527
+If an insecure registry is not marked as insecure, `docker pull`,
528
+`docker push`, and `docker search` will result in an error message prompting
529
+the user to either secure or pass the `--insecure-registry` flag to the Docker
530
+daemon as described above.
531
+
532
+Local registries, whose IP address falls in the 127.0.0.0/8 range, are
533
+automatically marked as insecure as of Docker 1.3.2. It is not recommended to
534
+rely on this, as it may change in the future.
528 535
 
529 536
 ### Running a Docker daemon behind a HTTPS_PROXY
530 537
 
531
-When running inside a LAN that uses a `HTTPS` proxy, the Docker Hub certificates
532
-will be replaced by the proxy's certificates. These certificates need to be added
533
-to your Docker host's configuration:
538
+When running inside a LAN that uses a `HTTPS` proxy, the Docker Hub
539
+certificates will be replaced by the proxy's certificates. These certificates
540
+need to be added to your Docker host's configuration:
534 541
 
535 542
 1. Install the `ca-certificates` package for your distribution
536 543
 2. Ask your network admin for the proxy's CA certificate and append them to
537 544
    `/etc/pki/tls/certs/ca-bundle.crt`
538 545
 3. Then start your Docker daemon with `HTTPS_PROXY=http://username:password@proxy:port/ docker -d`.
539
-   The `username:` and `password@` are optional - and are only needed if your proxy
540
-   is set up to require authentication.
546
+   The `username:` and `password@` are optional - and are only needed if your
547
+   proxy is set up to require authentication.
541 548
 
542 549
 This will only add the proxy and authentication to the Docker daemon's requests -
543
-your `docker build`s and running containers will need extra configuration to use
544
-the proxy
550
+your `docker build`s and running containers will need extra configuration to
551
+use the proxy
545 552
 
546 553
 ### Default Ulimits
547 554
 
548
-`--default-ulimit` allows you to set the default `ulimit` options to use for all
549
-containers. It takes the same options as `--ulimit` for `docker run`. If these
550
-defaults are not set, `ulimit` settings will be inherited, if not set on
551
-`docker run`, from the Docker daemon. Any `--ulimit` options passed to
552
-`docker run` will overwrite these defaults.
555
+`--default-ulimit` allows you to set the default `ulimit` options to use for
556
+all containers. It takes the same options as `--ulimit` for `docker run`. If
557
+these defaults are not set, `ulimit` settings will be inherited, if not set on
558
+`docker run`, from the Docker daemon. Any `--ulimit` options passed to `docker
559
+run` will overwrite these defaults.
553 560
 
554 561
 ### Miscellaneous options
555 562
 
556
-IP masquerading uses address translation to allow containers without a public IP to talk
557
-to other machines on the Internet. This may interfere with some network topologies and
558
-can be disabled with --ip-masq=false.
563
+IP masquerading uses address translation to allow containers without a public
564
+IP to talk to other machines on the Internet. This may interfere with some
565
+network topologies and can be disabled with --ip-masq=false.
559 566
 
560
-Docker supports softlinks for the Docker data directory
561
-(`/var/lib/docker`) and for `/var/lib/docker/tmp`. The `DOCKER_TMPDIR` and the data directory can be set like this:
567
+Docker supports softlinks for the Docker data directory (`/var/lib/docker`) and
568
+for `/var/lib/docker/tmp`. The `DOCKER_TMPDIR` and the data directory can be
569
+set like this:
562 570
 
563 571
     DOCKER_TMPDIR=/mnt/disk2/tmp /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// > /var/lib/boot2docker/docker.log 2>&1
564 572
     # or
565 573
     export DOCKER_TMPDIR=/mnt/disk2/tmp
566 574
     /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// > /var/lib/boot2docker/docker.log 2>&1
567 575
 
568
-
569 576
 ## attach
570 577
 
571 578
     Usage: docker attach [OPTIONS] CONTAINER
... ...
@@ -577,23 +596,24 @@ Docker supports softlinks for the Docker data directory
577 577
 
578 578
 The `docker attach` command allows you to attach to a running container using
579 579
 the container's ID or name, either to view its ongoing output or to control it
580
-interactively.  You can attach to the same contained process multiple times
580
+interactively. You can attach to the same contained process multiple times
581 581
 simultaneously, screen sharing style, or quickly view the progress of your
582 582
 daemonized process.
583 583
 
584
-You can detach from the container and leave it running with `CTRL-p
585
-CTRL-q` (for a quiet exit) or with `CTRL-c` if `--sig-proxy` is false.
584
+You can detach from the container and leave it running with `CTRL-p CTRL-q`
585
+(for a quiet exit) or with `CTRL-c` if `--sig-proxy` is false.
586 586
 
587
-If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT`
588
-to the container.
587
+If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to the
588
+container.
589 589
 
590
->**Note**: A process running as PID 1 inside a container is treated
591
->specially by Linux: it ignores any signal with the default action.
592
->So, the process will not terminate on `SIGINT` or `SIGTERM` unless it is
593
->coded to do so.
590
+> **Note:**
591
+> A process running as PID 1 inside a container is treated specially by
592
+> Linux: it ignores any signal with the default action. So, the process
593
+> will not terminate on `SIGINT` or `SIGTERM` unless it is coded to do
594
+> so.
594 595
 
595
-It is forbidden to redirect the standard input of a `docker attach` command while
596
-attaching to a tty-enabled container (i.e.: launched with `-t`).
596
+It is forbidden to redirect the standard input of a `docker attach` command
597
+while attaching to a tty-enabled container (i.e.: launched with `-t`).
597 598
 
598 599
 #### Examples
599 600
 
... ...
@@ -632,8 +652,8 @@ attaching to a tty-enabled container (i.e.: launched with `-t`).
632 632
     $ docker ps -a | grep topdemo
633 633
     7998ac8581f9        ubuntu:14.04        "/usr/bin/top -b"   38 seconds ago      Exited (0) 21 seconds ago                          topdemo
634 634
 
635
-And in this second example, you can see the exit code returned by the `bash` process
636
-is returned by the `docker attach` command to its caller too:
635
+And in this second example, you can see the exit code returned by the `bash`
636
+process is returned by the `docker attach` command to its caller too:
637 637
 
638 638
     $ docker run --name test -d -it debian
639 639
     275c44472aebd77c926d4527885bb09f2f6db21d878c75f0a1c212c03d3bcfab
... ...
@@ -666,29 +686,31 @@ is returned by the `docker attach` command to its caller too:
666 666
       --cgroup-parent=""       Optional parent cgroup for the container
667 667
 
668 668
 Builds Docker images from a Dockerfile and a "context". A build's context is
669
-the files located in the specified `PATH` or `URL`.  The build process can
670
-refer to any of the files in the context. For example, your build can use
671
-an [*ADD*](/reference/builder/#add) instruction to reference a file in the
669
+the files located in the specified `PATH` or `URL`. The build process can refer
670
+to any of the files in the context. For example, your build can use an
671
+[*ADD*](/reference/builder/#add) instruction to reference a file in the
672 672
 context.
673 673
 
674
-The `URL` parameter can specify the location of a Git repository;
675
-the repository acts as the build context. The system recursively clones the repository
676
-and its submodules using a `git clone --depth 1 --recursive` command.
677
-This command runs in a temporary directory on your local host.
678
-After the command succeeds, the directory is sent to the Docker daemon as the context.
679
-Local clones give you the ability to access private repositories using
674
+The `URL` parameter can specify the location of a Git repository; the
675
+repository acts as the build context. The system recursively clones the
676
+repository and its submodules using a `git clone --depth 1 --recursive`
677
+command. This command runs in a temporary directory on your local host. After
678
+the command succeeds, the directory is sent to the Docker daemon as the
679
+context. Local clones give you the ability to access private repositories using
680 680
 local user credentials, VPN's, and so forth.
681 681
 
682
-Git URLs accept context configuration in their fragment section, separated by a colon `:`.
683
-The first part represents the reference that Git will check out, this can be either
684
-a branch, a tag, or a commit SHA. The second part represents a subdirectory
685
-inside the repository that will be used as a build context.
682
+Git URLs accept context configuration in their fragment section, separated by a
683
+colon `:`.  The first part represents the reference that Git will check out,
684
+this can be either a branch, a tag, or a commit SHA. The second part represents
685
+a subdirectory inside the repository that will be used as a build context.
686 686
 
687
-For example, run this command to use a directory called `docker` in the branch `container`:
687
+For example, run this command to use a directory called `docker` in the branch
688
+`container`:
688 689
 
689 690
       $ docker build https://github.com/docker/rootfs.git#container:docker
690 691
 
691
-The following table represents all the valid suffixes with their build contexts:
692
+The following table represents all the valid suffixes with their build
693
+contexts:
692 694
 
693 695
 Build Syntax Suffix | Commit Used | Build Context Used
694 696
 --------------------|-------------|-------------------
... ...
@@ -702,55 +724,55 @@ Build Syntax Suffix | Commit Used | Build Context Used
702 702
 `myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder`
703 703
 `myrepo.git#abcdef:myfolder` | `sha1 = abcdef` | `/myfolder`
704 704
 
705
-Instead of specifying a context, you can pass a single Dockerfile in the
706
-`URL` or pipe the file in via `STDIN`.  To pipe a Dockerfile from `STDIN`:
705
+Instead of specifying a context, you can pass a single Dockerfile in the `URL`
706
+or pipe the file in via `STDIN`. To pipe a Dockerfile from `STDIN`:
707 707
 
708
-	docker build - < Dockerfile
708
+    docker build - < Dockerfile
709 709
 
710
-If you use STDIN or specify a `URL`, the system places the contents into a
711
-file called `Dockerfile`, and any `-f`, `--file` option is ignored. In this
710
+If you use STDIN or specify a `URL`, the system places the contents into a file
711
+called `Dockerfile`, and any `-f`, `--file` option is ignored. In this
712 712
 scenario, there is no context.
713 713
 
714
-By default the `docker build` command will look for a `Dockerfile` at the
715
-root of the build context. The `-f`, `--file`, option lets you specify
716
-the path to an alternative file to use instead.  This is useful
717
-in cases where the same set of files are used for multiple builds. The path
718
-must be to a file within the build context. If a relative path is specified
719
-then it must to be relative to the current directory.
714
+By default the `docker build` command will look for a `Dockerfile` at the root
715
+of the build context. The `-f`, `--file`, option lets you specify the path to
716
+an alternative file to use instead. This is useful in cases where the same set
717
+of files are used for multiple builds. The path must be to a file within the
718
+build context. If a relative path is specified then it must to be relative to
719
+the current directory.
720 720
 
721
-In most cases, it's best to put each Dockerfile in an empty directory. Then, add
722
-to that directory only the files needed for building the Dockerfile. To increase
723
-the build's performance, you can exclude files and directories by adding a
724
-`.dockerignore` file to that directory as well. For information on creating one,
725
-see the [.dockerignore file](../../reference/builder/#dockerignore-file).
721
+In most cases, it's best to put each Dockerfile in an empty directory. Then,
722
+add to that directory only the files needed for building the Dockerfile. To
723
+increase the build's performance, you can exclude files and directories by
724
+adding a `.dockerignore` file to that directory as well. For information on
725
+creating one, see the [.dockerignore file](../../reference/builder/#dockerignore-file).
726 726
 
727 727
 If the Docker client loses connection to the daemon, the build is canceled.
728 728
 This happens if you interrupt the Docker client with `ctrl-c` or if the Docker
729 729
 client is killed for any reason.
730 730
 
731
-> **Note:** Currently only the "run" phase of the build can be canceled until
732
-> pull cancelation is implemented).
731
+> **Note:**
732
+> Currently only the "run" phase of the build can be canceled until pull
733
+> cancelation is implemented).
733 734
 
734 735
 ### Return code
735 736
 
736
-On a successful build, a return code of success `0` will be returned.
737
-When the build fails, a non-zero failure code will be returned.
738
-
739
-There should be informational output of the reason for failure output
740
-to `STDERR`:
741
-
742
-```
743
-$ docker build -t fail .
744
-Sending build context to Docker daemon 2.048 kB
745
-Sending build context to Docker daemon
746
-Step 0 : FROM busybox
747
- ---> 4986bf8c1536
748
-Step 1 : RUN exit 13
749
- ---> Running in e26670ec7a0a
750
-INFO[0000] The command [/bin/sh -c exit 13] returned a non-zero code: 13
751
-$ echo $?
752
-1
753
-```
737
+On a successful build, a return code of success `0` will be returned.  When the
738
+build fails, a non-zero failure code will be returned.
739
+
740
+There should be informational output of the reason for failure output to
741
+`STDERR`:
742
+
743
+    $ docker build -t fail .
744
+    Sending build context to Docker daemon 2.048 kB
745
+    Sending build context to Docker daemon
746
+    Step 0 : FROM busybox
747
+     ---> 4986bf8c1536
748
+    Step 1 : RUN exit 13
749
+     ---> Running in e26670ec7a0a
750
+    INFO[0000] The command [/bin/sh -c exit 13] returned a non-zero code: 13
751
+    $ echo $?
752
+    1
753
+
754 754
 See also:
755 755
 
756 756
 [*Dockerfile Reference*](/reference/builder).
... ...
@@ -783,24 +805,19 @@ See also:
783 783
     Removing intermediate container 9c9e81692ae9
784 784
     Removing intermediate container 02071fceb21b
785 785
 
786
-This example specifies that the `PATH` is
787
-`.`, and so all the files in the local directory get
788
-`tar`d and sent to the Docker daemon. The `PATH`
789
-specifies where to find the files for the "context" of the build on the
790
-Docker daemon. Remember that the daemon could be running on a remote
791
-machine and that no parsing of the Dockerfile
792
-happens at the client side (where you're running
793
-`docker build`). That means that *all* the files at
794
-`PATH` get sent, not just the ones listed to
795
-[*ADD*](/reference/builder/#add) in the Dockerfile.
796
-
797
-The transfer of context from the local machine to the Docker daemon is
798
-what the `docker` client means when you see the
799
-"Sending build context" message.
800
-
801
-If you wish to keep the intermediate containers after the build is
802
-complete, you must use `--rm=false`. This does not
803
-affect the build cache.
786
+This example specifies that the `PATH` is `.`, and so all the files in the
787
+local directory get `tar`d and sent to the Docker daemon. The `PATH` specifies
788
+where to find the files for the "context" of the build on the Docker daemon.
789
+Remember that the daemon could be running on a remote machine and that no
790
+parsing of the Dockerfile happens at the client side (where you're running
791
+`docker build`). That means that *all* the files at `PATH` get sent, not just
792
+the ones listed to [*ADD*](/reference/builder/#add) in the Dockerfile.
793
+
794
+The transfer of context from the local machine to the Docker daemon is what the
795
+`docker` client means when you see the "Sending build context" message.
796
+
797
+If you wish to keep the intermediate containers after the build is complete,
798
+you must use `--rm=false`. This does not affect the build cache.
804 799
 
805 800
     $ docker build .
806 801
     Uploading context 18.829 MB
... ...
@@ -829,63 +846,62 @@ uploaded context. The builder reference contains detailed information on
829 829
 
830 830
     $ docker build -t vieux/apache:2.0 .
831 831
 
832
-This will build like the previous example, but it will then tag the
833
-resulting image. The repository name will be `vieux/apache`
834
-and the tag will be `2.0`
832
+This will build like the previous example, but it will then tag the resulting
833
+image. The repository name will be `vieux/apache` and the tag will be `2.0`
835 834
 
836 835
     $ docker build - < Dockerfile
837 836
 
838
-This will read a Dockerfile from `STDIN` without context. Due to the
839
-lack of a context, no contents of any local directory will be sent to
840
-the Docker daemon. Since there is no context, a Dockerfile `ADD` only
841
-works if it refers to a remote URL.
837
+This will read a Dockerfile from `STDIN` without context. Due to the lack of a
838
+context, no contents of any local directory will be sent to the Docker daemon.
839
+Since there is no context, a Dockerfile `ADD` only works if it refers to a
840
+remote URL.
842 841
 
843 842
     $ docker build - < context.tar.gz
844 843
 
845
-This will build an image for a compressed context read from `STDIN`.
846
-Supported formats are: bzip2, gzip and xz.
844
+This will build an image for a compressed context read from `STDIN`.  Supported
845
+formats are: bzip2, gzip and xz.
847 846
 
848 847
     $ docker build github.com/creack/docker-firefox
849 848
 
850
-This will clone the GitHub repository and use the cloned repository as
851
-context. The Dockerfile at the root of the
852
-repository is used as Dockerfile. Note that you
853
-can specify an arbitrary Git repository by using the `git://` or `git@`
849
+This will clone the GitHub repository and use the cloned repository as context.
850
+The Dockerfile at the root of the repository is used as Dockerfile. Note that
851
+you can specify an arbitrary Git repository by using the `git://` or `git@`
854 852
 schema.
855 853
 
856 854
     $ docker build -f Dockerfile.debug .
857 855
 
858
-This will use a file called `Dockerfile.debug` for the build
859
-instructions instead of `Dockerfile`.
856
+This will use a file called `Dockerfile.debug` for the build instructions
857
+instead of `Dockerfile`.
860 858
 
861 859
     $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
862 860
     $ docker build -f dockerfiles/Dockerfile.prod  -t myapp_prod .
863 861
 
864
-The above commands will build the current build context (as specified by
865
-the `.`) twice, once using a debug version of a `Dockerfile` and once using
866
-a production version.
862
+The above commands will build the current build context (as specified by the
863
+`.`) twice, once using a debug version of a `Dockerfile` and once using a
864
+production version.
867 865
 
868 866
     $ cd /home/me/myapp/some/dir/really/deep
869 867
     $ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
870 868
     $ docker build -f ../../../../dockerfiles/debug /home/me/myapp
871 869
 
872
-These two `docker build` commands do the exact same thing. They both
873
-use the contents of the `debug` file instead of looking for a `Dockerfile`
874
-and will use `/home/me/myapp` as the root of the build context. Note that
875
-`debug` is in the directory structure of the build context, regardless of how
876
-you refer to it on the command line.
877
-
878
-> **Note:** `docker build` will return a `no such file or directory` error
879
-> if the file or directory does not exist in the uploaded context. This may
880
-> happen if there is no context, or if you specify a file that is elsewhere
881
-> on the Host system. The context is limited to the current directory (and its
882
-> children) for security reasons, and to ensure repeatable builds on remote
883
-> Docker hosts. This is also the reason why `ADD ../file` will not work.
884
-
885
-When `docker build` is run with the `--cgroup-parent` option the containers used
886
-in the build will be run with the [corresponding `docker run`
887
-flag](/reference/run/#specifying-custom-cgroups). 
870
+These two `docker build` commands do the exact same thing. They both use the
871
+contents of the `debug` file instead of looking for a `Dockerfile` and will use
872
+`/home/me/myapp` as the root of the build context. Note that `debug` is in the
873
+directory structure of the build context, regardless of how you refer to it on
874
+the command line.
888 875
 
876
+> **Note:**
877
+> `docker build` will return a `no such file or directory` error if the
878
+> file or directory does not exist in the uploaded context. This may
879
+> happen if there is no context, or if you specify a file that is
880
+> elsewhere on the Host system. The context is limited to the current
881
+> directory (and its children) for security reasons, and to ensure
882
+> repeatable builds on remote Docker hosts. This is also the reason why
883
+> `ADD ../file` will not work.
884
+
885
+When `docker build` is run with the `--cgroup-parent` option the containers
886
+used in the build will be run with the [corresponding `docker run`
887
+flag](/reference/run/#specifying-custom-cgroups).
889 888
 
890 889
 ## commit
891 890
 
... ...
@@ -898,20 +914,18 @@ flag](/reference/run/#specifying-custom-cgroups).
898 898
       -m, --message=""    Commit message
899 899
       -p, --pause=true    Pause container during commit
900 900
 
901
-It can be useful to commit a container's file changes or settings into a
902
-new image. This allows you debug a container by running an interactive
903
-shell, or to export a working dataset to another server. Generally, it
904
-is better to use Dockerfiles to manage your images in a documented and
905
-maintainable way.
901
+It can be useful to commit a container's file changes or settings into a new
902
+image. This allows you debug a container by running an interactive shell, or to
903
+export a working dataset to another server. Generally, it is better to use
904
+Dockerfiles to manage your images in a documented and maintainable way.
906 905
 
907 906
 By default, the container being committed and its processes will be paused
908
-while the image is committed. This reduces the likelihood of
909
-encountering data corruption during the process of creating the commit.
910
-If this behavior is undesired, set the 'p' option to false.
907
+while the image is committed. This reduces the likelihood of encountering data
908
+corruption during the process of creating the commit.  If this behavior is
909
+undesired, set the 'p' option to false.
911 910
 
912
-The `--change` option will apply `Dockerfile` instructions to the image
913
-that is created.
914
-Supported `Dockerfile` instructions:
911
+The `--change` option will apply `Dockerfile` instructions to the image that is
912
+created.  Supported `Dockerfile` instructions:
915 913
 `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
916 914
 
917 915
 #### Commit a container
... ...
@@ -942,7 +956,7 @@ Supported `Dockerfile` instructions:
942 942
 ## cp
943 943
 
944 944
 Copy files or folders from a container's filesystem to the directory on the
945
-host.  Use '-' to write the data as a tar file to `STDOUT`. `CONTAINER:PATH` is
945
+host. Use '-' to write the data as a tar file to `STDOUT`. `CONTAINER:PATH` is
946 946
 relative to the root of the container's filesystem.
947 947
 
948 948
     Usage: docker cp CONTAINER:PATH HOSTDIR|-
... ...
@@ -1004,15 +1018,14 @@ Creates a new container.
1004 1004
       --volumes-from=[]          Mount volumes from the specified container(s)
1005 1005
       -w, --workdir=""           Working directory inside the container
1006 1006
 
1007
-The `docker create` command creates a writeable container layer over
1008
-the specified image and prepares it for running the specified command.
1009
-The container ID is then printed to `STDOUT`.
1010
-This is similar to `docker run -d` except the container is never started.
1011
-You can then use the `docker start <container_id>` command to start the
1012
-container at any point.
1007
+The `docker create` command creates a writeable container layer over the
1008
+specified image and prepares it for running the specified command.  The
1009
+container ID is then printed to `STDOUT`.  This is similar to `docker run -d`
1010
+except the container is never started.  You can then use the `docker start
1011
+<container_id>` command to start the container at any point.
1013 1012
 
1014
-This is useful when you want to set up a container configuration ahead
1015
-of time so that it is ready to start when you need it.
1013
+This is useful when you want to set up a container configuration ahead of time
1014
+so that it is ready to start when you need it.
1016 1015
 
1017 1016
 Please see the [run command](#run) section and the [Docker run reference](
1018 1017
 /reference/run/) for more details.
... ...
@@ -1024,9 +1037,9 @@ Please see the [run command](#run) section and the [Docker run reference](
1024 1024
     $ docker start -a -i 6d8af538ec5
1025 1025
     bash-4.2#
1026 1026
 
1027
-As of v1.4.0 container volumes are initialized during the `docker create`
1028
-phase (i.e., `docker run` too). For example, this allows you to `create` the
1029
-`data` volume container, and then use it from another container:
1027
+As of v1.4.0 container volumes are initialized during the `docker create` phase
1028
+(i.e., `docker run` too). For example, this allows you to `create` the `data`
1029
+volume container, and then use it from another container:
1030 1030
 
1031 1031
     $ docker create -v /data --name data ubuntu
1032 1032
     240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57
... ...
@@ -1035,8 +1048,8 @@ phase (i.e., `docker run` too). For example, this allows you to `create` the
1035 1035
     drwxr-xr-x  2 root root 4096 Dec  5 04:10 .
1036 1036
     drwxr-xr-x 48 root root 4096 Dec  5 04:11 ..
1037 1037
 
1038
-Similarly, `create` a host directory bind mounted volume container, which
1039
-can then be used from the subsequent container:
1038
+Similarly, `create` a host directory bind mounted volume container, which can
1039
+then be used from the subsequent container:
1040 1040
 
1041 1041
     $ docker create -v /home/docker:/docker --name docker ubuntu
1042 1042
     9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03
... ...
@@ -1063,9 +1076,9 @@ List the changed files and directories in a container᾿s filesystem
1063 1063
 
1064 1064
 There are 3 events that are listed in the `diff`:
1065 1065
 
1066
-1.  `A` - Add
1067
-2.  `D` - Delete
1068
-3.  `C` - Change
1066
+1. `A` - Add
1067
+2. `D` - Delete
1068
+3. `C` - Change
1069 1069
 
1070 1070
 For example:
1071 1071
 
... ...
@@ -1103,16 +1116,17 @@ and Docker images will report:
1103 1103
 
1104 1104
 #### Filtering
1105 1105
 
1106
-The filtering flag (`-f` or `--filter`) format is of "key=value". If you would like to use
1107
-multiple filters, pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
1106
+The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
1107
+like to use multiple filters, pass multiple flags (e.g., `--filter "foo=bar"
1108
+--filter "bif=baz"`)
1108 1109
 
1109 1110
 Using the same filter multiple times will be handled as a *OR*; for example
1110
-`--filter container=588a23dac085 --filter container=a8f7720b8c22` will display events for
1111
-container 588a23dac085 *OR* container a8f7720b8c22
1111
+`--filter container=588a23dac085 --filter container=a8f7720b8c22` will display
1112
+events for container 588a23dac085 *OR* container a8f7720b8c22
1112 1113
 
1113 1114
 Using multiple filters will be handled as a *AND*; for example
1114
-`--filter container=588a23dac085 --filter event=start` will display events for container
1115
-container 588a23dac085 *AND* the event type is *start*
1115
+`--filter container=588a23dac085 --filter event=start` will display events for
1116
+container container 588a23dac085 *AND* the event type is *start*
1116 1117
 
1117 1118
 The currently supported filters are:
1118 1119
 
... ...
@@ -1207,7 +1221,8 @@ You'll need two shells for this example.
1207 1207
 The `docker exec` command runs a new command in a running container.
1208 1208
 
1209 1209
 The command started using `docker exec` only runs while the container's primary
1210
-process (`PID 1`) is running, and it is not restarted if the container is restarted.
1210
+process (`PID 1`) is running, and it is not restarted if the container is
1211
+restarted.
1211 1212
 
1212 1213
 If the container is paused, then the `docker exec` command will fail with an error:
1213 1214
 
... ...
@@ -1255,10 +1270,10 @@ This will create a new Bash session in the container `ubuntu_bash`.
1255 1255
     $ docker export --output="latest.tar" red_panda
1256 1256
 
1257 1257
 > **Note:**
1258
-> `docker export` does not export the contents of volumes associated with the
1259
-> container. If a volume is mounted on top of an existing directory in the
1260
-> container, `docker export` will export the contents of the *underlying*
1261
-> directory, not the contents of the volume.
1258
+> `docker export` does not export the contents of volumes associated
1259
+> with the container. If a volume is mounted on top of an existing
1260
+> directory in the container, `docker export` will export the contents
1261
+> of the *underlying* directory, not the contents of the volume.
1262 1262
 >
1263 1263
 > Refer to [Backup, restore, or migrate data volumes](/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes)
1264 1264
 > in the user guide for examples on exporting data in a volume.
... ...
@@ -1289,8 +1304,8 @@ To see how the `docker:apache` image was added to a container's base image:
1289 1289
     $ docker history docker:scm
1290 1290
     IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
1291 1291
     2ac9d1098bf1        3 months ago        /bin/bash                                       241.4 MB            Added Apache to Fedora base image
1292
-    88b42ffd1f7c        5 months ago        /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7   373.7 MB            
1293
-    c69cab00d6ef        5 months ago        /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B                 
1292
+    88b42ffd1f7c        5 months ago        /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7   373.7 MB
1293
+    c69cab00d6ef        5 months ago        /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar   0 B
1294 1294
     511136ea3c5a        19 months ago                                                       0 B                 Imported from -
1295 1295
 
1296 1296
 
... ...
@@ -1666,7 +1681,7 @@ can be combined with the `--follow` and `--tail` options.
1666 1666
     Pause all processes within a container
1667 1667
 
1668 1668
 The `docker pause` command uses the cgroups freezer to suspend all processes in
1669
-a container.  Traditionally, when suspending a process the `SIGSTOP` signal is
1669
+a container. Traditionally, when suspending a process the `SIGSTOP` signal is
1670 1670
 used, which is observable by the process being suspended. With the cgroups freezer
1671 1671
 the process is unaware, and unable to capture, that it is being suspended,
1672 1672
 and subsequently resumed.
... ...
@@ -2054,7 +2069,7 @@ folder before starting your container.
2054 2054
     $ docker run --read-only -v /icanwrite busybox touch /icanwrite here
2055 2055
 
2056 2056
 Volumes can be used in combination with `--read-only` to control where
2057
-a container writes files.  The `--read-only` flag mounts the container's root
2057
+a container writes files. The `--read-only` flag mounts the container's root
2058 2058
 filesystem as read only prohibiting writes to locations other than the
2059 2059
 specified volumes for the container.
2060 2060
 
... ...
@@ -2194,8 +2209,9 @@ containers to read/write content. The 'Z' option tells Docker to label the
2194 2194
 content with a private unshared label. Private volumes can only be used by the
2195 2195
 current container.
2196 2196
 
2197
-The `-a` flag tells `docker run` to bind to the container's `STDIN`, `STDOUT` or
2198
-`STDERR`. This makes it possible to manipulate the output and input as needed.
2197
+The `-a` flag tells `docker run` to bind to the container's `STDIN`, `STDOUT`
2198
+or `STDERR`. This makes it possible to manipulate the output and input as
2199
+needed.
2199 2200
 
2200 2201
     $ echo "test" | docker run -i -a stdin ubuntu cat -
2201 2202
 
... ...
@@ -2222,7 +2238,7 @@ retrieve the container's ID once the container has finished running.
2222 2222
     crw-rw-rw- 1 root root 1, 5 Feb  9 16:05 /dev/nulo
2223 2223
 
2224 2224
 It is often necessary to directly expose devices to a container. The `--device`
2225
-option enables that.  For example, a specific block storage device or loop
2225
+option enables that. For example, a specific block storage device or loop
2226 2226
 device or audio device can be added to an otherwise unprivileged container
2227 2227
 (without the `--privileged` flag) and have the application directly access it.
2228 2228
 
... ...
@@ -2231,26 +2247,25 @@ This can be overridden using a third `:rwm` set of options to each `--device`
2231 2231
 flag:
2232 2232
 
2233 2233
 
2234
-```
2235
-	$ docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk  /dev/xvdc
2234
+    $ docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk  /dev/xvdc
2236 2235
 
2237
-	Command (m for help): q
2238
-	$ docker run --device=/dev/sda:/dev/xvdc:ro --rm -it ubuntu fdisk  /dev/xvdc
2239
-	You will not be able to write the partition table.
2236
+    Command (m for help): q
2237
+    $ docker run --device=/dev/sda:/dev/xvdc:ro --rm -it ubuntu fdisk  /dev/xvdc
2238
+    You will not be able to write the partition table.
2240 2239
 
2241
-	Command (m for help): q
2240
+    Command (m for help): q
2242 2241
 
2243
-	$ docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk  /dev/xvdc
2242
+    $ docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk  /dev/xvdc
2244 2243
 
2245
-	Command (m for help): q
2244
+    Command (m for help): q
2246 2245
 
2247
-	$ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk  /dev/xvdc
2248
-	fdisk: unable to open /dev/xvdc: Operation not permitted
2249
-```
2246
+    $ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk  /dev/xvdc
2247
+    fdisk: unable to open /dev/xvdc: Operation not permitted
2250 2248
 
2251 2249
 > **Note:**
2252
-> `--device` cannot be safely used with ephemeral devices. Block devices that
2253
-> may be removed should not be added to untrusted containers with `--device`.
2250
+> `--device` cannot be safely used with ephemeral devices. Block devices
2251
+> that may be removed should not be added to untrusted containers with
2252
+> `--device`.
2254 2253
 
2255 2254
 **A complete example:**
2256 2255
 
... ...
@@ -2333,15 +2348,15 @@ This will run the `redis` container with a restart policy of **always**
2333 2333
 so that if the container exits, Docker will restart it.
2334 2334
 
2335 2335
 More detailed information on restart policies can be found in the
2336
-[Restart Policies (--restart)](/reference/run/#restart-policies-restart) section
2337
-of the Docker run reference page.
2336
+[Restart Policies (--restart)](/reference/run/#restart-policies-restart)
2337
+section of the Docker run reference page.
2338 2338
 
2339 2339
 ### Adding entries to a container hosts file
2340 2340
 
2341
-You can add other hosts into a container's `/etc/hosts` file by using one or more
2342
-`--add-host` flags. This example adds a static address for a host named `docker`:
2341
+You can add other hosts into a container's `/etc/hosts` file by using one or
2342
+more `--add-host` flags. This example adds a static address for a host named
2343
+`docker`:
2343 2344
 
2344
-```
2345 2345
     $ docker run --add-host=docker:10.180.0.1 --rm -it debian
2346 2346
     $$ ping docker
2347 2347
     PING docker (10.180.0.1): 48 data bytes
... ...
@@ -2350,10 +2365,9 @@ You can add other hosts into a container's `/etc/hosts` file by using one or mor
2350 2350
     ^C--- docker ping statistics ---
2351 2351
     2 packets transmitted, 2 packets received, 0% packet loss
2352 2352
     round-trip min/avg/max/stddev = 7.600/19.152/30.705/11.553 ms
2353
-```
2354 2353
 
2355 2354
 Sometimes you need to connect to the Docker host from within your
2356
-container.  To enable this, pass the Docker host's IP address to
2355
+container. To enable this, pass the Docker host's IP address to
2357 2356
 the container using the `--add-host` flag. To find the host's address,
2358 2357
 use the `ip addr show` command.
2359 2358
 
... ...
@@ -2375,17 +2389,15 @@ available in the default container, you can set these using the `--ulimit` flag.
2375 2375
 `--ulimit` is specified with a soft and hard limit as such:
2376 2376
 `<type>=<soft limit>[:<hard limit>]`, for example:
2377 2377
 
2378
-```
2379 2378
     $ docker run --ulimit nofile=1024:1024 --rm debian ulimit -n
2380 2379
     1024
2381
-```
2382 2380
 
2383
->**Note:**
2384
-> If you do not provide a `hard limit`, the `soft limit` will be used for both
2385
-values. If no `ulimits` are set, they will be inherited from the default `ulimits`
2386
-set on the daemon.
2387
-> `as` option is disabled now. In other words, the following script is not supported:
2388
->   `$ docker run -it --ulimit as=1024 fedora /bin/bash`
2381
+> **Note:**
2382
+> If you do not provide a `hard limit`, the `soft limit` will be used
2383
+> for both values. If no `ulimits` are set, they will be inherited from
2384
+> the default `ulimits` set on the daemon.  `as` option is disabled now.
2385
+> In other words, the following script is not supported:
2386
+> `$ docker run -it --ulimit as=1024 fedora /bin/bash`
2389 2387
 
2390 2388
 ## save
2391 2389
 
... ...
@@ -2463,19 +2475,20 @@ The `docker stats` command will only return a live stream of data for running
2463 2463
 containers. Stopped containers will not return any data.
2464 2464
 
2465 2465
 > **Note:**
2466
-> If you want more detailed information about a container's resource usage, use the API endpoint.
2466
+> If you want more detailed information about a container's resource
2467
+> usage, use the API endpoint.
2467 2468
 
2468 2469
 ## stop
2469 2470
 
2470 2471
     Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
2471 2472
 
2472 2473
     Stop a running container by sending SIGTERM and then SIGKILL after a
2473
-	grace period
2474
+    grace period
2474 2475
 
2475 2476
       -t, --time=10      Seconds to wait for stop before killing it
2476 2477
 
2477
-The main process inside the container will receive `SIGTERM`, and after a
2478
-grace period, `SIGKILL`.
2478
+The main process inside the container will receive `SIGTERM`, and after a grace
2479
+period, `SIGKILL`.
2479 2480
 
2480 2481
 ## tag
2481 2482
 
... ...
@@ -2485,9 +2498,8 @@ grace period, `SIGKILL`.
2485 2485
 
2486 2486
       -f, --force=false    Force
2487 2487
 
2488
-You can group your images together using names and tags, and then upload
2489
-them to [*Share Images via Repositories*](
2490
-/userguide/dockerrepos/#contributing-to-docker-hub).
2488
+You can group your images together using names and tags, and then upload them
2489
+to [*Share Images via Repositories*](/userguide/dockerrepos/#contributing-to-docker-hub).
2491 2490
 
2492 2491
 ## top
2493 2492
 
... ...
@@ -2514,8 +2526,8 @@ for further details.
2514 2514
 
2515 2515
     Show the Docker version information.
2516 2516
 
2517
-Show the Docker version, API version, Git commit, Go version and OS/architecture
2518
-of both Docker client and daemon. Example use:
2517
+Show the Docker version, API version, Git commit, Go version and
2518
+OS/architecture of both Docker client and daemon. Example use:
2519 2519
 
2520 2520
     $ docker version
2521 2521
     Client version: 1.5.0
... ...
@@ -2535,4 +2547,3 @@ of both Docker client and daemon. Example use:
2535 2535
     Usage: docker wait CONTAINER [CONTAINER...]
2536 2536
 
2537 2537
     Block until a container stops, then print its exit code.
2538
-