diff --git a/components/cli/docs/reference/commandline/attach.md b/components/cli/docs/reference/commandline/attach.md index 58286ad8aa..caba2f9770 100644 --- a/components/cli/docs/reference/commandline/attach.md +++ b/components/cli/docs/reference/commandline/attach.md @@ -44,8 +44,8 @@ from different sessions on the Docker host. To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to -the container. You can detach from a container and leave it running using the - `CTRL-p CTRL-q` key sequence. +the container. If the container was run with `-i` and `-t`, you can detach from +a container and leave it running using the `CTRL-p CTRL-q` key sequence. > **Note:** > A process running as PID 1 inside a container is treated specially by diff --git a/components/cli/docs/reference/commandline/build.md b/components/cli/docs/reference/commandline/build.md index a2f4763f84..21220c631d 100644 --- a/components/cli/docs/reference/commandline/build.md +++ b/components/cli/docs/reference/commandline/build.md @@ -504,13 +504,13 @@ stable. Squashing layers can be beneficial if your Dockerfile produces multiple layers -modifying the same files, for example, file that are created in one step, and +modifying the same files, for example, files that are created in one step, and removed in another step. For other use-cases, squashing images may actually have a negative impact on performance; when pulling an image consisting of multiple layers, layers can be pulled in parallel, and allows sharing layers between images (saving space). -For most use cases, multi-stage are a better alternative, as they give more +For most use cases, multi-stage builds are a better alternative, as they give more fine-grained control over your build, and can take advantage of future optimizations in the builder. Refer to the [use multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) section in the userguide for more information. @@ -531,7 +531,7 @@ The `--squash` option has a number of known limitations: downloading a single layer cannot be parallelized. - When attempting to squash an image that does not make changes to the filesystem (for example, the Dockerfile only contains `ENV` instructions), - the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823) + the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)). #### Prerequisites diff --git a/components/cli/docs/reference/commandline/dockerd.md b/components/cli/docs/reference/commandline/dockerd.md index cb3a87eee0..f177f15d94 100644 --- a/components/cli/docs/reference/commandline/dockerd.md +++ b/components/cli/docs/reference/commandline/dockerd.md @@ -303,7 +303,7 @@ the same file can share a single page cache entry (or entries), it makes > **Note**: As promising as `overlay` is, the feature is still quite young and > should not be used in production. Most notably, using `overlay` can cause > excessive inode consumption (especially as the number of images grows), as -> well as > being incompatible with the use of RPMs. +> well as being incompatible with the use of RPMs. The `overlay2` uses the same fast union filesystem but takes advantage of [additional features](https://lkml.org/lkml/2015/2/11/106) added in Linux @@ -1231,10 +1231,14 @@ The `--metrics-addr` option takes a tcp address to serve the metrics API. This feature is still experimental, therefore, the daemon must be running in experimental mode for this feature to work. -To serve the metrics API on localhost:1337 you would specify `--metrics-addr 127.0.0.1:1337` -allowing you to make requests on the API at `127.0.0.1:1337/metrics` to receive metrics in the +To serve the metrics API on `localhost:9323` you would specify `--metrics-addr 127.0.0.1:9323`, +allowing you to make requests on the API at `127.0.0.1:9323/metrics` to receive metrics in the [prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) format. +Port `9323` is the [default port associated with Docker +metrics](https://github.com/prometheus/prometheus/wiki/Default-port-allocations) +to avoid collisions with other prometheus exporters and services. + If you are running a prometheus server you can add this address to your scrape configs to have prometheus collect metrics on Docker. For more information on prometheus you can view the website [here](https://prometheus.io/). @@ -1243,7 +1247,7 @@ on prometheus you can view the website [here](https://prometheus.io/). scrape_configs: - job_name: 'docker' static_configs: - - targets: ['127.0.0.1:1337'] + - targets: ['127.0.0.1:9323'] ``` Please note that this feature is still marked as experimental as metrics and metric @@ -1308,7 +1312,7 @@ This is a full example of the allowed configuration options on Linux: "log-driver": "json-file", "log-opts": { "max-size": "10m", - "max-files":"5", + "max-file":"5", "labels": "somelabel", "env": "os,customer" }, diff --git a/components/cli/docs/reference/commandline/manifest.md b/components/cli/docs/reference/commandline/manifest.md index ce31a30d69..13beb9cdde 100644 --- a/components/cli/docs/reference/commandline/manifest.md +++ b/components/cli/docs/reference/commandline/manifest.md @@ -177,7 +177,7 @@ This is similar to tagging an image and pushing it to a foreign registry. After you have created your local copy of the manifest list, you may optionally `annotate` it. Annotations allowed are the architecture and operating system (overriding the image's current values), -os features, and an archictecure variant. +os features, and an architecture variant. Finally, you need to `push` your manifest list to the desired registry. Below are descriptions of these three commands, and an example putting them all together. @@ -270,5 +270,5 @@ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1 $ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag ``` -Note that the `--insecure` flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the `--insecure` flag if you are performaing a `docker manifest inspect` on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a `docker pull`. +Note that the `--insecure` flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the `--insecure` flag if you are performing a `docker manifest inspect` on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a `docker pull`. diff --git a/components/cli/docs/reference/commandline/node_ps.md b/components/cli/docs/reference/commandline/node_ps.md index 30d37f0823..81e3ca18d7 100644 --- a/components/cli/docs/reference/commandline/node_ps.md +++ b/components/cli/docs/reference/commandline/node_ps.md @@ -116,6 +116,7 @@ Valid placeholders for the Go template are listed below: Placeholder | Description ----------------|------------------------------------------------------------------------------------------ +`.ID` | Task ID `.Name` | Task name `.Image` | Task image `.Node` | Node ID diff --git a/components/cli/docs/reference/commandline/rmi.md b/components/cli/docs/reference/commandline/rmi.md index 66f194aba7..cc4f2f4111 100644 --- a/components/cli/docs/reference/commandline/rmi.md +++ b/components/cli/docs/reference/commandline/rmi.md @@ -26,6 +26,17 @@ Options: --no-prune Do not delete untagged parents ``` +## Description + +Removes (and un-tags) one or more images from the host node. If an image has +multiple tags, using this command with the tag as a parameter only removes the +tag. If the tag is the only one for the image, both the image and the tag are +removed. + +This does not remove images from a registry. You cannot remove an image of a +running container unless you use the `-f` option. To see all images on a host +use the [`docker image ls`](images.md) command. + ## Examples You can remove an image using its short or long ID, its tag, or its digest. If diff --git a/components/cli/docs/reference/commandline/run.md b/components/cli/docs/reference/commandline/run.md index 08b9f18d68..6a2630bd19 100644 --- a/components/cli/docs/reference/commandline/run.md +++ b/components/cli/docs/reference/commandline/run.md @@ -717,15 +717,15 @@ $ docker run -d --isolation default busybox top On Windows, `--isolation` can take one of these values: -| Value | Description | -|:----------|:-------------------------------------------------------------------------------------------| -| `default` | Use the value specified by the Docker daemon's `--exec-opt` or system default (see below). | -| `process` | Shared-kernel namespace isolation (not supported on Windows client operating systems). | -| `hyperv` | Hyper-V hypervisor partition-based isolation. | +| Value | Description | +|:----------|:------------------------------------------------------------------------------------------------------------------| +| `default` | Use the value specified by the Docker daemon's `--exec-opt` or system default (see below). | +| `process` | Shared-kernel namespace isolation (not supported on Windows client operating systems older than Windows 10 1809). | +| `hyperv` | Hyper-V hypervisor partition-based isolation. | -The default isolation on Windows server operating systems is `process`. The default (and only supported) +The default isolation on Windows server operating systems is `process`. The default isolation on Windows client operating systems is `hyperv`. An attempt to start a container on a client -operating system with `--isolation process` will fail. +operating system older than Windows 10 1809 with `--isolation process` will fail. On Windows server, assuming the default configuration, these commands are equivalent and result in `process` isolation: diff --git a/components/cli/docs/reference/commandline/service_create.md b/components/cli/docs/reference/commandline/service_create.md index 8fdb5297a1..bc68128d0c 100644 --- a/components/cli/docs/reference/commandline/service_create.md +++ b/components/cli/docs/reference/commandline/service_create.md @@ -219,7 +219,7 @@ tutorial](https://docs.docker.com/engine/swarm/swarm-tutorial/rolling-update/). ### Set environment variables (-e, --env) -This sets an environmental variable for all tasks in a service. For example: +This sets an environment variable for all tasks in a service. For example: ```bash $ docker service create \ diff --git a/components/cli/docs/reference/commandline/stats.md b/components/cli/docs/reference/commandline/stats.md index 702e99a92c..44334254c3 100644 --- a/components/cli/docs/reference/commandline/stats.md +++ b/components/cli/docs/reference/commandline/stats.md @@ -171,5 +171,5 @@ On Windows: "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}" -> **Note**: On Docker 17.09 and older, the `{{.Container}}` column was used, in -> stead of `{{.ID}}\t{{.Name}}`. +> **Note**: On Docker 17.09 and older, the `{{.Container}}` column was used, +> instead of `{{.ID}}\t{{.Name}}`. diff --git a/components/cli/man/src/container/exec.md b/components/cli/man/src/container/exec.md index 033db426b8..c597817eea 100644 --- a/components/cli/man/src/container/exec.md +++ b/components/cli/man/src/container/exec.md @@ -23,3 +23,29 @@ the same capabilities as the container, which may be limited. Set --user [user | user:group | uid | uid:gid | user:gid | uid:group ] Without this argument the command will be run as root in the container. + +# Exit Status + +The exit code from `docker exec` gives information about why the container +failed to exec or why it exited. When `docker exec` exits with a non-zero code, +the exit codes follow the `chroot` standard, see below: + +**_126_** if the **_contained command_** cannot be invoked + + $ docker exec busybox /etc; echo $? + # exec: "/etc": permission denied + docker: Error response from daemon: Contained command could not be invoked + 126 + +**_127_** if the **_contained command_** cannot be found + + $ docker exec busybox foo; echo $? + # exec: "foo": executable file not found in $PATH + docker: Error response from daemon: Contained command not found or does not exist + 127 + +**_Exit code_** of **_contained command_** otherwise + + $ docker exec busybox /bin/sh -c 'exit 3' + # 3 + diff --git a/components/cli/man/src/image/rm.md b/components/cli/man/src/image/rm.md index 348d45402e..e06a9387ac 100644 --- a/components/cli/man/src/image/rm.md +++ b/components/cli/man/src/image/rm.md @@ -1,6 +1,11 @@ -Removes one or more images from the host node. This does not remove images from -a registry. You cannot remove an image of a running container unless you use the -**-f** option. To see all images on a host use the **docker image ls** command. +Removes (and un-tags) one or more images from the host node. If an image has +multiple tags, using this command with the tag as a parameter only removes the +tag. If the tag is the only one for the image, both the image and the tag are +removed. + +This does not remove images from a registry. You cannot remove an image of a +running container unless you use the **-f** option. To see all images on a host +use the **docker image ls** command. # EXAMPLES