mirror of https://github.com/docker/cli.git
docs: fix (table) formatting, fix some broken links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 885f44a5ba
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
82f422fcf3
commit
6380142dd4
|
@ -113,7 +113,7 @@ using a Go template.
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| ------------ | ------------------------------------------------------------------------------------ |
|
|--------------|--------------------------------------------------------------------------------------|
|
||||||
| `.ID` | Config ID |
|
| `.ID` | Config ID |
|
||||||
| `.Name` | Config name |
|
| `.Name` | Config name |
|
||||||
| `.CreatedAt` | Time when the config was created |
|
| `.CreatedAt` | Time when the config was created |
|
||||||
|
|
|
@ -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)
|
|
@ -13,6 +13,7 @@ Set the current docker context
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Set the default context to use, when `DOCKER_HOST`, `DOCKER_CONTEXT` environment
|
Set the default context to use, when `DOCKER_HOST`, `DOCKER_CONTEXT` environment
|
||||||
variables and `--host`, `--context` global options are not set.
|
variables and `--host`, `--context` global options are not set.
|
||||||
To disable usage of contexts, you can use the special `default` context.
|
To disable usage of contexts, you can use the special `default` context.
|
||||||
|
|
|
@ -773,7 +773,7 @@ time of writing, the following is the list of `libdm` log levels as well as
|
||||||
their corresponding levels when output by `dockerd`.
|
their corresponding levels when output by `dockerd`.
|
||||||
|
|
||||||
| `libdm` Level | Value | `--log-level` |
|
| `libdm` Level | Value | `--log-level` |
|
||||||
| ------------- | -----:| ------------- |
|
|---------------|------:|---------------|
|
||||||
| `_LOG_FATAL` | 2 | error |
|
| `_LOG_FATAL` | 2 | error |
|
||||||
| `_LOG_ERR` | 3 | error |
|
| `_LOG_ERR` | 3 | error |
|
||||||
| `_LOG_WARN` | 4 | warn |
|
| `_LOG_WARN` | 4 | warn |
|
||||||
|
|
|
@ -54,14 +54,14 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| --------------- | ----------- |
|
|-----------------|-----------------------------------------------------------------------------------------------------------|
|
||||||
| `.ID` | Image ID |
|
| `.ID` | Image ID |
|
||||||
| `.CreatedSince` | Elapsed time since the image was created if `--human=true`, otherwise timestamp of when image was created |
|
| `.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 |
|
| `.CreatedAt` | Timestamp of when image was created |
|
||||||
| `.CreatedBy` | Command that was used to create the image |
|
| `.CreatedBy` | Command that was used to create the image |
|
||||||
| `.Size` | Image disk size |
|
| `.Size` | Image disk size |
|
||||||
| `.Comment` | Comment for image |
|
| `.Comment` | Comment for image |
|
||||||
|
|
||||||
When using the `--format` option, the `history` command will either
|
When using the `--format` option, the `history` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -293,15 +293,15 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description|
|
| Placeholder | Description |
|
||||||
| ---- | ---- |
|
|-----------------|------------------------------------------|
|
||||||
| `.ID` | Image ID |
|
| `.ID` | Image ID |
|
||||||
| `.Repository` | Image repository |
|
| `.Repository` | Image repository |
|
||||||
| `.Tag` | Image tag |
|
| `.Tag` | Image tag |
|
||||||
| `.Digest` | Image digest |
|
| `.Digest` | Image digest |
|
||||||
| `.CreatedSince` | Elapsed time since the image was created |
|
| `.CreatedSince` | Elapsed time since the image was created |
|
||||||
| `.CreatedAt` | Time when the image was created |
|
| `.CreatedAt` | Time when the image was created |
|
||||||
| `.Size` | Image disk size |
|
| `.Size` | Image disk size |
|
||||||
|
|
||||||
When using the `--format` option, the `image` command will either
|
When using the `--format` option, the `image` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -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
|
the host. To import from a remote location, specify a `URI` that begins with the
|
||||||
`http://` or `https://` protocol.
|
`http://` or `https://` protocol.
|
||||||
|
|
||||||
The `--change` option will apply `Dockerfile` instructions to the image
|
The `--change` option applies `Dockerfile` instructions to the image that is
|
||||||
that is created.
|
created. Supported `Dockerfile` instructions:
|
||||||
Supported `Dockerfile` instructions:
|
|
||||||
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Import from a remote location
|
### Import from a remote location
|
||||||
|
|
||||||
This will create a new untagged image.
|
This creates a new untagged image.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker import https://example.com/exampleimage.tgz
|
$ docker import https://example.com/exampleimage.tgz
|
||||||
|
|
|
@ -118,15 +118,15 @@ read the [`dockerd`](dockerd.md) reference page.
|
||||||
|
|
||||||
### Swarm management commands
|
### Swarm management commands
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|:--------|:-------------------------------------------------------------------|
|
|:----------------------------------------|:----------------------------------------------|
|
||||||
| [swarm init](swarm_init.md) | Initialize a swarm |
|
| [swarm init](swarm_init.md) | Initialize a swarm |
|
||||||
| [swarm join](swarm_join.md) | Join a swarm as a manager node or worker node |
|
| [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 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](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 update](swarm_update.md) | Update attributes of a swarm |
|
||||||
|
|
||||||
### Swarm service commands
|
### Swarm service commands
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ $ docker network connect multi-host-network container1
|
||||||
|
|
||||||
### Connect a container to a network when it starts
|
### Connect a container to a network when it starts
|
||||||
|
|
||||||
You can also use the `docker run --network=<network-name>` option to start a container and immediately connect it to a network.
|
You can also use the `docker run --network=<network-name>` option to start a
|
||||||
|
container and immediately connect it to a network.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -itd --network=multi-host-network busybox
|
$ 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
|
$ 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
|
Once connected in network, containers can communicate using only another
|
||||||
container's IP address or name. For `overlay` networks or custom plugins that
|
container's IP address or name. For `overlay` networks or custom plugins that
|
||||||
support multi-host connectivity, containers connected to the same multi-host
|
support multi-host connectivity, containers connected to the same multi-host
|
||||||
network but launched from different Engines can also communicate in this way.
|
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
|
## Related commands
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ network driver, again with their approximate equivalents to `docker daemon`.
|
||||||
|--------------|----------------|--------------------------------------------|
|
|--------------|----------------|--------------------------------------------|
|
||||||
| `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet |
|
| `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet |
|
||||||
| `--ip-range` | `--fixed-cidr` | Allocate IPs from a range |
|
| `--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 |
|
| `--ipv6` | `--ipv6` | Enable IPv6 networking |
|
||||||
| `--subnet` | `--bip` | Subnet for network |
|
| `--subnet` | `--bip` | Subnet for network |
|
||||||
|
|
||||||
|
|
|
@ -204,17 +204,17 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
-------------|------------------------------------------------------------------------------------------
|
|--------------|----------------------------------------------------------------------------------------|
|
||||||
`.ID` | Network ID
|
| `.ID` | Network ID |
|
||||||
`.Name` | Network name
|
| `.Name` | Network name |
|
||||||
`.Driver` | Network driver
|
| `.Driver` | Network driver |
|
||||||
`.Scope` | Network scope (local, global)
|
| `.Scope` | Network scope (local, global) |
|
||||||
`.IPv6` | Whether IPv6 is enabled on the network or not.
|
| `.IPv6` | Whether IPv6 is enabled on the network or not. |
|
||||||
`.Internal` | Whether the network is internal or not.
|
| `.Internal` | Whether the network is internal or not. |
|
||||||
`.Labels` | All labels assigned to the network.
|
| `.Labels` | All labels assigned to the network. |
|
||||||
`.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}`
|
| `.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}` |
|
||||||
`.CreatedAt` | Time when the network was created
|
| `.CreatedAt` | Time when the network was created |
|
||||||
|
|
||||||
When using the `--format` option, the `network ls` command will either
|
When using the `--format` option, the `network ls` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -177,16 +177,16 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
-----------------|------------------------------------------------------------------------------------------
|
|------------------|-------------------------------------------------------------------------------------------------------|
|
||||||
`.ID` | Node ID
|
| `.ID` | Node ID |
|
||||||
`.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon)
|
| `.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon) |
|
||||||
`.Hostname` | Node hostname
|
| `.Hostname` | Node hostname |
|
||||||
`.Status` | Node status
|
| `.Status` | Node status |
|
||||||
`.Availability` | Node availability ("active", "pause", or "drain")
|
| `.Availability` | Node availability ("active", "pause", or "drain") |
|
||||||
`.ManagerStatus` | Manager status of the node
|
| `.ManagerStatus` | Manager status of the node |
|
||||||
`.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA)
|
| `.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA) |
|
||||||
`.EngineVersion` | Engine version
|
| `.EngineVersion` | Engine version |
|
||||||
|
|
||||||
When using the `--format` option, the `node ls` command will either
|
When using the `--format` option, the `node ls` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -115,16 +115,16 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
----------------|------------------------------------------------------------------------------------------
|
|-----------------|------------------------------------------------------------------|
|
||||||
`.ID` | Task ID
|
| `.ID` | Task ID |
|
||||||
`.Name` | Task name
|
| `.Name` | Task name |
|
||||||
`.Image` | Task image
|
| `.Image` | Task image |
|
||||||
`.Node` | Node ID
|
| `.Node` | Node ID |
|
||||||
`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`)
|
| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) |
|
||||||
`.CurrentState` | Current state of the task
|
| `.CurrentState` | Current state of the task |
|
||||||
`.Error` | Error
|
| `.Error` | Error |
|
||||||
`.Ports` | Task published ports
|
| `.Ports` | Task published ports |
|
||||||
|
|
||||||
When using the `--format` option, the `node ps` command will either
|
When using the `--format` option, the `node ps` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -75,13 +75,13 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
-------------------|------------------------------------------------------------
|
|--------------------|-------------------------------------------------|
|
||||||
`.ID` | Plugin ID
|
| `.ID` | Plugin ID |
|
||||||
`.Name` | Plugin name and tag
|
| `.Name` | Plugin name and tag |
|
||||||
`.Description` | Plugin description
|
| `.Description` | Plugin description |
|
||||||
`.Enabled` | Whether plugin is enabled or not
|
| `.Enabled` | Whether plugin is enabled or not |
|
||||||
`.PluginReference` | The reference used to push/pull from a registry
|
| `.PluginReference` | The reference used to push/pull from a registry |
|
||||||
|
|
||||||
When using the `--format` option, the `plugin ls` command will either
|
When using the `--format` option, the `plugin ls` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -140,7 +140,7 @@ using a Go template.
|
||||||
Valid placeholders for the Go template are:
|
Valid placeholders for the Go template are:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| -------------- | --------------------------------- |
|
|----------------|-----------------------------------|
|
||||||
| `.Name` | Image Name |
|
| `.Name` | Image Name |
|
||||||
| `.Description` | Image description |
|
| `.Description` | Image description |
|
||||||
| `.StarCount` | Number of stars for the image |
|
| `.StarCount` | Number of stars for the image |
|
||||||
|
|
|
@ -113,7 +113,7 @@ using a Go template.
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| ------------ | ------------------------------------------------------------------------------------ |
|
|--------------|--------------------------------------------------------------------------------------|
|
||||||
| `.ID` | Secret ID |
|
| `.ID` | Secret ID |
|
||||||
| `.Name` | Secret name |
|
| `.Name` | Secret name |
|
||||||
| `.CreatedAt` | Time when the secret was created |
|
| `.CreatedAt` | Time when the secret was created |
|
||||||
|
|
|
@ -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
|
expression (AND match). Constraints can match node or Docker Engine labels as
|
||||||
follows:
|
follows:
|
||||||
|
|
||||||
node attribute | matches | example
|
| node attribute | matches | example |
|
||||||
---------------------|--------------------------------|-----------------------------------------------
|
|----------------------|--------------------------------|-----------------------------------------------|
|
||||||
`node.id` | Node ID | `node.id==2ivku8v2gvtg4`
|
| `node.id` | Node ID | `node.id==2ivku8v2gvtg4` |
|
||||||
`node.hostname` | Node hostname | `node.hostname!=node-2`
|
| `node.hostname` | Node hostname | `node.hostname!=node-2` |
|
||||||
`node.role` | Node role (`manager`/`worker`) | `node.role==manager`
|
| `node.role` | Node role (`manager`/`worker`) | `node.role==manager` |
|
||||||
`node.platform.os` | Node operating system | `node.platform.os==windows`
|
| `node.platform.os` | Node operating system | `node.platform.os==windows` |
|
||||||
`node.platform.arch` | Node architecture | `node.platform.arch==x86_64`
|
| `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` |
|
||||||
`node.labels` | User-defined node labels | `node.labels.security==high`
|
| `node.labels` | User-defined node labels | `node.labels.security==high` |
|
||||||
`engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04`
|
| `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` |
|
||||||
|
|
||||||
|
|
||||||
`engine.labels` apply to Docker Engine labels like operating system, drivers,
|
`engine.labels` apply to Docker Engine labels like operating system, drivers,
|
||||||
etc. Swarm administrators add `node.labels` for operational purposes by using
|
etc. Swarm administrators add `node.labels` for operational purposes by using
|
||||||
|
|
|
@ -130,14 +130,14 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
------------|------------------------------------------------------------------------------------------
|
|-------------|-----------------------------------------|
|
||||||
`.ID` | Service ID
|
| `.ID` | Service ID |
|
||||||
`.Name` | Service name
|
| `.Name` | Service name |
|
||||||
`.Mode` | Service mode (replicated, global)
|
| `.Mode` | Service mode (replicated, global) |
|
||||||
`.Replicas` | Service replicas
|
| `.Replicas` | Service replicas |
|
||||||
`.Image` | Service image
|
| `.Image` | Service image |
|
||||||
`.Ports` | Service ports published in ingress mode
|
| `.Ports` | Service ports published in ingress mode |
|
||||||
|
|
||||||
When using the `--format` option, the `service ls` command will either
|
When using the `--format` option, the `service ls` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -157,16 +157,16 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
----------------|------------------------------------------------------------------------------------------
|
|-----------------|------------------------------------------------------------------|
|
||||||
`.ID` | Task ID
|
| `.ID` | Task ID |
|
||||||
`.Name` | Task name
|
| `.Name` | Task name |
|
||||||
`.Image` | Task image
|
| `.Image` | Task image |
|
||||||
`.Node` | Node ID
|
| `.Node` | Node ID |
|
||||||
`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`)
|
| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) |
|
||||||
`.CurrentState` | Current state of the task
|
| `.CurrentState` | Current state of the task |
|
||||||
`.Error` | Error
|
| `.Error` | Error |
|
||||||
`.Ports` | Task published ports
|
| `.Ports` | Task published ports |
|
||||||
|
|
||||||
When using the `--format` option, the `service ps` command will either
|
When using the `--format` option, the `service ps` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -52,7 +52,7 @@ The formatting option (`--format`) pretty-prints stacks using a Go template.
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| --------------- | ------------------ |
|
|-----------------|--------------------|
|
||||||
| `.Name` | Stack name |
|
| `.Name` | Stack name |
|
||||||
| `.Services` | Number of services |
|
| `.Services` | Number of services |
|
||||||
| `.Orchestrator` | Orchestrator name |
|
| `.Orchestrator` | Orchestrator name |
|
||||||
|
|
|
@ -129,16 +129,16 @@ The formatting options (`--format`) pretty-prints tasks output using a Go templa
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
----------------|------------------------------------------------------------------------------------------
|
|-----------------|------------------------------------------------------------------|
|
||||||
`.ID` | Task ID
|
| `.ID` | Task ID |
|
||||||
`.Name` | Task name
|
| `.Name` | Task name |
|
||||||
`.Image` | Task image
|
| `.Image` | Task image |
|
||||||
`.Node` | Node ID
|
| `.Node` | Node ID |
|
||||||
`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`)
|
| `.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`) |
|
||||||
`.CurrentState` | Current state of the task
|
| `.CurrentState` | Current state of the task |
|
||||||
`.Error` | Error
|
| `.Error` | Error |
|
||||||
`.Ports` | Task published ports
|
| `.Ports` | Task published ports |
|
||||||
|
|
||||||
When using the `--format` option, the `stack ps` command will either
|
When using the `--format` option, the `stack ps` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -88,13 +88,13 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
------------|-------------------------------------------------------------------
|
|-------------|-----------------------------------|
|
||||||
`.ID` | Service ID
|
| `.ID` | Service ID |
|
||||||
`.Name` | Service name
|
| `.Name` | Service name |
|
||||||
`.Mode` | Service mode (replicated, global)
|
| `.Mode` | Service mode (replicated, global) |
|
||||||
`.Replicas` | Service replicas
|
| `.Replicas` | Service replicas |
|
||||||
`.Image` | Service image
|
| `.Image` | Service image |
|
||||||
|
|
||||||
When using the `--format` option, the `stack services` command will either
|
When using the `--format` option, the `stack services` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -138,18 +138,17 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
------------ | --------------------------------------------
|
|--------------|----------------------------------------------|
|
||||||
`.Container` | Container name or ID (user input)
|
| `.Container` | Container name or ID (user input) |
|
||||||
`.Name` | Container name
|
| `.Name` | Container name |
|
||||||
`.ID` | Container ID
|
| `.ID` | Container ID |
|
||||||
`.CPUPerc` | CPU percentage
|
| `.CPUPerc` | CPU percentage |
|
||||||
`.MemUsage` | Memory usage
|
| `.MemUsage` | Memory usage |
|
||||||
`.NetIO` | Network IO
|
| `.NetIO` | Network IO |
|
||||||
`.BlockIO` | Block IO
|
| `.BlockIO` | Block IO |
|
||||||
`.MemPerc` | Memory percentage (Not available on Windows)
|
| `.MemPerc` | Memory percentage (Not available on Windows) |
|
||||||
`.PIDs` | Number of PIDs (Not available on Windows)
|
| `.PIDs` | Number of PIDs (Not available on Windows) |
|
||||||
|
|
||||||
|
|
||||||
When using the `--format` option, the `stats` command either
|
When using the `--format` option, the `stats` command either
|
||||||
outputs the data exactly as the template declares or, when using the
|
outputs the data exactly as the template declares or, when using the
|
||||||
|
|
|
@ -87,7 +87,7 @@ using a Go template.
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
| Placeholder | Description |
|
| Placeholder | Description |
|
||||||
| -------------- | ------------------------------------------ |
|
|----------------|--------------------------------------------|
|
||||||
| `.Type` | `Images`, `Containers` and `Local Volumes` |
|
| `.Type` | `Images`, `Containers` and `Local Volumes` |
|
||||||
| `.TotalCount` | Total number of items |
|
| `.TotalCount` | Total number of items |
|
||||||
| `.Active` | Number of active items |
|
| `.Active` | Number of active items |
|
||||||
|
@ -122,7 +122,7 @@ Local Volumes 150.3 MB 150.3 MB (100%)
|
||||||
<Paste>
|
<Paste>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note** the format option is meaningless when verbose is true.
|
The format option has no effect when the `--verbose` option is used.
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
* [system prune](system_prune.md)
|
* [system prune](system_prune.md)
|
||||||
|
|
|
@ -158,14 +158,14 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
| Placeholder | Description |
|
||||||
--------------|------------------------------------------------------------------------------------------
|
|---------------|---------------------------------------------------------------------------------------|
|
||||||
`.Name` | Volume name
|
| `.Name` | Volume name |
|
||||||
`.Driver` | Volume driver
|
| `.Driver` | Volume driver |
|
||||||
`.Scope` | Volume scope (local, global)
|
| `.Scope` | Volume scope (local, global) |
|
||||||
`.Mountpoint` | The mount point of the volume on the host
|
| `.Mountpoint` | The mount point of the volume on the host |
|
||||||
`.Labels` | All labels assigned to the volume
|
| `.Labels` | All labels assigned to the volume |
|
||||||
`.Label` | Value of a specific label for this volume. For example `{{.Label "project.version"}}`
|
| `.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
|
When using the `--format` option, the `volume ls` command will either
|
||||||
output the data exactly as the template declares or, when using the
|
output the data exactly as the template declares or, when using the
|
||||||
|
|
Loading…
Reference in New Issue