From 885f44a5ba21a5c644b24f1f3367a375883fa1d8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Mar 2022 14:33:44 +0200 Subject: [PATCH] docs: fix (table) formatting, fix some broken links Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/config_ls.md | 2 +- docs/reference/commandline/context.md | 45 +++++++++++++++++++ docs/reference/commandline/context_ls.md | 2 +- docs/reference/commandline/context_use.md | 1 + docs/reference/commandline/dockerd.md | 2 +- docs/reference/commandline/history.md | 14 +++--- docs/reference/commandline/images.md | 18 ++++---- docs/reference/commandline/import.md | 7 ++- docs/reference/commandline/index.md | 4 +- docs/reference/commandline/network_connect.md | 10 +++-- docs/reference/commandline/network_create.md | 2 +- docs/reference/commandline/network_ls.md | 22 ++++----- docs/reference/commandline/node_ls.md | 20 ++++----- docs/reference/commandline/node_ps.md | 20 ++++----- docs/reference/commandline/plugin_ls.md | 14 +++--- docs/reference/commandline/ps.md | 3 +- docs/reference/commandline/search.md | 2 +- docs/reference/commandline/secret_ls.md | 2 +- docs/reference/commandline/service_create.md | 19 ++++---- docs/reference/commandline/service_ls.md | 17 +++---- docs/reference/commandline/service_ps.md | 20 ++++----- docs/reference/commandline/stack_ls.md | 3 +- docs/reference/commandline/stack_ps.md | 20 ++++----- docs/reference/commandline/stack_services.md | 15 ++++--- docs/reference/commandline/stats.md | 23 +++++----- docs/reference/commandline/system_df.md | 5 ++- docs/reference/commandline/volume_ls.md | 17 +++---- 27 files changed, 191 insertions(+), 138 deletions(-) create mode 100644 docs/reference/commandline/context.md diff --git a/docs/reference/commandline/config_ls.md b/docs/reference/commandline/config_ls.md index 196203422c..3323b4bdf6 100644 --- a/docs/reference/commandline/config_ls.md +++ b/docs/reference/commandline/config_ls.md @@ -113,7 +113,7 @@ using a Go template. Valid placeholders for the Go template are listed below: | Placeholder | Description | -| ------------ | ------------------------------------------------------------------------------------ | +|--------------|--------------------------------------------------------------------------------------| | `.ID` | Config ID | | `.Name` | Config name | | `.CreatedAt` | Time when the config was created | diff --git a/docs/reference/commandline/context.md b/docs/reference/commandline/context.md new file mode 100644 index 0000000000..6d3420de7d --- /dev/null +++ b/docs/reference/commandline/context.md @@ -0,0 +1,45 @@ +--- +title: "context" +description: "The context command description and usage" +keywords: "context" +--- + +# config + +```markdown +Manage contexts + +Usage: +docker context [command] + +Available Commands: +create Create new context +export Export a context to a tar or kubeconfig file +import Import a context from a tar or zip file +inspect Display detailed information on one or more contexts +list List available contexts +rm Remove one or more contexts +show Print the current context +update Update a context +use Set the default context + +Flags: +-h, --help Help for context + +Use "docker context [command] --help" for more information about a command. +``` + +## Description + +Manage contexts. + +## Related commands + +* [context create](context_create.md) +* [context export](context_export.md) +* [context import](context_import.md) +* [context inspect](context_inspect.md) +* [context list](context_ls.md) +* [context rm](context_rm.md) +* [context update](context_update.md) +* [context use](context_use.md) diff --git a/docs/reference/commandline/context_ls.md b/docs/reference/commandline/context_ls.md index aec714b5d4..89f2b80638 100644 --- a/docs/reference/commandline/context_ls.md +++ b/docs/reference/commandline/context_ls.md @@ -36,4 +36,4 @@ NAME DESCRIPTION DOCKER ENDPOINT default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm production tcp:///prod.corp.example.com:2376 staging tcp:///stage.corp.example.com:2376 -``` \ No newline at end of file +``` diff --git a/docs/reference/commandline/context_use.md b/docs/reference/commandline/context_use.md index 17ed940c01..7e8d68a511 100644 --- a/docs/reference/commandline/context_use.md +++ b/docs/reference/commandline/context_use.md @@ -13,6 +13,7 @@ Set the current docker context ``` ## Description + Set the default context to use, when `DOCKER_HOST`, `DOCKER_CONTEXT` environment variables and `--host`, `--context` global options are not set. To disable usage of contexts, you can use the special `default` context. diff --git a/docs/reference/commandline/dockerd.md b/docs/reference/commandline/dockerd.md index 95c5d31c78..ffb8a0cefa 100644 --- a/docs/reference/commandline/dockerd.md +++ b/docs/reference/commandline/dockerd.md @@ -771,7 +771,7 @@ time of writing, the following is the list of `libdm` log levels as well as their corresponding levels when output by `dockerd`. | `libdm` Level | Value | `--log-level` | -| ------------- | -----:| ------------- | +|---------------|------:|---------------| | `_LOG_FATAL` | 2 | error | | `_LOG_ERR` | 3 | error | | `_LOG_WARN` | 4 | warn | diff --git a/docs/reference/commandline/history.md b/docs/reference/commandline/history.md index bbff26df3b..26331b61eb 100644 --- a/docs/reference/commandline/history.md +++ b/docs/reference/commandline/history.md @@ -54,14 +54,14 @@ using a Go template. Valid placeholders for the Go template are listed below: -| Placeholder | Description | -| --------------- | ----------- | -| `.ID` | Image ID | +| Placeholder | Description | +|-----------------|-----------------------------------------------------------------------------------------------------------| +| `.ID` | Image ID | | `.CreatedSince` | Elapsed time since the image was created if `--human=true`, otherwise timestamp of when image was created | -| `.CreatedAt` | Timestamp of when image was created | -| `.CreatedBy` | Command that was used to create the image | -| `.Size` | Image disk size | -| `.Comment` | Comment for image | +| `.CreatedAt` | Timestamp of when image was created | +| `.CreatedBy` | Command that was used to create the image | +| `.Size` | Image disk size | +| `.Comment` | Comment for image | When using the `--format` option, the `history` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/images.md b/docs/reference/commandline/images.md index 6c5882c939..9413843107 100644 --- a/docs/reference/commandline/images.md +++ b/docs/reference/commandline/images.md @@ -298,15 +298,15 @@ using a Go template. Valid placeholders for the Go template are listed below: -| Placeholder | Description| -| ---- | ---- | -| `.ID` | Image ID | -| `.Repository` | Image repository | -| `.Tag` | Image tag | -| `.Digest` | Image digest | +| Placeholder | Description | +|-----------------|------------------------------------------| +| `.ID` | Image ID | +| `.Repository` | Image repository | +| `.Tag` | Image tag | +| `.Digest` | Image digest | | `.CreatedSince` | Elapsed time since the image was created | -| `.CreatedAt` | Time when the image was created | -| `.Size` | Image disk size | +| `.CreatedAt` | Time when the image was created | +| `.Size` | Image disk size | When using the `--format` option, the `image` command will either output the data exactly as the template declares or, when using the @@ -353,4 +353,4 @@ To list all images in JSON format, use the `json` directive: $ docker images --format json {"Containers":"N/A","CreatedAt":"2021-03-04 03:24:42 +0100 CET","CreatedSince":"5 days ago","Digest":"\u003cnone\u003e","ID":"4dd97cefde62","Repository":"ubuntu","SharedSize":"N/A","Size":"72.9MB","Tag":"latest","UniqueSize":"N/A","VirtualSize":"72.9MB"} {"Containers":"N/A","CreatedAt":"2021-02-17 22:19:54 +0100 CET","CreatedSince":"2 weeks ago","Digest":"\u003cnone\u003e","ID":"28f6e2705743","Repository":"alpine","SharedSize":"N/A","Size":"5.61MB","Tag":"latest","UniqueSize":"N/A","VirtualSize":"5.613MB"} -``` \ No newline at end of file +``` diff --git a/docs/reference/commandline/import.md b/docs/reference/commandline/import.md index 5542f166d6..f4021e9311 100644 --- a/docs/reference/commandline/import.md +++ b/docs/reference/commandline/import.md @@ -28,16 +28,15 @@ specify an archive, Docker untars it in the container relative to the `/` the host. To import from a remote location, specify a `URI` that begins with the `http://` or `https://` protocol. -The `--change` option will apply `Dockerfile` instructions to the image -that is created. -Supported `Dockerfile` instructions: +The `--change` option applies `Dockerfile` instructions to the image that is +created. Supported `Dockerfile` instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` ## Examples ### Import from a remote location -This will create a new untagged image. +This creates a new untagged image. ```console $ docker import https://example.com/exampleimage.tgz diff --git a/docs/reference/commandline/index.md b/docs/reference/commandline/index.md index 51bce7a458..11378900ca 100644 --- a/docs/reference/commandline/index.md +++ b/docs/reference/commandline/index.md @@ -123,9 +123,9 @@ read the [`dockerd`](dockerd.md) reference page. | [swarm init](swarm_init.md) | Initialize a swarm | | [swarm join](swarm_join.md) | Join a swarm as a manager node or worker node | | [swarm leave](swarm_leave.md) | Remove the current node from the swarm | -| [swarm join-token](swarm_join_token.md) | Display or rotate join tokens | +| [swarm join-token](swarm_join-token.md) | Display or rotate join tokens | | [swarm unlock](swarm_unlock.md) | Unlock swarm | -| [swarm unlock-key](swarm_unlock_key.md) | Manage the unlock key | +| [swarm unlock-key](swarm_unlock-key.md) | Manage the unlock key | | [swarm update](swarm_update.md) | Update attributes of a swarm | ### Swarm service commands diff --git a/docs/reference/commandline/network_connect.md b/docs/reference/commandline/network_connect.md index f7b2fe5644..8ffb4b0520 100644 --- a/docs/reference/commandline/network_connect.md +++ b/docs/reference/commandline/network_connect.md @@ -36,7 +36,8 @@ $ docker network connect multi-host-network container1 ### Connect a container to a network when it starts -You can also use the `docker run --network=` option to start a container and immediately connect it to a network. +You can also use the `docker run --network=` option to start a +container and immediately connect it to a network. ```console $ docker run -itd --network=multi-host-network busybox @@ -87,14 +88,17 @@ $ docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 multi- $ docker network connect --ip 172.20.128.2 multi-host-network container2 ``` -To verify the container is connected, use the `docker network inspect` command. Use `docker network disconnect` to remove a container from the network. +To verify the container is connected, use the `docker network inspect` command. +Use `docker network disconnect` to remove a container from the network. Once connected in network, containers can communicate using only another container's IP address 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. -You can connect a container to one or more networks. The networks need not be the same type. For example, you can connect a single container bridge and overlay networks. +You can connect a container to one or more networks. The networks need not be +the same type. For example, you can connect a single container bridge and overlay +networks. ## Related commands diff --git a/docs/reference/commandline/network_create.md b/docs/reference/commandline/network_create.md index c3b68d37c0..d08f672805 100644 --- a/docs/reference/commandline/network_create.md +++ b/docs/reference/commandline/network_create.md @@ -184,7 +184,7 @@ network driver, again with their approximate equivalents to `docker daemon`. |--------------|----------------|--------------------------------------------| | `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet | | `--ip-range` | `--fixed-cidr` | Allocate IPs from a range | -| `--internal` | - | Restrict external access to the network | +| `--internal` | - | Restrict external access to the network | | `--ipv6` | `--ipv6` | Enable IPv6 networking | | `--subnet` | `--bip` | Subnet for network | diff --git a/docs/reference/commandline/network_ls.md b/docs/reference/commandline/network_ls.md index 98b43d2909..a0778c315f 100644 --- a/docs/reference/commandline/network_ls.md +++ b/docs/reference/commandline/network_ls.md @@ -209,17 +209,17 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description --------------|------------------------------------------------------------------------------------------ -`.ID` | Network ID -`.Name` | Network name -`.Driver` | Network driver -`.Scope` | Network scope (local, global) -`.IPv6` | Whether IPv6 is enabled on the network or not. -`.Internal` | Whether the network is internal or not. -`.Labels` | All labels assigned to the network. -`.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}` -`.CreatedAt` | Time when the network was created +| Placeholder | Description | +|--------------|----------------------------------------------------------------------------------------| +| `.ID` | Network ID | +| `.Name` | Network name | +| `.Driver` | Network driver | +| `.Scope` | Network scope (local, global) | +| `.IPv6` | Whether IPv6 is enabled on the network or not. | +| `.Internal` | Whether the network is internal or not. | +| `.Labels` | All labels assigned to the network. | +| `.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}` | +| `.CreatedAt` | Time when the network was created | When using the `--format` option, the `network ls` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index ecc7aa0afc..3dd03ac220 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -182,16 +182,16 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description ------------------|------------------------------------------------------------------------------------------ -`.ID` | Node ID -`.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon) -`.Hostname` | Node hostname -`.Status` | Node status -`.Availability` | Node availability ("active", "pause", or "drain") -`.ManagerStatus` | Manager status of the node -`.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA) -`.EngineVersion` | Engine version +| Placeholder | Description | +|------------------|-------------------------------------------------------------------------------------------------------| +| `.ID` | Node ID | +| `.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon) | +| `.Hostname` | Node hostname | +| `.Status` | Node status | +| `.Availability` | Node availability ("active", "pause", or "drain") | +| `.ManagerStatus` | Manager status of the node | +| `.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA) | +| `.EngineVersion` | Engine version | When using the `--format` option, the `node ls` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/node_ps.md b/docs/reference/commandline/node_ps.md index 45d5176341..ad1968d69d 100644 --- a/docs/reference/commandline/node_ps.md +++ b/docs/reference/commandline/node_ps.md @@ -115,16 +115,16 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description -----------------|------------------------------------------------------------------------------------------ -`.ID` | Task ID -`.Name` | Task name -`.Image` | Task image -`.Node` | Node ID -`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) -`.CurrentState` | Current state of the task -`.Error` | Error -`.Ports` | Task published ports +| Placeholder | Description | +|-----------------|------------------------------------------------------------------| +| `.ID` | Task ID | +| `.Name` | Task name | +| `.Image` | Task image | +| `.Node` | Node ID | +| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) | +| `.CurrentState` | Current state of the task | +| `.Error` | Error | +| `.Ports` | Task published ports | When using the `--format` option, the `node ps` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/plugin_ls.md b/docs/reference/commandline/plugin_ls.md index 2ce47588c0..f15d138c12 100644 --- a/docs/reference/commandline/plugin_ls.md +++ b/docs/reference/commandline/plugin_ls.md @@ -80,13 +80,13 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description --------------------|------------------------------------------------------------ -`.ID` | Plugin ID -`.Name` | Plugin name and tag -`.Description` | Plugin description -`.Enabled` | Whether plugin is enabled or not -`.PluginReference` | The reference used to push/pull from a registry +| Placeholder | Description | +|--------------------|-------------------------------------------------| +| `.ID` | Plugin ID | +| `.Name` | Plugin name and tag | +| `.Description` | Plugin description | +| `.Enabled` | Whether plugin is enabled or not | +| `.PluginReference` | The reference used to push/pull from a registry | When using the `--format` option, the `plugin ls` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 1f575d7221..4dd06df414 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -452,7 +452,8 @@ c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6 ``` To list all running containers in JSON format, use the `json` directive: + ```console $ docker ps --format json {"Command":"\"/docker-entrypoint.…\"","CreatedAt":"2021-03-10 00:15:05 +0100 CET","ID":"a762a2b37a1d","Image":"nginx","Labels":"maintainer=NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e","LocalVolumes":"0","Mounts":"","Names":"boring_keldysh","Networks":"bridge","Ports":"80/tcp","RunningFor":"4 seconds ago","Size":"0B","State":"running","Status":"Up 3 seconds"} -``` \ No newline at end of file +``` diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index d47a8257e8..c0f78dafbf 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -140,7 +140,7 @@ using a Go template. Valid placeholders for the Go template are: | Placeholder | Description | -| -------------- | --------------------------------- | +|----------------|-----------------------------------| | `.Name` | Image Name | | `.Description` | Image description | | `.StarCount` | Number of stars for the image | diff --git a/docs/reference/commandline/secret_ls.md b/docs/reference/commandline/secret_ls.md index ec5b1a4348..5ace6cc46c 100644 --- a/docs/reference/commandline/secret_ls.md +++ b/docs/reference/commandline/secret_ls.md @@ -119,7 +119,7 @@ using a Go template. Valid placeholders for the Go template are listed below: | Placeholder | Description | -| ------------ | ------------------------------------------------------------------------------------ | +|--------------|--------------------------------------------------------------------------------------| | `.ID` | Secret ID | | `.Name` | Secret name | | `.CreatedAt` | Time when the secret was created | diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 77f8caf4bd..b038658db6 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -670,16 +670,15 @@ or _exclude_ (`!=`) rule. Multiple constraints find nodes that satisfy every expression (AND match). Constraints can match node or Docker Engine labels as follows: -node attribute | matches | example ----------------------|--------------------------------|----------------------------------------------- -`node.id` | Node ID | `node.id==2ivku8v2gvtg4` -`node.hostname` | Node hostname | `node.hostname!=node-2` -`node.role` | Node role (`manager`/`worker`) | `node.role==manager` -`node.platform.os` | Node operating system | `node.platform.os==windows` -`node.platform.arch` | Node architecture | `node.platform.arch==x86_64` -`node.labels` | User-defined node labels | `node.labels.security==high` -`engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` - +| node attribute | matches | example | +|----------------------|--------------------------------|-----------------------------------------------| +| `node.id` | Node ID | `node.id==2ivku8v2gvtg4` | +| `node.hostname` | Node hostname | `node.hostname!=node-2` | +| `node.role` | Node role (`manager`/`worker`) | `node.role==manager` | +| `node.platform.os` | Node operating system | `node.platform.os==windows` | +| `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` | +| `node.labels` | User-defined node labels | `node.labels.security==high` | +| `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` | `engine.labels` apply to Docker Engine labels like operating system, drivers, etc. Swarm administrators add `node.labels` for operational purposes by using diff --git a/docs/reference/commandline/service_ls.md b/docs/reference/commandline/service_ls.md index b9bf1c1033..2947e124aa 100644 --- a/docs/reference/commandline/service_ls.md +++ b/docs/reference/commandline/service_ls.md @@ -135,14 +135,14 @@ 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) -`.Replicas` | Service replicas -`.Image` | Service image -`.Ports` | Service ports published in ingress mode +| Placeholder | Description | +|-------------|-----------------------------------------| +| `.ID` | Service ID | +| `.Name` | Service name | +| `.Mode` | Service mode (replicated, global) | +| `.Replicas` | Service replicas | +| `.Image` | Service image | +| `.Ports` | Service ports published in ingress mode | When using the `--format` option, the `service ls` command will either output the data exactly as the template declares or, when using the @@ -159,6 +159,7 @@ fm6uf97exkul: global 5/5 ``` To list all services in JSON format, use the `json` directive: + ```console $ docker service ls --format json {"ID":"ssniordqolsi","Image":"hello-world:latest","Mode":"replicated","Name":"hello","Ports":"","Replicas":"0/1"} diff --git a/docs/reference/commandline/service_ps.md b/docs/reference/commandline/service_ps.md index 2e0ba6bef5..bd661f71c5 100644 --- a/docs/reference/commandline/service_ps.md +++ b/docs/reference/commandline/service_ps.md @@ -157,16 +157,16 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description -----------------|------------------------------------------------------------------------------------------ -`.ID` | Task ID -`.Name` | Task name -`.Image` | Task image -`.Node` | Node ID -`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) -`.CurrentState` | Current state of the task -`.Error` | Error -`.Ports` | Task published ports +| Placeholder | Description | +|-----------------|------------------------------------------------------------------| +| `.ID` | Task ID | +| `.Name` | Task name | +| `.Image` | Task image | +| `.Node` | Node ID | +| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) | +| `.CurrentState` | Current state of the task | +| `.Error` | Error | +| `.Ports` | Task published ports | When using the `--format` option, the `service ps` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/stack_ls.md b/docs/reference/commandline/stack_ls.md index d6b7dccabc..ce416b24a6 100644 --- a/docs/reference/commandline/stack_ls.md +++ b/docs/reference/commandline/stack_ls.md @@ -54,7 +54,7 @@ The formatting option (`--format`) pretty-prints stacks using a Go template. Valid placeholders for the Go template are listed below: | Placeholder | Description | -| --------------- | ------------------ | +|-----------------|--------------------| | `.Name` | Stack name | | `.Services` | Number of services | | `.Orchestrator` | Orchestrator name | @@ -74,6 +74,7 @@ web-cache: 4 ``` To list all stacks in JSON format, use the `json` directive: + ```console $ docker stack ls --format json {"Name":"myapp","Namespace":"","Orchestrator":"Swarm","Services":"3"} diff --git a/docs/reference/commandline/stack_ps.md b/docs/reference/commandline/stack_ps.md index 0f124f9df9..c368d0a744 100644 --- a/docs/reference/commandline/stack_ps.md +++ b/docs/reference/commandline/stack_ps.md @@ -131,16 +131,16 @@ The formatting options (`--format`) pretty-prints tasks output using a Go templa Valid placeholders for the Go template are listed below: -Placeholder | Description -----------------|------------------------------------------------------------------------------------------ -`.ID` | Task ID -`.Name` | Task name -`.Image` | Task image -`.Node` | Node ID -`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) -`.CurrentState` | Current state of the task -`.Error` | Error -`.Ports` | Task published ports +| Placeholder | Description | +|-----------------|------------------------------------------------------------------| +| `.ID` | Task ID | +| `.Name` | Task name | +| `.Image` | Task image | +| `.Node` | Node ID | +| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) | +| `.CurrentState` | Current state of the task | +| `.Error` | Error | +| `.Ports` | Task published ports | When using the `--format` option, the `stack ps` command will either output the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/stack_services.md b/docs/reference/commandline/stack_services.md index ba58179c56..535cf994af 100644 --- a/docs/reference/commandline/stack_services.md +++ b/docs/reference/commandline/stack_services.md @@ -81,13 +81,13 @@ 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) -`.Replicas` | Service replicas -`.Image` | Service image +| Placeholder | Description | +|-------------|-----------------------------------| +| `.ID` | Service ID | +| `.Name` | Service name | +| `.Mode` | Service mode (replicated, global) | +| `.Replicas` | Service replicas | +| `.Image` | Service image | When using the `--format` option, the `stack services` command will either output the data exactly as the template declares or, when using the @@ -104,6 +104,7 @@ fm6uf97exkul: global 5/5 ``` To list all services in JSON format, use the `json` directive: + ```console $ docker stack services ls --format json {"ID":"0axqbl293vwm","Image":"localstack/localstack:latest","Mode":"replicated","Name":"myapp_localstack","Ports":"*:4566-\u003e4566/tcp, *:8080-\u003e8080/tcp","Replicas":"0/1"} diff --git a/docs/reference/commandline/stats.md b/docs/reference/commandline/stats.md index 0c08903079..ff63e98e78 100644 --- a/docs/reference/commandline/stats.md +++ b/docs/reference/commandline/stats.md @@ -138,18 +138,17 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description ------------- | -------------------------------------------- -`.Container` | Container name or ID (user input) -`.Name` | Container name -`.ID` | Container ID -`.CPUPerc` | CPU percentage -`.MemUsage` | Memory usage -`.NetIO` | Network IO -`.BlockIO` | Block IO -`.MemPerc` | Memory percentage (Not available on Windows) -`.PIDs` | Number of PIDs (Not available on Windows) - +| Placeholder | Description | +|--------------|----------------------------------------------| +| `.Container` | Container name or ID (user input) | +| `.Name` | Container name | +| `.ID` | Container ID | +| `.CPUPerc` | CPU percentage | +| `.MemUsage` | Memory usage | +| `.NetIO` | Network IO | +| `.BlockIO` | Block IO | +| `.MemPerc` | Memory percentage (Not available on Windows) | +| `.PIDs` | Number of PIDs (Not available on Windows) | When using the `--format` option, the `stats` command either outputs the data exactly as the template declares or, when using the diff --git a/docs/reference/commandline/system_df.md b/docs/reference/commandline/system_df.md index fe72cc53fe..40b0c84fa3 100644 --- a/docs/reference/commandline/system_df.md +++ b/docs/reference/commandline/system_df.md @@ -92,7 +92,7 @@ using a Go template. Valid placeholders for the Go template are listed below: | Placeholder | Description | -| -------------- | ------------------------------------------ | +|----------------|--------------------------------------------| | `.Type` | `Images`, `Containers` and `Local Volumes` | | `.TotalCount` | Total number of items | | `.Active` | Number of active items | @@ -128,6 +128,7 @@ Local Volumes 150.3 MB 150.3 MB (100%) ``` To list all information in JSON format, use the `json` directive: + ```console $ docker system df --format json {"Active":"2","Reclaimable":"2.498GB (94%)","Size":"2.631GB","TotalCount":"6","Type":"Images"} @@ -136,7 +137,7 @@ $ docker system df --format json {"Active":"0","Reclaimable":"158B","Size":"158B","TotalCount":"17","Type":"Build Cache"} ``` -**Note** the format option is meaningless when verbose is true. +The format option has no effect when the `--verbose` option is used. ## Related commands * [system prune](system_prune.md) diff --git a/docs/reference/commandline/volume_ls.md b/docs/reference/commandline/volume_ls.md index 4bf7ad75e2..f5a3150daf 100644 --- a/docs/reference/commandline/volume_ls.md +++ b/docs/reference/commandline/volume_ls.md @@ -163,14 +163,14 @@ using a Go template. Valid placeholders for the Go template are listed below: -Placeholder | Description ---------------|------------------------------------------------------------------------------------------ -`.Name` | Volume name -`.Driver` | Volume driver -`.Scope` | Volume scope (local, global) -`.Mountpoint` | The mount point of the volume on the host -`.Labels` | All labels assigned to the volume -`.Label` | Value of a specific label for this volume. For example `{{.Label "project.version"}}` +| Placeholder | Description | +|---------------|---------------------------------------------------------------------------------------| +| `.Name` | Volume name | +| `.Driver` | Volume driver | +| `.Scope` | Volume scope (local, global) | +| `.Mountpoint` | The mount point of the volume on the host | +| `.Labels` | All labels assigned to the volume | +| `.Label` | Value of a specific label for this volume. For example `{{.Label "project.version"}}` | When using the `--format` option, the `volume ls` command will either output the data exactly as the template declares or, when using the @@ -188,6 +188,7 @@ vol3: local ``` To list all volumes in JSON format, use the `json` directive: + ```console $ docker volume ls --format json {"Driver":"local","Labels":"","Links":"N/A","Mountpoint":"/var/lib/docker/volumes/docker-cli-dev-cache/_data","Name":"docker-cli-dev-cache","Scope":"local","Size":"N/A"}