From 96eb0888fa6be0f087c1b177134255a104bfdf83 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 15:43:08 +0200 Subject: [PATCH] reference docs: fix broken links and markdown touch-ups - fix various broken links - fix incorrect anchors - updated links for content that moved, so that no redirect to the new location is needed. - touched-up Markdown; - re-format some JSON output - add blank line betweeen command and command output - format "note" blocks Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 8919c228bdcd8bd366dee9589d22001c856e9e76) Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/build.md | 4 +- docs/reference/commandline/cp.md | 2 +- docs/reference/commandline/import.md | 7 +- docs/reference/commandline/kill.md | 4 +- docs/reference/commandline/logs.md | 2 +- docs/reference/commandline/manifest.md | 7 +- docs/reference/commandline/network.md | 2 +- .../commandline/network_disconnect.md | 2 +- docs/reference/commandline/network_prune.md | 2 +- docs/reference/commandline/network_rm.md | 2 +- docs/reference/commandline/node_ls.md | 10 +- docs/reference/commandline/node_update.md | 2 +- docs/reference/commandline/plugin_inspect.md | 10 +- docs/reference/commandline/plugin_ls.md | 4 +- docs/reference/commandline/plugin_set.md | 74 ++--- docs/reference/commandline/port.md | 9 + docs/reference/commandline/ps.md | 3 + docs/reference/commandline/pull.md | 14 +- docs/reference/commandline/rm.md | 21 +- docs/reference/commandline/run.md | 69 ++-- docs/reference/commandline/search.md | 15 +- docs/reference/commandline/secret.md | 2 +- docs/reference/commandline/secret_ls.md | 6 +- docs/reference/commandline/secret_rm.md | 6 +- docs/reference/commandline/service_create.md | 47 +-- docs/reference/commandline/service_inspect.md | 82 ++--- docs/reference/commandline/service_logs.md | 6 +- docs/reference/commandline/service_rm.md | 6 +- docs/reference/commandline/service_update.md | 13 +- docs/reference/commandline/stack_services.md | 2 +- docs/reference/commandline/stats.md | 26 +- docs/reference/commandline/swarm_ca.md | 4 +- docs/reference/commandline/swarm_init.md | 6 +- .../reference/commandline/swarm_join-token.md | 5 +- docs/reference/commandline/swarm_join.md | 4 +- docs/reference/commandline/swarm_leave.md | 6 +- .../reference/commandline/swarm_unlock-key.md | 4 +- docs/reference/commandline/swarm_unlock.md | 4 +- docs/reference/commandline/swarm_update.md | 4 +- docs/reference/commandline/system_df.md | 5 +- docs/reference/commandline/system_events.md | 20 +- docs/reference/commandline/system_prune.md | 14 +- docs/reference/commandline/tag.md | 2 +- docs/reference/commandline/trust_inspect.md | 311 +++++++++--------- docs/reference/commandline/trust_revoke.md | 8 +- docs/reference/commandline/trust_sign.md | 24 +- .../reference/commandline/trust_signer_add.md | 36 +- .../commandline/trust_signer_remove.md | 20 +- docs/reference/commandline/update.md | 6 +- docs/reference/commandline/version.md | 40 ++- docs/reference/commandline/volume.md | 4 +- docs/reference/commandline/volume_create.md | 2 +- docs/reference/commandline/volume_inspect.md | 23 +- docs/reference/commandline/volume_ls.md | 10 +- docs/reference/commandline/volume_prune.md | 2 +- docs/reference/commandline/volume_rm.md | 7 +- docs/reference/commandline/wait.md | 6 +- 57 files changed, 571 insertions(+), 467 deletions(-) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 2cdb744cde..aaede17d78 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -396,13 +396,13 @@ the command line. When `docker build` is run with the `--cgroup-parent` option the containers used in the build will be run with the [corresponding `docker run` -flag](../run.md#specifying-custom-cgroups). +flag](../run.md#specify-custom-cgroups). ### Set ulimits in container (--ulimit) Using the `--ulimit` option with `docker build` will cause each build step's container to be started using those [`--ulimit` -flag values](./run.md#set-ulimits-in-container-ulimit). +flag values](run.md#set-ulimits-in-container---ulimit). ### Set build-time variables (--build-arg) diff --git a/docs/reference/commandline/cp.md b/docs/reference/commandline/cp.md index f5c0a69dcf..839ce0022f 100644 --- a/docs/reference/commandline/cp.md +++ b/docs/reference/commandline/cp.md @@ -90,7 +90,7 @@ you must be explicit with a relative or absolute path, for example: `/path/to/file:name.txt` or `./file:name.txt` It is not possible to copy certain system files such as resources under -`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs-tmpfs), and mounts created by +`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs---tmpfs), and mounts created by the user in the container. However, you can still copy such files by manually running `tar` in `docker exec`. Both of the following examples do the same thing in different ways (consider `SRC_PATH` and `DEST_PATH` are directories): diff --git a/docs/reference/commandline/import.md b/docs/reference/commandline/import.md index f18b72b94a..686776ccb2 100644 --- a/docs/reference/commandline/import.md +++ b/docs/reference/commandline/import.md @@ -60,7 +60,7 @@ $ docker import http://example.com/exampleimage.tgz - Import to docker from a local archive. ```bash - $ docker import /path/to/exampleimage.tgz + $ docker import /path/to/exampleimage.tgz ``` ### Import from a local directory @@ -81,9 +81,12 @@ archiving with tar. If you are not root (or the sudo command) when you tar, then the ownerships might not get preserved. ## When the daemon supports multiple operating systems + If the daemon supports multiple operating systems, and the image being imported does not match the default operating system, it may be necessary to add `--platform`. This would be necessary when importing a Linux image into a Windows daemon. - # docker import --platform=linux .\linuximage.tar +```bash +$ docker import --platform=linux .\linuximage.tar +``` diff --git a/docs/reference/commandline/kill.md b/docs/reference/commandline/kill.md index 308ad88af9..942605ec52 100644 --- a/docs/reference/commandline/kill.md +++ b/docs/reference/commandline/kill.md @@ -23,7 +23,9 @@ inside the container is sent `SIGKILL` signal (default), or the signal that is specified with the `--signal` option. You can kill a container using the container's ID, ID-prefix, or name. -> **Note**: `ENTRYPOINT` and `CMD` in the *shell* form run as a subcommand of +> **Note** +> +> `ENTRYPOINT` and `CMD` in the *shell* form run as a child process of > `/bin/sh -c`, which does not pass signals. This means that the executable is > not the container’s PID 1 and does not receive Unix signals. diff --git a/docs/reference/commandline/logs.md b/docs/reference/commandline/logs.md index 3534140e45..faeb6f5a2c 100644 --- a/docs/reference/commandline/logs.md +++ b/docs/reference/commandline/logs.md @@ -73,4 +73,4 @@ $ docker logs -f --until=2s Tue 14 Nov 2017 16:40:00 CET Tue 14 Nov 2017 16:40:01 CET Tue 14 Nov 2017 16:40:02 CET -``` \ No newline at end of file +``` diff --git a/docs/reference/commandline/manifest.md b/docs/reference/commandline/manifest.md index 9c54cbd4c3..d8232a1fec 100644 --- a/docs/reference/commandline/manifest.md +++ b/docs/reference/commandline/manifest.md @@ -40,7 +40,7 @@ to two images -- one for windows on amd64, and one for darwin on amd64. ### manifest inspect -``` +```bash manifest inspect --help Usage: docker manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST @@ -275,9 +275,10 @@ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1 $ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag ``` -> **Note**: the `--insecure` flag is not required to annotate a manifest list, +> **Note** +> +> 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/docs/reference/commandline/network.md b/docs/reference/commandline/network.md index 17d9e98545..bf5e19b701 100644 --- a/docs/reference/commandline/network.md +++ b/docs/reference/commandline/network.md @@ -35,7 +35,7 @@ prune, connect, and disconnect networks. * [network create](network_create.md) * [network inspect](network_inspect.md) -* [network list](network_list.md) +* [network list](network_ls.md) * [network rm](network_rm.md) * [network prune](network_prune.md) * [network connect](network_connect.md) diff --git a/docs/reference/commandline/network_disconnect.md b/docs/reference/commandline/network_disconnect.md index 4b6691f747..4e6f2f6d31 100644 --- a/docs/reference/commandline/network_disconnect.md +++ b/docs/reference/commandline/network_disconnect.md @@ -24,7 +24,7 @@ disconnect it from the network. ## Examples ```bash - $ docker network disconnect multi-host-network container1 +$ docker network disconnect multi-host-network container1 ``` diff --git a/docs/reference/commandline/network_prune.md b/docs/reference/commandline/network_prune.md index 37a9a6d734..64d237cac3 100644 --- a/docs/reference/commandline/network_prune.md +++ b/docs/reference/commandline/network_prune.md @@ -96,7 +96,7 @@ f949d337b1f5 none null local * [network ls](network_ls.md) * [network inspect](network_inspect.md) * [network rm](network_rm.md) -* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/) +* [Understand Docker container networks](https://docs.docker.com/network/) * [system df](system_df.md) * [container prune](container_prune.md) * [image prune](image_prune.md) diff --git a/docs/reference/commandline/network_rm.md b/docs/reference/commandline/network_rm.md index 01195a7ac1..52a4265aa7 100644 --- a/docs/reference/commandline/network_rm.md +++ b/docs/reference/commandline/network_rm.md @@ -56,4 +56,4 @@ deletion. * [network ls](network_ls.md) * [network inspect](network_inspect.md) * [network prune](network_prune.md) -* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/) +* [Understand Docker container networks](https://docs.docker.com/network/) diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index 6e2b77c259..ce0694cd0c 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -54,11 +54,11 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b The currently supported filters are: -* [id](node_ls.md#id) -* [label](node_ls.md#label) -* [membership](node_ls.md#membership) -* [name](node_ls.md#name) -* [role](node_ls.md#role) +* [id](#id) +* [label](#label) +* [membership](#membership) +* [name](#name) +* [role](#role) #### id diff --git a/docs/reference/commandline/node_update.md b/docs/reference/commandline/node_update.md index f3cbd2e732..35de16c454 100644 --- a/docs/reference/commandline/node_update.md +++ b/docs/reference/commandline/node_update.md @@ -57,7 +57,7 @@ $ docker node update --label-add type=queue worker1 The labels you set for nodes using `docker node update` apply only to the node entity within the swarm. Do not confuse them with the docker daemon labels for -[dockerd](https://docs.docker.com/engine/userguide/labels-custom-metadata/#daemon-labels). +[dockerd](dockerd.md). For more information about labels, refer to [apply custom metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/). diff --git a/docs/reference/commandline/plugin_inspect.md b/docs/reference/commandline/plugin_inspect.md index a324073063..63fbde3af2 100644 --- a/docs/reference/commandline/plugin_inspect.md +++ b/docs/reference/commandline/plugin_inspect.md @@ -23,10 +23,17 @@ in a JSON array. ## Examples +### Inspect a plugin -```none +The following example example inspects the `tiborvass/sample-volume-plugin` plugin: + +```bash $ docker plugin inspect tiborvass/sample-volume-plugin:latest +``` +Output is in JSON format (output below is formatted for readability): + +```json { "Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21", "Name": "tiborvass/sample-volume-plugin:latest", @@ -134,7 +141,6 @@ $ docker plugin inspect tiborvass/sample-volume-plugin:latest } ``` -(output formatted for readability) ### Formatting the output diff --git a/docs/reference/commandline/plugin_ls.md b/docs/reference/commandline/plugin_ls.md index bbf09e9c9c..262357ddc2 100644 --- a/docs/reference/commandline/plugin_ls.md +++ b/docs/reference/commandline/plugin_ls.md @@ -75,8 +75,8 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description ----------------|------------------------------------------------------------------------------------------ +Placeholder | Description +-------------------|------------------------------------------------------------ `.ID` | Plugin ID `.Name` | Plugin name `.Description` | Plugin description diff --git a/docs/reference/commandline/plugin_set.md b/docs/reference/commandline/plugin_set.md index 4bfdd96f4d..504b9ae0d6 100644 --- a/docs/reference/commandline/plugin_set.md +++ b/docs/reference/commandline/plugin_set.md @@ -32,45 +32,43 @@ by looking at the `Settable` field. Here is an extract of a plugin manifest: -``` +```json { - "config": { - ... - "args": { - "name": "myargs", - "settable": ["value"], - "value": ["foo", "bar"] - }, - "env": [ - { - "name": "DEBUG", - "settable": ["value"], - "value": "0" - }, - { - "name": "LOGGING", - "value": "1" - } - ], - "devices": [ - { - "name": "mydevice", - "path": "/dev/foo", - "settable": ["path"] - } - ], - "mounts": [ - { - "destination": "/baz", - "name": "mymount", - "options": ["rbind"], - "settable": ["source"], - "source": "/foo", - "type": "bind" - } - ], - ... - } + "config": { + "args": { + "name": "myargs", + "settable": ["value"], + "value": ["foo", "bar"] + }, + "env": [ + { + "name": "DEBUG", + "settable": ["value"], + "value": "0" + }, + { + "name": "LOGGING", + "value": "1" + } + ], + "devices": [ + { + "name": "mydevice", + "path": "/dev/foo", + "settable": ["path"] + } + ], + "mounts": [ + { + "destination": "/baz", + "name": "mymount", + "options": ["rbind"], + "settable": ["source"], + "source": "/foo", + "type": "bind" + } + ] + } } ``` diff --git a/docs/reference/commandline/port.md b/docs/reference/commandline/port.md index b49e726129..029df710f8 100644 --- a/docs/reference/commandline/port.md +++ b/docs/reference/commandline/port.md @@ -24,15 +24,24 @@ just a specific mapping: ```bash $ docker ps + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234->9876/tcp, 0.0.0.0:4321->7890/tcp test + $ docker port test + 7890/tcp -> 0.0.0.0:4321 9876/tcp -> 0.0.0.0:1234 + $ docker port test 7890/tcp + 0.0.0.0:4321 + $ docker port test 7890/udp + 2014/06/24 11:53:36 Error: No public port '7890/udp' published for test + $ docker port test 7890 + 0.0.0.0:4321 ``` diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 560bc3e05a..69f3330d60 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -72,6 +72,7 @@ The `docker ps -s` command displays two different on-disk-sizes for each contain ```bash $ docker ps -s + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB) 00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB) @@ -310,10 +311,12 @@ a volume mounted in a specific path: ```bash $ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}" + CONTAINER ID MOUNTS 9c3527ed70ce remote-volume $ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}" + CONTAINER ID MOUNTS 9c3527ed70ce remote-volume ``` diff --git a/docs/reference/commandline/pull.md b/docs/reference/commandline/pull.md index a0a9a023ad..fb2c23011b 100644 --- a/docs/reference/commandline/pull.md +++ b/docs/reference/commandline/pull.md @@ -35,7 +35,7 @@ If you are behind an HTTP proxy server, for example in corporate settings, before open a connect to registry, you may need to configure the Docker daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables. To set these environment variables on a host using -`systemd`, refer to the [control and configure Docker with systemd](https://docs.docker.com/engine/admin/systemd/#http-proxy) +`systemd`, refer to the [control and configure Docker with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy) for variables configuration. ### Concurrent downloads @@ -101,7 +101,7 @@ same image, their layers are stored only once and do not consume extra disk space. For more information about images, layers, and the content-addressable store, -refer to [understand images, containers, and storage drivers](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/). +refer to [understand images, containers, and storage drivers](https://docs.docker.com/storage/storagedriver/). ### Pull an image by digest (immutable identifier) @@ -240,7 +240,9 @@ a3ed95caeb02: Pulling fs layer ^C ``` -> **Note**: Technically, the Engine terminates a pull operation when the -> connection between the Docker Engine daemon and the Docker Engine client -> initiating the pull is lost. If the connection with the Engine daemon is -> lost for other reasons than a manual interaction, the pull is also aborted. +> **Note** +> +> The Engine terminates a pull operation when the connection between the Docker +> Engine daemon and the Docker Engine client initiating the pull is lost. If the +> connection with the Engine daemon is lost for other reasons than a manual +> interaction, the pull is also aborted. diff --git a/docs/reference/commandline/rm.md b/docs/reference/commandline/rm.md index 337a2e3245..de04a26bee 100644 --- a/docs/reference/commandline/rm.md +++ b/docs/reference/commandline/rm.md @@ -22,8 +22,7 @@ Options: ### Remove a container -This will remove the container referenced under the link -`/redis`. +This removes the container referenced under the link `/redis`. ```bash $ docker rm /redis @@ -33,7 +32,7 @@ $ docker rm /redis ### Remove a link specified with `--link` on the default bridge network -This will remove the underlying link between `/webapp` and the `/redis` +This removes the underlying link between `/webapp` and the `/redis` containers on the default bridge network, removing all network communication between the two containers. This does not apply when `--link` is used with user-specified networks. @@ -46,7 +45,7 @@ $ docker rm --link /webapp/redis ### Force-remove a running container -This command will force-remove a running container. +This command force-removes a running container. ```bash $ docker rm --force redis @@ -63,10 +62,9 @@ The main process inside the container referenced under the link `redis` will rec $ docker rm $(docker ps -a -q) ``` -This command will delete all stopped containers. The command -`docker ps -a -q` will return all existing container IDs and pass them to -the `rm` command which will delete them. Any running containers will not be -deleted. +This command deletes all stopped containers. The command +`docker ps -a -q` above returns all existing container IDs and passes them to +the `rm` command which deletes them. Running containers are not deleted. ### Remove a container and its volumes @@ -75,7 +73,7 @@ $ docker rm -v redis redis ``` -This command will remove the container and any volumes associated with it. +This command removes the container and any volumes associated with it. Note that if a volume was specified with a name, it will not be removed. ### Remove a container and selectively remove volumes @@ -83,9 +81,10 @@ Note that if a volume was specified with a name, it will not be removed. ```bash $ docker create -v awesome:/foo -v /bar --name hello redis hello + $ docker rm -v hello ``` -In this example, the volume for `/foo` will remain intact, but the volume for -`/bar` will be removed. The same behavior holds for volumes inherited with +In this example, the volume for `/foo` remains intact, but the volume for +`/bar` is removed. The same behavior holds for volumes inherited with `--volumes-from`. diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 6fb14edaa4..be4855a678 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -151,7 +151,7 @@ of all containers. The `docker run` command can be used in combination with `docker commit` to [*change the command that a container runs*](commit.md). There is additional detailed information about `docker run` in the [Docker run reference](../run.md). -For information on connecting a container to a network, see the ["*Docker network overview*"](https://docs.docker.com/engine/userguide/networking/). +For information on connecting a container to a network, see the ["*Docker network overview*"](https://docs.docker.com/network/). ## Examples @@ -278,8 +278,7 @@ $ docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/stat ``` By bind-mounting the docker unix socket and statically linked docker -binary (refer to [get the linux binary]( -https://docs.docker.com/engine/installation/binaries/#/get-the-linux-binary)), +binary (refer to [get the linux binary](https://docs.docker.com/engine/install/binaries/#install-static-binaries)), you give the container the full access to create and manipulate the host's Docker daemon. @@ -307,7 +306,7 @@ docker run -v c:\foo:c: ... docker run -v c:\foo:c:\existing-directory-with-contents ... ``` -For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/engine/tutorials/dockervolumes/) +For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/storage/volumes/) ### Add bind mounts or volumes using the --mount flag @@ -318,7 +317,7 @@ mounts in a container. The `--mount` flag supports most options that are supported by the `-v` or the `--volume` flag, but uses a different syntax. For in-depth information on the `--mount` flag, and a comparison between `--volume` and `--mount`, refer to -the [service create command reference](service_create.md#add-bind-mounts-or-volumes). +the [service create command reference](service_create.md#add-bind-mounts-volumes-or-memory-filesystems). Even though there is no plan to deprecate `--volume`, usage of `--mount` is recommended. @@ -340,7 +339,7 @@ $ docker run -p 127.0.0.1:80:8080/tcp ubuntu bash This binds port `8080` of the container to TCP port `80` on `127.0.0.1` of the host machine. You can also specify `udp` and `sctp` ports. -The [Docker User Guide](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/) +The [Docker User Guide](https://docs.docker.com/network/links/) explains in detail how to manipulate ports in Docker. Note that ports which are not bound to the host (i.e., `-p 80:80` instead of @@ -445,8 +444,8 @@ com.example.label3 You can load multiple label-files by supplying multiple `--label-file` flags. For additional information on working with labels, see [*Labels - custom -metadata in Docker*](https://docs.docker.com/engine/userguide/labels-custom-metadata/) in the Docker User -Guide. +metadata in Docker*](https://docs.docker.com/config/labels-custom-metadata/) in +the Docker User Guide. ### Connect a container to a network (--network) @@ -472,9 +471,11 @@ or name. For `overlay` networks or custom plugins that support multi-host connectivity, containers connected to the same multi-host network but launched from different Engines can also communicate in this way. -> **Note**: Service discovery is unavailable on the default bridge network. -> Containers can communicate via their IP addresses by default. To communicate -> by name, they must be linked. +> **Note** +> +> Service discovery is unavailable on the default bridge network. Containers can +> communicate via their IP addresses by default. To communicate by name, they +> must be linked. You can disconnect a container from a network using the `docker network disconnect` command. @@ -575,9 +576,10 @@ $ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc fdisk: unable to open /dev/xvdc: Operation not permitted ``` -> **Note**: `--device` cannot be safely used with ephemeral devices. Block devices -> that may be removed should not be added to untrusted containers with -> `--device`. +> **Note** +> +> The `--device` option cannot be safely used with ephemeral devices. Block devices +> that may be removed should not be added to untrusted containers with `--device`. For Windows, the format of the string passed to the `--device` option is in the form of `--device=/`. Beginning with Windows Server 2019 @@ -597,9 +599,11 @@ ports on the host visible in the container. PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.microsoft.com/windows/servercore:ltsc2019 ``` -> **Note**: the `--device` option is only supported on process-isolated -> Windows containers. This option fails if the container isolation is `hyperv` -> or when running Linux Containers on Windows (LCOW). +> **Note** +> +> The `--device` option is only supported on process-isolated Windows containers. +> This option fails if the container isolation is `hyperv` or when running Linux +> Containers on Windows (LCOW). ### Access an NVIDIA GPU @@ -700,9 +704,11 @@ $ docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n" 1024 ``` -> **Note**: If you do not provide a `hard limit`, the `soft limit` will be used -> for both values. If no `ulimits` are set, they will be inherited from -> the default `ulimits` set on the daemon. `as` option is disabled now. +> **Note** +> +> If you do not provide a `hard limit`, the `soft limit` is used +> for both values. If no `ulimits` are set, they are inherited from +> the default `ulimits` set on the daemon. The `as` option is disabled now. > In other words, the following script is not supported: > > ```bash @@ -840,23 +846,22 @@ network namespace, run this command: $ docker run --sysctl net.ipv4.ip_forward=1 someimage ``` -> **Note**: Not all sysctls are namespaced. Docker does not support changing sysctls +> **Note** +> +> Not all sysctls are namespaced. Docker does not support changing sysctls > inside of a container that also modify the host system. As the kernel > evolves we expect to see more sysctls become namespaced. #### Currently supported sysctls -- `IPC Namespace`: +IPC Namespace: - ```none - kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced - Sysctls beginning with fs.mqueue.* - ``` +- `kernel.msgmax`, `kernel.msgmnb`, `kernel.msgmni`, `kernel.sem`, + `kernel.shmall`, `kernel.shmmax`, `kernel.shmmni`, `kernel.shm_rmid_forced`. +- Sysctls beginning with `fs.mqueue.*` +- If you use the `--ipc=host` option these sysctls are not allowed. - If you use the `--ipc=host` option these sysctls will not be allowed. +Network Namespace: -- `Network Namespace`: - - Sysctls beginning with net.* - - If you use the `--network=host` option using these sysctls will not be allowed. +- Sysctls beginning with `net.*` +- If you use the `--network=host` option using these sysctls are not allowed. diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index 531fd72a6c..af29ef5f0e 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -26,11 +26,6 @@ Options: Search [Docker Hub](https://hub.docker.com) for images -See [*Find Public Images on Docker Hub*](https://docs.docker.com/engine/tutorials/dockerrepos/#searching-for-images) for -more details on finding shared images from the command line. - -> **Note**: Search queries return a maximum of 25 results. - ## Examples ### Search images by name @@ -93,9 +88,9 @@ than one filter, then pass multiple flags (e.g. `--filter is-automated=true --fi The currently supported filters are: -* stars (int - number of stars the image has) -* is-automated (boolean - true or false) - is the image automated or not -* is-official (boolean - true or false) - is the image official or not +- stars (int - number of stars the image has) +- is-automated (boolean - true or false) - is the image automated or not +- is-official (boolean - true or false) - is the image official or not #### stars @@ -160,7 +155,6 @@ The following example uses a template without headers and outputs the `Name` and `StarCount` entries separated by a colon for all images: ```bash -{% raw %} $ docker search --format "{{.Name}}: {{.StarCount}}" nginx nginx: 5441 @@ -173,13 +167,11 @@ bitnami/nginx: 23 evild/alpine-nginx: 14 million12/nginx: 9 maxexcloo/nginx: 7 -{% endraw %} ``` This example outputs a table format: ```bash -{% raw %} $ docker search --format "table {{.Name}}\t{{.IsAutomated}}\t{{.IsOfficial}}" nginx NAME AUTOMATED OFFICIAL @@ -189,5 +181,4 @@ richarvey/nginx-php-fpm [OK] jrcs/letsencrypt-nginx-proxy-companion [OK] million12/nginx-php [OK] webdevops/php-nginx [OK] -{% endraw %} ``` diff --git a/docs/reference/commandline/secret.md b/docs/reference/commandline/secret.md index 3f13162562..83c74ee638 100644 --- a/docs/reference/commandline/secret.md +++ b/docs/reference/commandline/secret.md @@ -32,5 +32,5 @@ Manage secrets. * [secret create](secret_create.md) * [secret inspect](secret_inspect.md) -* [secret list](secret_list.md) +* [secret list](secret_ls.md) * [secret rm](secret_rm.md) diff --git a/docs/reference/commandline/secret_ls.md b/docs/reference/commandline/secret_ls.md index 028c156303..912e414b71 100644 --- a/docs/reference/commandline/secret_ls.md +++ b/docs/reference/commandline/secret_ls.md @@ -49,9 +49,9 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b The currently supported filters are: -* [id](secret_ls.md#id) (secret's ID) -* [label](secret_ls.md#label) (`label=` or `label==`) -* [name](secret_ls.md#name) (secret's name) +- [id](#id) (secret's ID) +- [label](#label) (`label=` or `label==`) +- [name](#name) (secret's name) #### id diff --git a/docs/reference/commandline/secret_rm.md b/docs/reference/commandline/secret_rm.md index 5fd1b71019..a58c604059 100644 --- a/docs/reference/commandline/secret_rm.md +++ b/docs/reference/commandline/secret_rm.md @@ -37,8 +37,10 @@ $ docker secret rm secret.json sapth4csdo5b6wz2p5uimh5xg ``` -> **Warning**: Unlike `docker rm`, this command does not ask for confirmation -> before removing a secret. +> **Warning** +> +> Unlike `docker rm`, this command does not ask for confirmation before removing +> a secret. ## Related commands diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 75a52ce66e..00b3bc424a 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -289,7 +289,7 @@ $ docker service create \ ``` For more information about labels, refer to [apply custom -metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/). +metadata](https://docs.docker.com/config/labels-custom-metadata/). ### Add bind mounts, volumes or memory filesystems @@ -327,7 +327,7 @@ your web server containers when they start. To update the website, you just update the named volume. For more information about named volumes, see -[Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). +[Data Volumes](https://docs.docker.com/storage/volumes/). The following table describes options which apply to both bind mounts and named volumes in a service: @@ -342,14 +342,14 @@ volumes in a service: type -

The type of mount, can be either volume, bind, tmpfs, or npipe. Defaults to volume if no type is specified. +

The type of mount, can be either volume, bind, tmpfs, or npipe. Defaults to volume if no type is specified.

  • volume: mounts a managed volume into the container.
  • bind: bind-mounts a directory or file from the host into the container.
  • tmpfs: mount a tmpfs in the container
  • npipe: mounts named pipe from the host into the container (Windows containers only).
  • -

+ @@ -389,11 +389,11 @@ volumes in a service:

The Engine mounts binds and volumes read-write unless readonly option is given when mounting the bind or volume. Note that setting readonly for a - bind-mount does not make its submounts readonly on the current Linux implementation. See also bind-nonrecursive. + bind-mount does not make its submounts readonly on the current Linux implementation. See also bind-nonrecursive.

  • true or 1 or no value: Mounts the bind or volume read-only.
  • false or 0: Mounts the bind or volume read-write.
  • -

+ @@ -417,14 +417,13 @@ The following options can only be used for bind mounts (`type=bind`): consistency -

The consistency requirements for the mount; one of -

    -
  • default: Equivalent to consistent.
  • -
  • consistent: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.
  • -
  • cached: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.
  • -
  • delegated: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.
  • -
-

+

The consistency requirements for the mount; one of

+
    +
  • default: Equivalent to consistent.
  • +
  • consistent: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.
  • +
  • cached: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.
  • +
  • delegated: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.
  • +
@@ -506,7 +505,7 @@ The following options can only be used for named volumes (`type=volume`): creation. For example, volume-label=mylabel=hello-world,my-other-label=hello-mars. For more information about labels, refer to - apply custom metadata. + apply custom metadata. @@ -914,7 +913,7 @@ $ docker service create \ The swarm extends my-network to each node running the service. Containers on the same network can access each other using -[service discovery](https://docs.docker.com/engine/swarm/networking/#use-swarm-mode-service-discovery). +[service discovery](https://docs.docker.com/network/overlay/#container-discovery). Long form syntax of `--network` allows to specify list of aliases and driver options: `--network name=my-network,alias=web1,driver-opt=field1=value1` @@ -1068,9 +1067,10 @@ In this example, we are going to set the template of the created containers base service's name, the node's ID and hostname where it sits. ```bash -$ docker service create --name hosttempl \ - --hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\ - busybox top +$ docker service create \ + --name hosttempl \ + --hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\ + busybox top va8ew30grofhjoychbr6iot8c @@ -1105,10 +1105,11 @@ You can narrow the kind of nodes your task can land on through the using the `--generic-resource` flag (if the nodes advertise these resources): ```bash -$ docker service create --name cuda \ - --generic-resource "NVIDIA-GPU=2" \ - --generic-resource "SSD=1" \ - nvidia/cuda +$ docker service create \ + --name cuda \ + --generic-resource "NVIDIA-GPU=2" \ + --generic-resource "SSD=1" \ + nvidia/cuda ``` ## Related commands diff --git a/docs/reference/commandline/service_inspect.md b/docs/reference/commandline/service_inspect.md index 73d56ab126..85f44fd6bb 100644 --- a/docs/reference/commandline/service_inspect.md +++ b/docs/reference/commandline/service_inspect.md @@ -48,47 +48,47 @@ dmu1ept4cxcf redis replicated 3/3 redis:3.0.6 Both `docker service inspect redis`, and `docker service inspect dmu1ept4cxcf` produce the same result: -```none +```bash $ docker service inspect redis [ - { - "ID": "dmu1ept4cxcfe8k8lhtux3ro3", - "Version": { - "Index": 12 + { + "ID": "dmu1ept4cxcfe8k8lhtux3ro3", + "Version": { + "Index": 12 + }, + "CreatedAt": "2016-06-17T18:44:02.558012087Z", + "UpdatedAt": "2016-06-17T18:44:02.558012087Z", + "Spec": { + "Name": "redis", + "TaskTemplate": { + "ContainerSpec": { + "Image": "redis:3.0.6" }, - "CreatedAt": "2016-06-17T18:44:02.558012087Z", - "UpdatedAt": "2016-06-17T18:44:02.558012087Z", - "Spec": { - "Name": "redis", - "TaskTemplate": { - "ContainerSpec": { - "Image": "redis:3.0.6" - }, - "Resources": { - "Limits": {}, - "Reservations": {} - }, - "RestartPolicy": { - "Condition": "any", - "MaxAttempts": 0 - }, - "Placement": {} - }, - "Mode": { - "Replicated": { - "Replicas": 1 - } - }, - "UpdateConfig": {}, - "EndpointSpec": { - "Mode": "vip" - } + "Resources": { + "Limits": {}, + "Reservations": {} }, - "Endpoint": { - "Spec": {} + "RestartPolicy": { + "Condition": "any", + "MaxAttempts": 0 + }, + "Placement": {} + }, + "Mode": { + "Replicated": { + "Replicas": 1 } + }, + "UpdateConfig": {}, + "EndpointSpec": { + "Mode": "vip" + } + }, + "Endpoint": { + "Spec": {} } + } ] ``` @@ -96,13 +96,13 @@ $ docker service inspect redis $ docker service inspect dmu1ept4cxcf [ - { - "ID": "dmu1ept4cxcfe8k8lhtux3ro3", - "Version": { - "Index": 12 - }, - ... - } + { + "ID": "dmu1ept4cxcfe8k8lhtux3ro3", + "Version": { + "Index": 12 + }, + ... + } ] ``` diff --git a/docs/reference/commandline/service_logs.md b/docs/reference/commandline/service_logs.md index b74d01d6fe..fc6ad5d992 100644 --- a/docs/reference/commandline/service_logs.md +++ b/docs/reference/commandline/service_logs.md @@ -35,11 +35,13 @@ service, or with the ID of a task. If a service is passed, it will display logs for all of the containers in that service. If a task is passed, it will only display logs from that particular task. -> **Note**: This command is only functional for services that are started with +> **Note** +> +> This command is only functional for services that are started with > the `json-file` or `journald` logging driver. For more information about selecting and configuring logging drivers, refer to -[Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/). +[Configure logging drivers](https://docs.docker.com/config/containers/logging/configure/). The `docker service logs --follow` command will continue streaming the new output from the service's `STDOUT` and `STDERR`. diff --git a/docs/reference/commandline/service_rm.md b/docs/reference/commandline/service_rm.md index 866c8f4815..d990acae3f 100644 --- a/docs/reference/commandline/service_rm.md +++ b/docs/reference/commandline/service_rm.md @@ -40,8 +40,10 @@ $ docker service ls ID NAME MODE REPLICAS IMAGE ``` -> **Warning**: Unlike `docker rm`, this command does not ask for confirmation -> before removing a running service. +> **Warning** +> +> Unlike `docker rm`, this command does not ask for confirmation before removing +> a running service. ## Related commands diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 6022fd6d83..1584352b33 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -147,9 +147,8 @@ point, effectively removing the `test-data` volume. Each command returns the service name. - The `--mount-add` flag takes the same parameters as the `--mount` flag on - `service create`. Refer to the [volumes and - bind mounts](service_create.md#volumes-and-bind-mounts-mount) section in the - `service create` reference for details. + `service create`. Refer to the [volumes and bind mounts](service_create.md#add-bind-mounts-volumes-or-memory-filesystems) + section in the `service create` reference for details. - The `--mount-rm` flag takes the `target` path of the mount. @@ -179,7 +178,7 @@ myservice Use the `--publish-add` or `--publish-rm` flags to add or remove a published port for a service. You can use the short or long syntax discussed in the -[docker service create](service_create/#publish-service-ports-externally-to-the-swarm) +[docker service create](service_create.md#publish-service-ports-externally-to-the-swarm--p---publish) reference. The following example adds a published service port to an existing service. @@ -194,7 +193,7 @@ $ docker service update \ Use the `--network-add` or `--network-rm` flags to add or remove a network for a service. You can use the short or long syntax discussed in the -[docker service create](service_create/#attach-a-service-to-an-existing-network-network) +[docker service create](service_create.md#attach-a-service-to-an-existing-network---network) reference. The following example adds a new alias name to an existing service already connected to network my-network: @@ -288,13 +287,13 @@ $ docker service update \ ### Update services using templates Some flags of `service update` support the use of templating. -See [`service create`](./service_create.md#templating) for the reference. +See [`service create`](service_create.md#create-services-using-templates) for the reference. ### Specify isolation mode (Windows) `service update` supports the same `--isolation` flag as `service create` -See [`service create`](./service_create.md) for the reference. +See [`service create`](service_create.md) for the reference. ## Related commands diff --git a/docs/reference/commandline/stack_services.md b/docs/reference/commandline/stack_services.md index 0d61e53efb..791266ee57 100644 --- a/docs/reference/commandline/stack_services.md +++ b/docs/reference/commandline/stack_services.md @@ -87,7 +87,7 @@ using a Go template. Valid placeholders for the Go template are listed below: Placeholder | Description -------------|------------------------------------------------------------------------------------------ +------------|------------------------------------------------------------------- `.ID` | Service ID `.Name` | Service name `.Mode` | Service mode (replicated, global) diff --git a/docs/reference/commandline/stats.md b/docs/reference/commandline/stats.md index 9be33f7e1a..ce66f5de68 100644 --- a/docs/reference/commandline/stats.md +++ b/docs/reference/commandline/stats.md @@ -21,13 +21,28 @@ Options: ## Description -The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data. +The `docker stats` command returns a live data stream for running containers. To +limit data to one or more specific containers, specify a list of container names +or ids separated by a space. You can specify a stopped container but stopped +containers do not return any data. -If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint. +If you need more detailed information about a container's resource usage, use +the `/containers/(id)/stats` API endpoint. -> **Note**: On Linux, the Docker CLI reports memory usage by subtracting page cache usage from the total memory usage. The API does not perform such a calculation but rather provides the total memory usage and the amount from the page cache so that clients can use the data as needed. +> **Note** +> +> On Linux, the Docker CLI reports memory usage by subtracting page cache usage +> from the total memory usage. The API does not perform such a calculation but +> rather provides the total memory usage and the amount from the page cache so +> that clients can use the data as needed. -> **Note**: The `PIDS` column contains the number of processes and kernel threads created by that container. Threads is the term used by Linux kernel. Other equivalent terms are "lightweight process" or "kernel task", etc. A large number in the `PIDS` column combined with a small number of processes (as reported by `ps` or `top`) may indicate that something in the container is creating many threads. +> **Note** +> +> The `PIDS` column contains the number of processes and kernel threads created +> by that container. Threads is the term used by Linux kernel. Other equivalent +> terms are "lightweight process" or "kernel task", etc. A large number in the +> `PIDS` column combined with a small number of processes (as reported by `ps` +> or `top`) may indicate that something in the container is creating many threads. ## Examples @@ -161,6 +176,3 @@ 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, -> instead of `{{.ID}}\t{{.Name}}`. diff --git a/docs/reference/commandline/swarm_ca.md b/docs/reference/commandline/swarm_ca.md index c951d17e77..989b0ef6be 100644 --- a/docs/reference/commandline/swarm_ca.md +++ b/docs/reference/commandline/swarm_ca.md @@ -111,7 +111,7 @@ progress of the rotation. * [swarm init](swarm_init.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) diff --git a/docs/reference/commandline/swarm_init.md b/docs/reference/commandline/swarm_init.md index 39567632cc..696aaa8dde 100644 --- a/docs/reference/commandline/swarm_init.md +++ b/docs/reference/commandline/swarm_init.md @@ -55,7 +55,7 @@ a new node to the swarm, the node joins as a worker or manager node based upon t to [swarm join](swarm_join.md). After you create the swarm, you can display or rotate the token using -[swarm join-token](swarm_join_token.md). +[swarm join-token](swarm_join-token.md). ### `--autolock` @@ -189,8 +189,8 @@ by passing `--availability=drain` to `docker swarm init`. * [swarm ca](swarm_ca.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_join-token.md b/docs/reference/commandline/swarm_join-token.md index 96ff623ba0..c6175f0ad0 100644 --- a/docs/reference/commandline/swarm_join-token.md +++ b/docs/reference/commandline/swarm_join-token.md @@ -39,6 +39,7 @@ the swarm: ```bash $ docker swarm join-token worker + To add a worker to this swarm, run the following command: docker swarm join \ @@ -46,6 +47,7 @@ To add a worker to this swarm, run the following command: 172.17.0.2:2377 $ docker swarm join-token manager + To add a manager to this swarm, run the following command: docker swarm join \ @@ -57,6 +59,7 @@ Use the `--rotate` flag to generate a new join token for the specified role: ```bash $ docker swarm join-token --rotate worker + Successfully rotated worker join token. To add a worker to this swarm, run the following command: @@ -106,5 +109,5 @@ Only print the token. Do not print a complete command for joining. * [swarm join](swarm_join.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_join.md b/docs/reference/commandline/swarm_join.md index 1be75d4418..fd47a1076c 100644 --- a/docs/reference/commandline/swarm_join.md +++ b/docs/reference/commandline/swarm_join.md @@ -117,8 +117,8 @@ by passing `--availability=drain` to `docker swarm join`. * [swarm ca](swarm_ca.md) * [swarm init](swarm_init.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_leave.md b/docs/reference/commandline/swarm_leave.md index 66341b8cad..548f63e342 100644 --- a/docs/reference/commandline/swarm_leave.md +++ b/docs/reference/commandline/swarm_leave.md @@ -33,6 +33,7 @@ Consider the following swarm, as seen from the manager: ```bash $ docker node ls + ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 7ln70fl22uw2dvjn2ft53m3q5 worker2 Ready Active dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active @@ -43,6 +44,7 @@ To remove `worker2`, issue the following command from `worker2` itself: ```bash $ docker swarm leave + Node left the default swarm. ``` @@ -57,7 +59,7 @@ command. * [node rm](node_rm.md) * [swarm init](swarm_init.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_unlock-key.md b/docs/reference/commandline/swarm_unlock-key.md index 8c2786a596..08e83f3969 100644 --- a/docs/reference/commandline/swarm_unlock-key.md +++ b/docs/reference/commandline/swarm_unlock-key.md @@ -49,6 +49,7 @@ key: ```bash $ docker swarm unlock-key --rotate + Successfully rotated manager unlock key. To unlock a swarm manager after it restarts, run the `docker swarm unlock` @@ -64,6 +65,7 @@ The `-q` (or `--quiet`) flag only prints the key: ```bash $ docker swarm unlock-key -q + SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8 ``` @@ -81,7 +83,7 @@ Only print the unlock key, without instructions. * [swarm ca](swarm_ca.md) * [swarm init](swarm_init.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_unlock.md b/docs/reference/commandline/swarm_unlock.md index 03e374dd45..41b3bb3ec2 100644 --- a/docs/reference/commandline/swarm_unlock.md +++ b/docs/reference/commandline/swarm_unlock.md @@ -38,7 +38,7 @@ Please enter unlock key: * [swarm ca](swarm_ca.md) * [swarm init](swarm_init.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) * [swarm update](swarm_update.md) diff --git a/docs/reference/commandline/swarm_update.md b/docs/reference/commandline/swarm_update.md index 31e43d2e60..4fb14790f3 100644 --- a/docs/reference/commandline/swarm_update.md +++ b/docs/reference/commandline/swarm_update.md @@ -41,7 +41,7 @@ $ docker swarm update --cert-expiry 720h * [swarm ca](swarm_ca.md) * [swarm init](swarm_init.md) * [swarm join](swarm_join.md) -* [swarm join-token](swarm_join_token.md) +* [swarm join-token](swarm_join-token.md) * [swarm leave](swarm_leave.md) * [swarm unlock](swarm_unlock.md) -* [swarm unlock-key](swarm_unlock_key.md) +* [swarm unlock-key](swarm_unlock-key.md) diff --git a/docs/reference/commandline/system_df.md b/docs/reference/commandline/system_df.md index a894dcdf68..8dfaf29e5a 100644 --- a/docs/reference/commandline/system_df.md +++ b/docs/reference/commandline/system_df.md @@ -66,8 +66,9 @@ my-named-vol 0 * `UNIQUE SIZE` is the amount of space that is only used by a given image * `SIZE` is the virtual size of the image, it is the sum of `SHARED SIZE` and `UNIQUE SIZE` -> **Note**: Network information is not shown because it doesn't consume the disk -> space. +> **Note** +> +> Network information is not shown because it does not consume disk space. ## Performance diff --git a/docs/reference/commandline/system_events.md b/docs/reference/commandline/system_events.md index 8b020dec63..1f4a04ec22 100644 --- a/docs/reference/commandline/system_events.md +++ b/docs/reference/commandline/system_events.md @@ -175,7 +175,7 @@ $ docker stop test **Shell 1: (Again .. now showing events):** -```none +```console 2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test) 2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge) 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test) @@ -194,6 +194,7 @@ machine, using the following different time syntaxes: ```bash $ docker system events --since 1483283804 + 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local) 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test) 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge) @@ -204,6 +205,7 @@ $ docker system events --since 1483283804 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test) $ docker system events --since '2017-01-05' + 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local) 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test) 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge) @@ -214,6 +216,7 @@ $ docker system events --since '2017-01-05' 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test) $ docker system events --since '2013-09-03T15:49:29' + 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local) 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test) 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge) @@ -224,6 +227,7 @@ $ docker system events --since '2013-09-03T15:49:29' 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test) $ docker system events --since '10m' + 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local) 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test) 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge) @@ -325,12 +329,12 @@ Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299 #### Format as JSON -```none - $ docker system events --format '{{json .}}' +```bash +$ docker system events --format '{{json .}}' - {"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. - {"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. - {"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e.. - {"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42.. - {"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. +{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. +{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. +{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e.. +{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42.. +{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. ``` diff --git a/docs/reference/commandline/system_prune.md b/docs/reference/commandline/system_prune.md index a08894ead1..67f01b596e 100644 --- a/docs/reference/commandline/system_prune.md +++ b/docs/reference/commandline/system_prune.md @@ -97,11 +97,13 @@ deleted: sha256:3a88a5c81eb5c283e72db2dbc6d65cbfd8e80b6c89bb6e714cfaaa0eed99c548 Total reclaimed space: 13.5 MB ``` -> **Note**: The `--volumes` option was added in Docker 17.06.1. Older versions -> of Docker prune volumes by default, along with other Docker objects. On older -> versions, run `docker container prune`, `docker network prune`, and -> `docker image prune` separately to remove unused containers, networks, and -> images, without removing volumes. +> **Note** +> +> The `--volumes` option was added in Docker 17.06.1. Older versions of Docker +> prune volumes by default, along with other Docker objects. On older versions, +> run `docker container prune`, `docker network prune`, and `docker image prune` +> separately to remove unused containers, networks, and images, without removing +> volumes. ### Filtering @@ -138,7 +140,7 @@ containers, images, networks, and volumes without the specified labels. * [volume inspect](volume_inspect.md) * [volume rm](volume_rm.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) * [system df](system_df.md) * [container prune](container_prune.md) * [image prune](image_prune.md) diff --git a/docs/reference/commandline/tag.md b/docs/reference/commandline/tag.md index b6a0feb8c4..8eb7715bb7 100644 --- a/docs/reference/commandline/tag.md +++ b/docs/reference/commandline/tag.md @@ -31,7 +31,7 @@ digits, underscores, periods and dashes. A tag name may not start with a period or a dash and may contain a maximum of 128 characters. You can group your images together using names and tags, and then upload them -to [*Share Images via Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos/#/contributing-to-docker-hub). +to [*Share images on Docker Hub*](https://docs.docker.com/get-started/part3/). ## Examples diff --git a/docs/reference/commandline/trust_inspect.md b/docs/reference/commandline/trust_inspect.md index e514069e82..8c7f1ea533 100644 --- a/docs/reference/commandline/trust_inspect.md +++ b/docs/reference/commandline/trust_inspect.md @@ -149,6 +149,7 @@ display any signed tags. ```bash $ docker trust inspect unsigned-img + No signatures or cannot access unsigned-img ``` @@ -157,6 +158,7 @@ However, if other tags are signed in the same image repository, ```bash $ docker trust inspect alpine:unsigned + [ { "Name": "alpine:unsigned", @@ -165,17 +167,17 @@ $ docker trust inspect alpine:unsigned { "Name": "Repository", "Keys": [ - { - "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" - } + { + "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" + } ] }, { "Name": "Root", "Keys": [ - { - "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" - } + { + "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" + } ] } ] @@ -190,59 +192,60 @@ signed tags in the repository: ```bash $ docker trust inspect alpine + [ - { - "Name": "alpine", - "SignedTags": [ - { - "SignedTag": "3.5", - "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "3.6", - "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "edge", - "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "latest", - "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", - "Signers": [ - "Repo Admin" - ] - } - ], - "Signers": [], - "AdministrativeKeys": [ - { - "Name": "Repository", - "Keys": [ - { - "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" - } - ] - }, - { - "Name": "Root", - "Keys": [ - { - "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" - } - ] - } + { + "Name": "alpine", + "SignedTags": [ + { + "SignedTag": "3.5", + "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c", + "Signers": [ + "Repo Admin" ] - } + }, + { + "SignedTag": "3.6", + "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", + "Signers": [ + "Repo Admin" + ] + }, + { + "SignedTag": "edge", + "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096", + "Signers": [ + "Repo Admin" + ] + }, + { + "SignedTag": "latest", + "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", + "Signers": [ + "Repo Admin" + ] + } + ], + "Signers": [], + "AdministrativeKeys": [ + { + "Name": "Repository", + "Keys": [ + { + "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" + } + ] + }, + { + "Name": "Root", + "Keys": [ + { + "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" + } + ] + } + ] + } ] ``` @@ -254,104 +257,105 @@ and reports the results in an ordered list: ```bash $ docker trust inspect alpine notary + [ - { - "Name": "alpine", - "SignedTags": [ - { - "SignedTag": "3.5", - "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "3.6", - "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "edge", - "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "integ-test-base", - "Digest": "3952dc48dcc4136ccdde37fbef7e250346538a55a0366e3fccc683336377e372", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "latest", - "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", - "Signers": [ - "Repo Admin" - ] - } - ], - "Signers": [], - "AdministrativeKeys": [ - { - "Name": "Repository", - "Keys": [ - { - "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" - } - ] - }, - { - "Name": "Root", - "Keys": [ - { - "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" - } - ] - } + { + "Name": "alpine", + "SignedTags": [ + { + "SignedTag": "3.5", + "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c", + "Signers": [ + "Repo Admin" ] - }, - { - "Name": "notary", - "SignedTags": [ - { - "SignedTag": "server", - "Digest": "71f64ab718a3331dee103bc5afc6bc492914738ce37c2d2f127a8133714ecf5c", - "Signers": [ - "Repo Admin" - ] - }, - { - "SignedTag": "signer", - "Digest": "a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8", - "Signers": [ - "Repo Admin" - ] - } - ], - "Signers": [], - "AdministrativeKeys": [ - { - "Name": "Root", - "Keys": [ - { - "ID": "8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92" - } - ] - }, - { - "Name": "Repository", - "Keys": [ - { - "ID": "85bfd031017722f950d480a721f845a2944db26a3dc084040a70f1b0d9bbb3df" - } - ] - } + }, + { + "SignedTag": "3.6", + "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", + "Signers": [ + "Repo Admin" ] - } + }, + { + "SignedTag": "edge", + "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096", + "Signers": [ + "Repo Admin" + ] + }, + { + "SignedTag": "integ-test-base", + "Digest": "3952dc48dcc4136ccdde37fbef7e250346538a55a0366e3fccc683336377e372", + "Signers": [ + "Repo Admin" + ] + }, + { + "SignedTag": "latest", + "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478", + "Signers": [ + "Repo Admin" + ] + } + ], + "Signers": [], + "AdministrativeKeys": [ + { + "Name": "Repository", + "Keys": [ + { + "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd" + } + ] + }, + { + "Name": "Root", + "Keys": [ + { + "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce" + } + ] + } + ] + }, + { + "Name": "notary", + "SignedTags": [ + { + "SignedTag": "server", + "Digest": "71f64ab718a3331dee103bc5afc6bc492914738ce37c2d2f127a8133714ecf5c", + "Signers": [ + "Repo Admin" + ] + }, + { + "SignedTag": "signer", + "Digest": "a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8", + "Signers": [ + "Repo Admin" + ] + } + ], + "Signers": [], + "AdministrativeKeys": [ + { + "Name": "Root", + "Keys": [ + { + "ID": "8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92" + } + ] + }, + { + "Name": "Repository", + "Keys": [ + { + "ID": "85bfd031017722f950d480a721f845a2944db26a3dc084040a70f1b0d9bbb3df" + } + ] + } + ] + } ] ``` @@ -386,6 +390,7 @@ and specify their `KEYS`: ```bash $ docker trust inspect --pretty my-image:purple + SIGNED TAG DIGEST SIGNERS purple 941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557 alice, bob, carol @@ -419,6 +424,7 @@ Root Key: a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce ```bash $ docker trust inspect --pretty alpine + SIGNED TAG DIGEST SIGNERS 2.6 9ace551613070689a12857d62c30ef0daa9a376107ec0fff0e34786cedb3399b (Repo Admin) 2.7 9f08005dff552038f0ad2f46b8e65ff3d25641747d3912e3ea8da6785046561a (Repo Admin) @@ -440,6 +446,7 @@ Here's an example with signers that are set up by `docker trust` commands: ```bash $ docker trust inspect --pretty my-image + SIGNED TAG DIGEST SIGNERS red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob diff --git a/docs/reference/commandline/trust_revoke.md b/docs/reference/commandline/trust_revoke.md index 72e2d63ba9..8423c33ad8 100644 --- a/docs/reference/commandline/trust_revoke.md +++ b/docs/reference/commandline/trust_revoke.md @@ -28,7 +28,7 @@ Here's an example of a repo with two signed tags: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo SIGNED TAG DIGEST SIGNERS red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob @@ -55,7 +55,7 @@ Successfully deleted signature for example/trust-demo:red After revocation, the tag is removed from the list of released tags: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo SIGNED TAG DIGEST SIGNERS blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob @@ -75,7 +75,7 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 When no tag is specified, `docker trust` revokes all signatures that you have a signing key for. ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo SIGNED TAG DIGEST SIGNERS red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob @@ -103,7 +103,7 @@ Successfully deleted signature for example/trust-demo All tags that have `alice`'s signature on them are removed from the list of released tags: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo diff --git a/docs/reference/commandline/trust_sign.md b/docs/reference/commandline/trust_sign.md index 1e0bf50ff7..c623dac7d1 100644 --- a/docs/reference/commandline/trust_sign.md +++ b/docs/reference/commandline/trust_sign.md @@ -28,7 +28,8 @@ Options: Given an image: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin) @@ -41,6 +42,7 @@ Sign a new tag with `docker trust sign`: ```bash $ docker trust sign example/trust-demo:v2 + Signing and pushing trust metadata for example/trust-demo:v2 The push refers to a repository [docker.io/example/trust-demo] eed4e566104a: Layer already exists @@ -56,10 +58,11 @@ Enter passphrase for repository key with ID 36d4c36: Successfully signed docker.io/example/trust-demo:v2 ``` -Use `docker trust view` to list the new signature: +Use `docker trust inspect --pretty` to list the new signature: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin) v2 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 (Repo Admin) @@ -74,7 +77,7 @@ Root Key: 246d360f7c53a9021ee7d4259e3c5692f3f1f7ad4737b1ea8c7b8da741ad980b Given an image: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -94,6 +97,7 @@ Sign a new tag with `docker trust sign`: ```bash $ docker trust sign example/trust-demo:v1 + Signing and pushing trust metadata for example/trust-demo:v1 The push refers to a repository [docker.io/example/trust-demo] 26b126eb8632: Layer already exists @@ -107,10 +111,11 @@ Enter passphrase for delegation key with ID 27d42a8: Successfully signed docker.io/example/trust-demo:v1 ``` -`docker trust view` lists the new signature: +`docker trust inspect --pretty` lists the new signature: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice @@ -130,12 +135,14 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 When signing an image on a repo for the first time, `docker trust sign` sets up new keys before signing the image. ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + No signatures or cannot access example/trust-demo ``` ```bash $ docker trust sign example/trust-demo:v1 + Signing and pushing trust metadata for example/trust-demo:v1 Enter passphrase for root key with ID 36cac18: Enter passphrase for new repository key with ID 731396b: @@ -159,7 +166,8 @@ Successfully signed docker.io/example/trust-demo:v1 ``` ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 alice diff --git a/docs/reference/commandline/trust_signer_add.md b/docs/reference/commandline/trust_signer_add.md index b58f056190..e3c6f928ab 100644 --- a/docs/reference/commandline/trust_signer_add.md +++ b/docs/reference/commandline/trust_signer_add.md @@ -27,7 +27,7 @@ Options: To add a new signer, `alice`, to this repository: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -51,10 +51,10 @@ $ docker trust signer add alice example/trust-demo --key alice.crt Successfully added signer: alice to example/trust-demo ``` -`docker trust view` now lists `alice` as a valid signer: +`docker trust inspect --pretty` now lists `alice` as a valid signer: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -75,24 +75,26 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 When adding a signer on a repo for the first time, `docker trust signer add` sets up a new repo if it doesn't exist. ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + No signatures or cannot access example/trust-demo ``` ```bash $ docker trust signer add alice example/trust-demo --key alice.crt - Initializing signed repository for example/trust-demo... - Enter passphrase for root key with ID 748121c: + +Initializing signed repository for example/trust-demo... +Enter passphrase for root key with ID 748121c: Enter passphrase for new repository key with ID 95b9e55: Repeat passphrase for new repository key with ID 95b9e55: Successfully initialized "example/trust-demo" Adding signer "alice" to example/trust-demo... - Successfully added signer: alice to example/trust-demo +Successfully added signer: alice to example/trust-demo ``` ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -112,7 +114,8 @@ Root Key: 748121c14bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103 ## Add a signer to multiple repos To add a signer, `alice`, to multiple repositories: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob @@ -126,7 +129,8 @@ Repository Key: ecc457614c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 ``` ```bash -$ docker trust view example/trust-demo2 +$ docker trust inspect --pretty example/trust-demo2 + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob @@ -143,6 +147,7 @@ Add `alice` to both repositories with a single `docker trust signer add` command ```bash $ docker trust signer add alice example/trust-demo example/trust-demo2 --key alice.crt + Adding signer "alice" to example/trust-demo... Enter passphrase for repository key with ID 95b9e55: Successfully added signer: alice to example/trust-demo @@ -151,11 +156,13 @@ Adding signer "alice" to example/trust-demo2... Enter passphrase for repository key with ID ece554f: Successfully added signer: alice to example/trust-demo2 ``` -`docker trust view` now lists `alice` as a valid signer of both `example/trust-demo` and `example/trust-demo2`: + +`docker trust inspect --pretty` now lists `alice` as a valid signer of both `example/trust-demo` and `example/trust-demo2`: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob @@ -169,8 +176,10 @@ Administrative keys for example/trust-demo: Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 ``` + ```bash -$ docker trust view example/trust-demo2 +$ docker trust inspect --pretty example/trust-demo2 + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob @@ -190,6 +199,7 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 ```bash $ docker trust signer add alice example/unauthorized example/authorized --key alice.crt + Adding signer "alice" to example/unauthorized... you are not authorized to perform this operation: server returned 401. diff --git a/docs/reference/commandline/trust_signer_remove.md b/docs/reference/commandline/trust_signer_remove.md index 74dcdbf223..2e197d56d2 100644 --- a/docs/reference/commandline/trust_signer_remove.md +++ b/docs/reference/commandline/trust_signer_remove.md @@ -26,7 +26,7 @@ Options: To remove an existing signer, `alice`, from this repository: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -52,10 +52,10 @@ Enter passphrase for repository key with ID 642692c: Successfully removed alice from example/trust-demo ``` -`docker trust view` now does not list `alice` as a valid signer: +`docker trust inspect --pretty` now does not list `alice` as a valid signer: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo No signatures for example/trust-demo @@ -75,7 +75,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 To remove an existing signer, `alice`, from multiple repositories: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob @@ -91,7 +92,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 ``` ```bash -$ docker trust view example/trust-demo2 +$ docker trust inspect --pretty example/trust-demo2 + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob @@ -120,11 +122,12 @@ Enter passphrase for repository key with ID ece554f: Successfully removed alice from example/trust-demo2 ``` -Run `docker trust view` to confirm that `alice` is no longer listed as a valid +Run `docker trust inspect --pretty` to confirm that `alice` is no longer listed as a valid signer of either `example/trust-demo` or `example/trust-demo2`: ```bash -$ docker trust view example/trust-demo +$ docker trust inspect --pretty example/trust-demo + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob @@ -139,7 +142,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949 ``` ```bash -$ docker trust view example/trust-demo2 +$ docker trust inspect --pretty example/trust-demo2 + SIGNED TAG DIGEST SIGNERS v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob diff --git a/docs/reference/commandline/update.md b/docs/reference/commandline/update.md index f218f61cc2..7edeeb7fd7 100644 --- a/docs/reference/commandline/update.md +++ b/docs/reference/commandline/update.md @@ -43,8 +43,10 @@ options on a running or a stopped container. On kernel version older than 4.6, you can only update `--kernel-memory` on a stopped container or on a running container with kernel memory initialized. -> **Warning**: The `docker update` and `docker container update` commands are -> not supported for Windows containers. +> **Warning** +> +> The `docker update` and `docker container update` commands are not supported +> for Windows containers. {: .warning } ## Examples diff --git a/docs/reference/commandline/version.md b/docs/reference/commandline/version.md index 8e4997a0eb..a3abdd0738 100644 --- a/docs/reference/commandline/version.md +++ b/docs/reference/commandline/version.md @@ -33,20 +33,32 @@ describes all the details of the format. $ docker version Client: -Version: 1.8.0 -API version: 1.20 -Go version: go1.4.2 -Git commit: f5bae0a -Built: Tue Jun 23 17:56:00 UTC 2015 -OS/Arch: linux/amd64 + Version: 19.03.8 + API version: 1.40 + Go version: go1.12.17 + Git commit: afacb8b + Built: Wed Mar 11 01:21:11 2020 + OS/Arch: darwin/amd64 + Experimental: true Server: -Version: 1.8.0 -API version: 1.20 -Go version: go1.4.2 -Git commit: f5bae0a -Built: Tue Jun 23 17:56:00 UTC 2015 -OS/Arch: linux/amd64 + Engine: + Version: 19.03.8 + API version: 1.40 (minimum version 1.12) + Go version: go1.12.17 + Git commit: afacb8b + Built: Wed Mar 11 01:29:16 2020 + OS/Arch: linux/amd64 + Experimental: true + containerd: + Version: v1.2.13 + GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 + runc: + Version: 1.0.0-rc10 + GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd + docker-init: + Version: 0.18.0 + GitCommit: fec3683 ``` ### Get the server version @@ -54,7 +66,7 @@ OS/Arch: linux/amd64 ```bash $ docker version --format '{{.Server.Version}}' -1.8.0 +19.03.8 ``` ### Dump raw JSON data @@ -62,5 +74,5 @@ $ docker version --format '{{.Server.Version}}' ```bash $ docker version --format '{{json .}}' -{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}} +{"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"19.03.8","ApiVersion":"1.40","DefaultAPIVersion":"1.40","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"darwin","Arch":"amd64","BuildTime":"Wed Mar 11 01:21:11 2020","Experimental":true},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"19.03.8","Details":{"ApiVersion":"1.40","Arch":"amd64","BuildTime":"Wed Mar 11 01:29:16 2020","Experimental":"true","GitCommit":"afacb8b","GoVersion":"go1.12.17","KernelVersion":"4.19.76-linuxkit","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"v1.2.13","Details":{"GitCommit":"7ad184331fa3e55e52b890ea95e65ba581ae3429"}},{"Name":"runc","Version":"1.0.0-rc10","Details":{"GitCommit":"dc9208a3303feef5b3839f4323d9beb36df0a9dd"}},{"Name":"docker-init","Version":"0.18.0","Details":{"GitCommit":"fec3683"}}],"Version":"19.03.8","ApiVersion":"1.40","MinAPIVersion":"1.12","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"linux","Arch":"amd64","KernelVersion":"4.19.76-linuxkit","Experimental":true,"BuildTime":"2020-03-11T01:29:16.000000000+00:00"}} ``` diff --git a/docs/reference/commandline/volume.md b/docs/reference/commandline/volume.md index f28ad491d8..96ed528569 100644 --- a/docs/reference/commandline/volume.md +++ b/docs/reference/commandline/volume.md @@ -33,7 +33,7 @@ prune volumes. * [volume create](volume_create.md) * [volume inspect](volume_inspect.md) -* [volume list](volume_list.md) +* [volume list](volume_ls.md) * [volume rm](volume_rm.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) diff --git a/docs/reference/commandline/volume_create.md b/docs/reference/commandline/volume_create.md index b8057b8302..cbec1b463f 100644 --- a/docs/reference/commandline/volume_create.md +++ b/docs/reference/commandline/volume_create.md @@ -113,4 +113,4 @@ $ docker volume create --driver local \ * [volume ls](volume_ls.md) * [volume rm](volume_rm.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) diff --git a/docs/reference/commandline/volume_inspect.md b/docs/reference/commandline/volume_inspect.md index 4a5b721fb1..1335dcc4f8 100644 --- a/docs/reference/commandline/volume_inspect.md +++ b/docs/reference/commandline/volume_inspect.md @@ -28,19 +28,26 @@ details of the format. ```bash $ docker volume create -85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d + +8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5 + $ docker volume inspect 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d + [ { - "Name": "85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d", - "Driver": "local", - "Mountpoint": "/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data", - "Status": null + "CreatedAt": "2020-04-19T11:00:21Z", + "Driver": "local", + "Labels": {}, + "Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data", + "Name": "8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5", + "Options": {}, + "Scope": "local" } ] -$ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d -/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data +$ docker volume inspect --format '{{ .Mountpoint }}' 8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5 + +/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data ``` ## Related commands @@ -49,4 +56,4 @@ $ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc * [volume ls](volume_ls.md) * [volume rm](volume_rm.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) diff --git a/docs/reference/commandline/volume_ls.md b/docs/reference/commandline/volume_ls.md index dc922365cb..f7463572dc 100644 --- a/docs/reference/commandline/volume_ls.md +++ b/docs/reference/commandline/volume_ls.md @@ -57,10 +57,10 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b The currently supported filters are: -* dangling (boolean - true or false, 0 or 1) -* driver (a volume driver's name) -* label (`label=` or `label==`) -* name (a volume's name) +- dangling (boolean - true or false, 0 or 1) +- driver (a volume driver's name) +- label (`label=` or `label==`) +- name (a volume's name) #### dangling @@ -187,4 +187,4 @@ vol3: local * [volume inspect](volume_inspect.md) * [volume rm](volume_rm.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) diff --git a/docs/reference/commandline/volume_prune.md b/docs/reference/commandline/volume_prune.md index f11c89002e..9906d60b12 100644 --- a/docs/reference/commandline/volume_prune.md +++ b/docs/reference/commandline/volume_prune.md @@ -56,7 +56,7 @@ volumes without the specified labels. * [volume ls](volume_ls.md) * [volume inspect](volume_inspect.md) * [volume rm](volume_rm.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) * [system df](system_df.md) * [container prune](container_prune.md) * [image prune](image_prune.md) diff --git a/docs/reference/commandline/volume_rm.md b/docs/reference/commandline/volume_rm.md index 03bfcb0385..8095c489a7 100644 --- a/docs/reference/commandline/volume_rm.md +++ b/docs/reference/commandline/volume_rm.md @@ -26,8 +26,9 @@ Remove one or more volumes. You cannot remove a volume that is in use by a conta ## Examples ```bash - $ docker volume rm hello - hello +$ docker volume rm hello + +hello ``` ## Related commands @@ -36,4 +37,4 @@ Remove one or more volumes. You cannot remove a volume that is in use by a conta * [volume inspect](volume_inspect.md) * [volume ls](volume_ls.md) * [volume prune](volume_prune.md) -* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/) +* [Understand Data Volumes](https://docs.docker.com/storage/volumes/) diff --git a/docs/reference/commandline/wait.md b/docs/reference/commandline/wait.md index 4b4e5ba139..2a903b13ed 100644 --- a/docs/reference/commandline/wait.md +++ b/docs/reference/commandline/wait.md @@ -15,8 +15,10 @@ Options: --help Print usage ``` -> **Note**: `docker wait` returns `0` when run against a container which had -> already exited before the `docker wait` command was run. +> **Note** +> +> `docker wait` returns `0` when run against a container which had already +> exited before the `docker wait` command was run. ## Examples