From f552eb7ae08c7c1ed827df847c905abf5c3b2f82 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 11 Dec 2023 22:07:48 +0100 Subject: [PATCH 1/2] update cli docs to latest of 24.0 branch Signed-off-by: Sebastiaan van Stijn --- _vendor/github.com/docker/cli/docs/deprecated.md | 2 -- .../github.com/docker/cli/docs/extend/legacy_plugins.md | 2 +- .../docker/cli/docs/extend/plugins_authorization.md | 2 +- .../docker/cli/docs/extend/plugins_graphdriver.md | 4 ---- .../github.com/docker/cli/docs/extend/plugins_logging.md | 2 +- .../github.com/docker/cli/docs/extend/plugins_services.md | 2 -- .../docker/cli/docs/reference/commandline/cli.md | 6 ++---- .../docker/cli/docs/reference/commandline/dockerd.md | 4 ++-- _vendor/github.com/docker/cli/docs/reference/run.md | 8 +------- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 4 ++++ 12 files changed, 14 insertions(+), 26 deletions(-) diff --git a/_vendor/github.com/docker/cli/docs/deprecated.md b/_vendor/github.com/docker/cli/docs/deprecated.md index b0d50165ac..bf653dec3d 100644 --- a/_vendor/github.com/docker/cli/docs/deprecated.md +++ b/_vendor/github.com/docker/cli/docs/deprecated.md @@ -821,9 +821,7 @@ Because of which, the driver specific log tag options `syslog-tag`, `gelf-tag` a `fluentd-tag` have been deprecated in favor of the generic `tag` option. ```console -{% raw %} $ docker --log-driver=syslog --log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}" -{% endraw %} ``` diff --git a/_vendor/github.com/docker/cli/docs/extend/legacy_plugins.md b/_vendor/github.com/docker/cli/docs/extend/legacy_plugins.md index d3981bd076..6c842ac473 100644 --- a/_vendor/github.com/docker/cli/docs/extend/legacy_plugins.md +++ b/_vendor/github.com/docker/cli/docs/extend/legacy_plugins.md @@ -1,5 +1,5 @@ --- -redirect_from: +aliases: - "/engine/extend/plugins/" description: "How to add additional functionality to Docker with plugins extensions" keywords: "Examples, Usage, plugins, docker, documentation, user guide" diff --git a/_vendor/github.com/docker/cli/docs/extend/plugins_authorization.md b/_vendor/github.com/docker/cli/docs/extend/plugins_authorization.md index 2fc444e101..203c1bf2e2 100644 --- a/_vendor/github.com/docker/cli/docs/extend/plugins_authorization.md +++ b/_vendor/github.com/docker/cli/docs/extend/plugins_authorization.md @@ -1,7 +1,7 @@ --- description: "How to create authorization plugins to manage access control to your Docker daemon." keywords: "security, authorization, authentication, docker, documentation, plugin, extend" -redirect_from: +aliases: - "/engine/extend/authorization/" --- diff --git a/_vendor/github.com/docker/cli/docs/extend/plugins_graphdriver.md b/_vendor/github.com/docker/cli/docs/extend/plugins_graphdriver.md index f0c88f734f..f6558d7f1e 100644 --- a/_vendor/github.com/docker/cli/docs/extend/plugins_graphdriver.md +++ b/_vendor/github.com/docker/cli/docs/extend/plugins_graphdriver.md @@ -311,9 +311,7 @@ and `Parent`. `Parent` may be an empty string, in which case there is no parent. **Response**: ``` -{% raw %} {{ TAR STREAM }} -{% endraw %} ``` ### /GraphDriver.Changes @@ -357,9 +355,7 @@ Respond with a non-empty string error if an error occurred. **Request**: ``` -{% raw %} {{ TAR STREAM }} -{% endraw %} ``` Extract the changeset from the given diff into the layer with the specified `ID` diff --git a/_vendor/github.com/docker/cli/docs/extend/plugins_logging.md b/_vendor/github.com/docker/cli/docs/extend/plugins_logging.md index 6405dd26cf..d6ce96cfb3 100644 --- a/_vendor/github.com/docker/cli/docs/extend/plugins_logging.md +++ b/_vendor/github.com/docker/cli/docs/extend/plugins_logging.md @@ -213,7 +213,7 @@ to determine what set of logs to read. **Response**: ``` -{% raw %}{{ log stream }}{% endraw %} +{{ log stream }} ``` The response should be the encoded log message using the same format as the diff --git a/_vendor/github.com/docker/cli/docs/extend/plugins_services.md b/_vendor/github.com/docker/cli/docs/extend/plugins_services.md index 20889dd976..f0c2dc503d 100644 --- a/_vendor/github.com/docker/cli/docs/extend/plugins_services.md +++ b/_vendor/github.com/docker/cli/docs/extend/plugins_services.md @@ -69,10 +69,8 @@ node1 is the manager and node2 is the worker. 4. Observe the task getting scheduled in node 2: ```console - {% raw %} $ docker ps --format '{{.ID}}\t {{.Status}} {{.Names}} {{.Command}}' 83fc1e842599 Up 2 days my-service.1.9jn59qzn7nbc3m0zt1hij12xs "top" - {% endraw %} ``` ### Network plugins diff --git a/_vendor/github.com/docker/cli/docs/reference/commandline/cli.md b/_vendor/github.com/docker/cli/docs/reference/commandline/cli.md index 92f4f39074..8714cd6b70 100644 --- a/_vendor/github.com/docker/cli/docs/reference/commandline/cli.md +++ b/_vendor/github.com/docker/cli/docs/reference/commandline/cli.md @@ -2,7 +2,7 @@ title: "Use the Docker command line" description: "Docker's CLI command description and usage" keywords: "Docker, Docker documentation, CLI, command line, config.json, CLI configuration file" -redirect_from: +aliases: - /reference/commandline/cli/ - /engine/reference/commandline/engine/ - /engine/reference/commandline/engine_activate/ @@ -156,7 +156,7 @@ By default, the Docker command line stores its configuration files in a directory called `.docker` within your `$HOME` directory. Docker manages most of the files in the configuration directory -and you should not modify them. However, you *can* modify the +and you should not modify them. However, you can modify the `config.json` file to control certain aspects of how the `docker` command behaves. @@ -313,7 +313,6 @@ Following is a sample `config.json` file to illustrate the format used for various fields: ```json -{% raw %} { "HttpHeaders": { "MyHeader": "MyValue" @@ -356,7 +355,6 @@ various fields: } } } -{% endraw %} ``` ### Experimental features diff --git a/_vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md b/_vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md index 9a62bbf97d..1c9f8e1837 100644 --- a/_vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md +++ b/_vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md @@ -2,7 +2,7 @@ title: "dockerd" description: "The daemon command description and usage" keywords: "container, daemon, runtime" -redirect_from: +aliases: - /engine/reference/commandline/daemon/ --- @@ -205,7 +205,7 @@ find examples of using Systemd socket activation with Docker and Systemd in the You can configure the Docker daemon to listen to multiple sockets at the same time using multiple `-H` options: -The example below runs the daemon listenin on the default unix socket, and +The example below runs the daemon listening on the default unix socket, and on 2 specific IP addresses on this host: ```console diff --git a/_vendor/github.com/docker/cli/docs/reference/run.md b/_vendor/github.com/docker/cli/docs/reference/run.md index 5737bb3dc5..200ef75f24 100644 --- a/_vendor/github.com/docker/cli/docs/reference/run.md +++ b/_vendor/github.com/docker/cli/docs/reference/run.md @@ -1,7 +1,7 @@ --- description: "Configure containers at runtime" keywords: "docker, run, configure, runtime" -redirect_from: +aliases: - /reference/run/ --- @@ -570,19 +570,15 @@ for a container can be obtained via [`docker inspect`](commandline/inspect.md). for container "my-container"; ```console -{% raw %} $ docker inspect -f "{{ .RestartCount }}" my-container # 2 -{% endraw %} ``` Or, to get the last time the container was (re)started; ```console -{% raw %} $ docker inspect -f "{{ .State.StartedAt }}" my-container # 2015-03-04T23:47:07.691840179Z -{% endraw %} ``` Combining `--restart` (restart policy) with the `--rm` (clean up) flag results @@ -1646,7 +1642,6 @@ Similarly the operator can set the **HOSTNAME** (Linux) or **COMPUTERNAME** (Win Example: ```console -{% raw %} $ docker run --name=test -d \ --health-cmd='stat /etc/passwd || exit 1' \ --health-interval=2s \ @@ -1691,7 +1686,6 @@ $ sleep 2; docker inspect --format='{{json .State.Health}}' test } ] } -{% endraw %} ``` The health status is also displayed in the `docker ps` output. diff --git a/_vendor/modules.txt b/_vendor/modules.txt index a1d22561e6..d36ff2fd99 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -2,6 +2,6 @@ # github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6 # github.com/docker/buildx v0.12.0 # github.com/docker/scout-cli v1.2.0 -# github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible +# github.com/docker/cli v24.0.8-0.20231211210310-fb2f337bc1b1+incompatible # github.com/compose-spec/compose-spec v0.0.0-20231121152139-478928e7c9f8 # github.com/docker/compose/v2 v2.23.3 diff --git a/go.mod b/go.mod index a3238d0539..c7bd5a621c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.21.1 require ( github.com/compose-spec/compose-spec v0.0.0-20231121152139-478928e7c9f8 // indirect github.com/docker/buildx v0.12.0 // indirect - github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible // indirect + github.com/docker/cli v24.0.8-0.20231211210310-fb2f337bc1b1+incompatible // indirect github.com/docker/compose/v2 v2.23.3 // indirect github.com/docker/scout-cli v1.2.0 // indirect github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6 // indirect diff --git a/go.sum b/go.sum index ffa67d4ec1..3331d5e85d 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,10 @@ github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWT github.com/docker/cli v24.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible h1:tXZk7C97vINae9YYzPtqoClal32VoMl8gz6gLjJ6Kdg= github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v24.0.8-0.20231211210310-fb2f337bc1b1+incompatible h1:3hcKPFXxdqoVzoIrjNF1NNb36kzFiEimwUegOhw0pC0= +github.com/docker/cli v24.0.8-0.20231211210310-fb2f337bc1b1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v25.0.0-beta.1+incompatible h1:bJzIgR4mKNpceAwwi19SqZK0AbztMc3nQTgnvxxyY/A= +github.com/docker/cli v25.0.0-beta.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/compose-cli v1.0.35 h1:uZyEHLalfqBS2PiTpA1LAULyJmuQ+YtZg7nG4Xl3/Cc= github.com/docker/compose-cli v1.0.35/go.mod h1:mSXI4hFLpRU3EtI8NTo32bNwI0UXSr8jnq+/rYjGAUU= github.com/docker/compose/v2 v2.22.0 h1:3rRz4L7tPU75wRsV8JZh2/aTgerQvPa1cpzZN+tHqUY= From 61b6126aa06349c1c3cfaec85bf49891fee7bd87 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 11 Dec 2023 22:22:58 +0100 Subject: [PATCH 2/2] engine: update cli-reference yaml-docs Signed-off-by: Sebastiaan van Stijn --- data/engine-cli/docker_build.yaml | 2 +- data/engine-cli/docker_builder_build.yaml | 2 +- data/engine-cli/docker_config_inspect.yaml | 2 +- data/engine-cli/docker_events.yaml | 15 ++++++++++++--- data/engine-cli/docker_exec.yaml | 8 ++++---- data/engine-cli/docker_image_build.yaml | 2 +- data/engine-cli/docker_info.yaml | 2 +- data/engine-cli/docker_inspect.yaml | 2 +- data/engine-cli/docker_load.yaml | 2 +- data/engine-cli/docker_logs.yaml | 2 +- data/engine-cli/docker_node_inspect.yaml | 2 +- data/engine-cli/docker_ps.yaml | 16 +++++++++++++--- data/engine-cli/docker_pull.yaml | 16 ++++++++-------- data/engine-cli/docker_run.yaml | 4 +++- data/engine-cli/docker_secret_inspect.yaml | 2 +- data/engine-cli/docker_service_create.yaml | 2 +- data/engine-cli/docker_service_inspect.yaml | 2 +- data/engine-cli/docker_service_logs.yaml | 2 +- data/engine-cli/docker_system_events.yaml | 8 ++++++-- data/engine-cli/docker_system_prune.yaml | 6 +++--- data/engine-cli/docker_tag.yaml | 2 +- data/engine-cli/docker_volume_inspect.yaml | 2 +- data/engine-cli/docker_volume_prune.yaml | 2 +- 23 files changed, 65 insertions(+), 40 deletions(-) diff --git a/data/engine-cli/docker_build.yaml b/data/engine-cli/docker_build.yaml index 4006e80197..cc33f274b1 100644 --- a/data/engine-cli/docker_build.yaml +++ b/data/engine-cli/docker_build.yaml @@ -141,7 +141,7 @@ options: swarm: false - option: cgroup-parent value_type: string - description: Optional parent cgroup for the container + description: Set the parent cgroup for the `RUN` instructions during build details_url: '#cgroup-parent' deprecated: false hidden: false diff --git a/data/engine-cli/docker_builder_build.yaml b/data/engine-cli/docker_builder_build.yaml index b3ddc82567..a1e81a6190 100644 --- a/data/engine-cli/docker_builder_build.yaml +++ b/data/engine-cli/docker_builder_build.yaml @@ -36,7 +36,7 @@ options: swarm: false - option: cgroup-parent value_type: string - description: Optional parent cgroup for the container + description: Set the parent cgroup for the `RUN` instructions during build deprecated: false hidden: false experimental: false diff --git a/data/engine-cli/docker_config_inspect.yaml b/data/engine-cli/docker_config_inspect.yaml index 0cdfe1dc63..72bf69b3c3 100644 --- a/data/engine-cli/docker_config_inspect.yaml +++ b/data/engine-cli/docker_config_inspect.yaml @@ -6,7 +6,7 @@ long: |- By default, this renders all results in a JSON array. If a format is specified, the given template will be executed for each result. - Go's [text/template](https://golang.org/pkg/text/template/) package + Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. For detailed information about using configs, refer to [store configuration data using Docker Configs](/engine/swarm/configs/). diff --git a/data/engine-cli/docker_events.yaml b/data/engine-cli/docker_events.yaml index 0758f841c1..492cbd94e6 100644 --- a/data/engine-cli/docker_events.yaml +++ b/data/engine-cli/docker_events.yaml @@ -175,7 +175,7 @@ long: |- If a format (`--format`) is specified, the given template will be executed instead of the default - format. Go's [text/template](https://golang.org/pkg/text/template/) package + format. Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. If a format is set to `{{json .}}`, the events are streamed as valid JSON @@ -196,7 +196,11 @@ options: swarm: false - option: format value_type: string - description: Format the output using the given Go template + description: |- + Format output using a custom template: + 'json': Print in JSON format + 'TEMPLATE': Print output using the given Go template. + Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates deprecated: false hidden: false experimental: false @@ -432,8 +436,11 @@ examples: |- #### Format as JSON + To list events in JSON format, use the `json` directive, which is the equivalent + of `--format '{{ json . }}`. + ```console - $ docker events --format '{{json .}}' + $ docker events --format json {"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. {"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. @@ -441,6 +448,8 @@ examples: |- {"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42.. {"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4.. ``` + + . deprecated: false experimental: false experimentalcli: false diff --git a/data/engine-cli/docker_exec.yaml b/data/engine-cli/docker_exec.yaml index f510a65dfd..dd3d030cd3 100644 --- a/data/engine-cli/docker_exec.yaml +++ b/data/engine-cli/docker_exec.yaml @@ -162,10 +162,10 @@ examples: |- Next, set environment variables in the current bash session. - By default, the `docker exec` command, inherits the environment variables that - are set at the time the container is created. Use the `--env` (or the `-e` shorthand) - to override global environment variables, or to set additional environment variables - for the process started by `docker exec`. + The `docker exec` command inherits the environment variables that are set at the + time the container is created. Use the `--env` (or the `-e` shorthand) to + override global environment variables, or to set additional environment + variables for the process started by `docker exec`. The example below creates a new shell session in the container `mycontainer` with environment variables `$VAR_A` and `$VAR_B` set to "1" and "2" respectively. diff --git a/data/engine-cli/docker_image_build.yaml b/data/engine-cli/docker_image_build.yaml index 97d5599817..bc6e4be254 100644 --- a/data/engine-cli/docker_image_build.yaml +++ b/data/engine-cli/docker_image_build.yaml @@ -36,7 +36,7 @@ options: swarm: false - option: cgroup-parent value_type: string - description: Optional parent cgroup for the container + description: Set the parent cgroup for the `RUN` instructions during build deprecated: false hidden: false experimental: false diff --git a/data/engine-cli/docker_info.yaml b/data/engine-cli/docker_info.yaml index 35ae1cad87..9bcbf60f08 100644 --- a/data/engine-cli/docker_info.yaml +++ b/data/engine-cli/docker_info.yaml @@ -8,7 +8,7 @@ long: |- under different names is counted only once. If a format is specified, the given template will be executed instead of the - default format. Go's [text/template](https://golang.org/pkg/text/template/) package + default format. Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. Depending on the storage driver in use, additional information can be shown, such diff --git a/data/engine-cli/docker_inspect.yaml b/data/engine-cli/docker_inspect.yaml index c33a219573..2d83abe651 100644 --- a/data/engine-cli/docker_inspect.yaml +++ b/data/engine-cli/docker_inspect.yaml @@ -9,7 +9,7 @@ long: |- If a format is specified, the given template will be executed for each result. - Go's [text/template](https://golang.org/pkg/text/template/) package describes + Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. ### Specify target type (--type) {#type} diff --git a/data/engine-cli/docker_load.yaml b/data/engine-cli/docker_load.yaml index a64df8e0bf..b308f69a94 100644 --- a/data/engine-cli/docker_load.yaml +++ b/data/engine-cli/docker_load.yaml @@ -3,7 +3,7 @@ aliases: docker image load, docker load short: Load an image from a tar archive or STDIN long: |- Load an image or repository from a tar archive (even if compressed with gzip, - bzip2, or xz) from a file or STDIN. It restores both images and tags. + bzip2, xz or zstd) from a file or STDIN. It restores both images and tags. usage: docker load [OPTIONS] pname: docker plink: docker.yaml diff --git a/data/engine-cli/docker_logs.yaml b/data/engine-cli/docker_logs.yaml index 320f0fe4de..282c3f03f9 100644 --- a/data/engine-cli/docker_logs.yaml +++ b/data/engine-cli/docker_logs.yaml @@ -13,7 +13,7 @@ long: |- Passing a negative number or a non-integer to `--tail` is invalid and the value is set to `all` in that case. - The `docker logs --timestamps` command will add an [RFC3339Nano timestamp](https://golang.org/pkg/time/#pkg-constants) + The `docker logs --timestamps` command will add an [RFC3339Nano timestamp](https://pkg.go.dev/time#RFC3339Nano) , for example `2014-09-16T06:17:46.000000000Z`, to each log entry. To ensure that the timestamps are aligned the nano-second part of the timestamp will be padded with zero when necessary. diff --git a/data/engine-cli/docker_node_inspect.yaml b/data/engine-cli/docker_node_inspect.yaml index fd2ffd1847..862f4a6c09 100644 --- a/data/engine-cli/docker_node_inspect.yaml +++ b/data/engine-cli/docker_node_inspect.yaml @@ -4,7 +4,7 @@ long: |- Returns information about a node. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a given template for each result. Go's - [text/template](https://golang.org/pkg/text/template/) package describes all the + [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. > **Note** diff --git a/data/engine-cli/docker_ps.yaml b/data/engine-cli/docker_ps.yaml index f349a89b23..29a9b343e3 100644 --- a/data/engine-cli/docker_ps.yaml +++ b/data/engine-cli/docker_ps.yaml @@ -262,9 +262,19 @@ examples: |- #### status - The `status` filter matches containers by status. You can filter using - `created`, `restarting`, `running`, `removing`, `paused`, `exited` and `dead`. For example, - to filter for `running` containers: + The `status` filter matches containers by status. The possible values for the container status are: + + | Status | Description | + | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `created` | A container that has never been started. | + | `running` | A running container, started by either `docker start` or `docker run`. | + | `paused` | A paused container. See `docker pause`. | + | `restarting` | A container which is starting due to the designated restart policy for that container. | + | `exited` | A container which is no longer running. For example, the process inside the container completed or the container was stopped using the `docker stop` command. | + | `removing` | A container which is in the process of being removed. See `docker rm`. | + | `dead` | A "defunct" container; for example, a container that was only partially removed because resources were kept busy by an external process. `dead` containers cannot be (re)started, only removed. | + + For example, to filter for `running` containers: ```console $ docker ps --filter status=running diff --git a/data/engine-cli/docker_pull.yaml b/data/engine-cli/docker_pull.yaml index 4900ff3171..266b96be65 100644 --- a/data/engine-cli/docker_pull.yaml +++ b/data/engine-cli/docker_pull.yaml @@ -104,18 +104,18 @@ examples: |- Docker images can consist of multiple layers. In the example above, the image consists of a single layer; `e756f3fdd6a3`. - Layers can be reused by images. For example, the `debian:bullseye` image shares - its layer with the `debian:latest`. Pulling the `debian:bullseye` image therefore + Layers can be reused by images. For example, the `debian:bookworm` image shares + its layer with the `debian:latest`. Pulling the `debian:bookworm` image therefore only pulls its metadata, but not its layers, because the layer is already present locally: ```console - $ docker image pull debian:bullseye + $ docker image pull debian:bookworm - bullseye: Pulling from library/debian + bookworm: Pulling from library/debian Digest: sha256:3f1d6c17773a45c97bd8f158d665c9709d7b29ed7917ac934086ad96f92e4510 - Status: Downloaded newer image for debian:bullseye - docker.io/library/debian:bullseye + Status: Downloaded newer image for debian:bookworm + docker.io/library/debian:bookworm ``` To see which images are present locally, use the [`docker images`](images.md) @@ -125,13 +125,13 @@ examples: |- $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE - debian bullseye 4eacea30377a 8 days ago 124MB + debian bookworm 4eacea30377a 8 days ago 124MB debian latest 4eacea30377a 8 days ago 124MB ``` Docker uses a content-addressable image store, and the image ID is a SHA256 digest covering the image's configuration and layers. In the example above, - `debian:bullseye` and `debian:latest` have the same image ID because they are + `debian:bookworm` and `debian:latest` have the same image ID because they are the *same* image tagged with different names. Because they are the same image, their layers are stored only once and do not consume extra disk space. diff --git a/data/engine-cli/docker_run.yaml b/data/engine-cli/docker_run.yaml index 5cd1053367..40d6b61f69 100644 --- a/data/engine-cli/docker_run.yaml +++ b/data/engine-cli/docker_run.yaml @@ -1360,6 +1360,8 @@ examples: |- You can also load the environment variables from a file. This file should use the syntax `=value` (which sets the variable to the given value) or `` (which takes the value from the local environment), and `#` for comments. + Additionally, it's important to note that lines beginning with `#` are treated as line comments + and are ignored, whereas a `#` appearing anywhere else in a line is treated as part of the variable value. ```console $ cat env.list @@ -1622,7 +1624,7 @@ examples: |- following rule: ```console - $ docker run -d --device-cgroup-rule='c 42:* rmw' -name my-container my-image + $ docker run -d --device-cgroup-rule='c 42:* rmw' --name my-container my-image ``` Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 ` diff --git a/data/engine-cli/docker_secret_inspect.yaml b/data/engine-cli/docker_secret_inspect.yaml index 85e8ca0598..ff5dca8f35 100644 --- a/data/engine-cli/docker_secret_inspect.yaml +++ b/data/engine-cli/docker_secret_inspect.yaml @@ -6,7 +6,7 @@ long: |- By default, this renders all results in a JSON array. If a format is specified, the given template will be executed for each result. - Go's [text/template](https://golang.org/pkg/text/template/) package + Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](/engine/swarm/secrets/). diff --git a/data/engine-cli/docker_service_create.yaml b/data/engine-cli/docker_service_create.yaml index 66c0458feb..d2d923fcae 100644 --- a/data/engine-cli/docker_service_create.yaml +++ b/data/engine-cli/docker_service_create.yaml @@ -1682,7 +1682,7 @@ examples: |- ### Create services using templates You can use templates for some flags of `service create`, using the syntax - provided by the Go's [text/template](https://golang.org/pkg/text/template/) package. + provided by the Go's [text/template](https://pkg.go.dev/text/template) package. The supported flags are the following : diff --git a/data/engine-cli/docker_service_inspect.yaml b/data/engine-cli/docker_service_inspect.yaml index 731eeb3f03..5438f72be9 100644 --- a/data/engine-cli/docker_service_inspect.yaml +++ b/data/engine-cli/docker_service_inspect.yaml @@ -6,7 +6,7 @@ long: |- By default, this renders all results in a JSON array. If a format is specified, the given template will be executed for each result. - Go's [text/template](https://golang.org/pkg/text/template/) package + Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. > **Note** diff --git a/data/engine-cli/docker_service_logs.yaml b/data/engine-cli/docker_service_logs.yaml index 5454520ffb..74efc261d9 100644 --- a/data/engine-cli/docker_service_logs.yaml +++ b/data/engine-cli/docker_service_logs.yaml @@ -29,7 +29,7 @@ long: |- Passing a negative number or a non-integer to `--tail` is invalid and the value is set to `all` in that case. - The `docker service logs --timestamps` command will add an [RFC3339Nano timestamp](https://golang.org/pkg/time/#pkg-constants) + The `docker service logs --timestamps` command will add an [RFC3339Nano timestamp](https://pkg.go.dev/time#RFC3339Nano) , for example `2014-09-16T06:17:46.000000000Z`, to each log entry. To ensure that the timestamps are aligned the nano-second part of the timestamp will be padded with zero when necessary. diff --git a/data/engine-cli/docker_system_events.yaml b/data/engine-cli/docker_system_events.yaml index 57f5042da7..aab5ab3e26 100644 --- a/data/engine-cli/docker_system_events.yaml +++ b/data/engine-cli/docker_system_events.yaml @@ -140,7 +140,11 @@ options: swarm: false - option: format value_type: string - description: Format the output using the given Go template + description: |- + Format output using a custom template: + 'json': Print in JSON format + 'TEMPLATE': Print output using the given Go template. + Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates details_url: '#format' deprecated: false hidden: false @@ -340,7 +344,7 @@ examples: |- ### Format the output (--format) {#format} If a format (`--format`) is specified, the given template will be executed - instead of the default format. Go's [text/template](https://golang.org/pkg/text/template/) + instead of the default format. Go's [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. ```console diff --git a/data/engine-cli/docker_system_prune.yaml b/data/engine-cli/docker_system_prune.yaml index 5c02f27100..709bb97ff3 100644 --- a/data/engine-cli/docker_system_prune.yaml +++ b/data/engine-cli/docker_system_prune.yaml @@ -43,7 +43,7 @@ options: - option: volumes value_type: bool default_value: "false" - description: Prune volumes + description: Prune anonymous volumes deprecated: false hidden: false experimental: false @@ -90,7 +90,7 @@ examples: |- By default, volumes are not removed to prevent important data from being deleted if there is currently no container using the volume. Use the `--volumes` - flag when running the command to prune volumes as well: + flag when running the command to prune anonymous volumes as well: ```console $ docker system prune -a --volumes @@ -98,7 +98,7 @@ examples: |- WARNING! This will remove: - all stopped containers - all networks not used by at least one container - - all volumes not used by at least one container + - all anonymous volumes not used by at least one container - all images without at least one container associated to them - all build cache Are you sure you want to continue? [y/N] y diff --git a/data/engine-cli/docker_tag.yaml b/data/engine-cli/docker_tag.yaml index b2e37879eb..dce541008e 100644 --- a/data/engine-cli/docker_tag.yaml +++ b/data/engine-cli/docker_tag.yaml @@ -13,7 +13,7 @@ long: |- canonical reference for Docker's public registry. - `PORT_NUMBER`: If a hostname is present, it may optionally be followed by a registry port number in the format `:8080`. - - `PATH`: The path consists consists of slash-separated components. Each + - `PATH`: The path consists of slash-separated components. Each component may contain lowercase letters, digits and separators. A separator is defined as a period, one or two underscores, or one or more hyphens. A component may not start or end with a separator. While the diff --git a/data/engine-cli/docker_volume_inspect.yaml b/data/engine-cli/docker_volume_inspect.yaml index 3a15ef3d4b..c600873649 100644 --- a/data/engine-cli/docker_volume_inspect.yaml +++ b/data/engine-cli/docker_volume_inspect.yaml @@ -4,7 +4,7 @@ long: |- Returns information about a volume. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a given template for each result. Go's - [text/template](https://golang.org/pkg/text/template/) package describes all the + [text/template](https://pkg.go.dev/text/template) package describes all the details of the format. usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] pname: docker volume diff --git a/data/engine-cli/docker_volume_prune.yaml b/data/engine-cli/docker_volume_prune.yaml index 4e5fef5ad9..4309a86b06 100644 --- a/data/engine-cli/docker_volume_prune.yaml +++ b/data/engine-cli/docker_volume_prune.yaml @@ -1,5 +1,5 @@ command: docker volume prune -short: Remove all unused local volumes +short: Remove unused local volumes long: |- Remove all unused local volumes. Unused local volumes are those which are not referenced by any containers. By default, it only removes anonymous volumes.