Merge pull request #5010 from dvdksn/cli-reference-overview-base-cmd

cli reference overview base cmd
This commit is contained in:
David Karlsson 2024-07-05 15:19:26 +02:00 committed by GitHub
commit 9bb1a62735
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
102 changed files with 719 additions and 732 deletions

View File

@ -117,7 +117,7 @@ enabled, and use it to create a volume.
To disable a plugin, use the `docker plugin disable` command. To completely To disable a plugin, use the `docker plugin disable` command. To completely
remove it, use the `docker plugin remove` command. For other available remove it, use the `docker plugin remove` command. For other available
commands and options, see the commands and options, see the
[command line reference](https://docs.docker.com/engine/reference/commandline/cli/). [command line reference](https://docs.docker.com/reference/cli/docker/).
## Developing a plugin ## Developing a plugin

View File

@ -12,7 +12,7 @@ Attach local standard input, output, and error streams to a running container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------|:----------------------------------------------------| |:----------------|:---------|:--------|:----------------------------------------------------|
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `--no-stdin` | | | Do not attach STDIN | | `--no-stdin` | `bool` | | Do not attach STDIN |
| `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process | | `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process |

View File

@ -15,7 +15,7 @@ Build an image from a Dockerfile
| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables |
| `--cache-from` | `stringSlice` | | Images to consider as cache sources | | `--cache-from` | `stringSlice` | | Images to consider as cache sources |
| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build |
| `--compress` | | | Compress the build context using gzip | | `--compress` | `bool` | | Compress the build context using gzip |
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
@ -23,21 +23,21 @@ Build an image from a Dockerfile
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
| `--force-rm` | | | Always remove intermediate containers | | `--force-rm` | `bool` | | Always remove intermediate containers |
| `--iidfile` | `string` | | Write the image ID to the file | | `--iidfile` | `string` | | Write the image ID to the file |
| `--isolation` | `string` | | Container isolation technology | | `--isolation` | `string` | | Container isolation technology |
| `--label` | `list` | | Set metadata for an image | | `--label` | `list` | | Set metadata for an image |
| `-m`, `--memory` | `bytes` | `0` | Memory limit | | `-m`, `--memory` | `bytes` | `0` | Memory limit |
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build |
| `--no-cache` | | | Do not use cache when building the image | | `--no-cache` | `bool` | | Do not use cache when building the image |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--pull` | | | Always attempt to pull a newer version of the image | | `--pull` | `bool` | | Always attempt to pull a newer version of the image |
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | | `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success |
| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build |
| `--security-opt` | `stringSlice` | | Security options | | `--security-opt` | `stringSlice` | | Security options |
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
| `--squash` | | | Squash newly built layers into a single new layer | | `--squash` | `bool` | | Squash newly built layers into a single new layer |
| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format |
| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |

View File

@ -15,7 +15,7 @@ Build an image from a Dockerfile
| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables |
| `--cache-from` | `stringSlice` | | Images to consider as cache sources | | `--cache-from` | `stringSlice` | | Images to consider as cache sources |
| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build |
| `--compress` | | | Compress the build context using gzip | | `--compress` | `bool` | | Compress the build context using gzip |
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
@ -23,21 +23,21 @@ Build an image from a Dockerfile
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
| `--force-rm` | | | Always remove intermediate containers | | `--force-rm` | `bool` | | Always remove intermediate containers |
| `--iidfile` | `string` | | Write the image ID to the file | | `--iidfile` | `string` | | Write the image ID to the file |
| `--isolation` | `string` | | Container isolation technology | | `--isolation` | `string` | | Container isolation technology |
| `--label` | `list` | | Set metadata for an image | | `--label` | `list` | | Set metadata for an image |
| `-m`, `--memory` | `bytes` | `0` | Memory limit | | `-m`, `--memory` | `bytes` | `0` | Memory limit |
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build |
| `--no-cache` | | | Do not use cache when building the image | | `--no-cache` | `bool` | | Do not use cache when building the image |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--pull` | | | Always attempt to pull a newer version of the image | | `--pull` | `bool` | | Always attempt to pull a newer version of the image |
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | | `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success |
| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build |
| `--security-opt` | `stringSlice` | | Security options | | `--security-opt` | `stringSlice` | | Security options |
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
| `--squash` | | | Squash newly built layers into a single new layer | | `--squash` | `bool` | | Squash newly built layers into a single new layer |
| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format |
| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |

View File

@ -7,9 +7,9 @@ Remove build cache
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:---------|:--------|:------------------------------------------------------| |:-----------------|:---------|:--------|:------------------------------------------------------|
| `-a`, `--all` | | | Remove all unused build cache, not just dangling ones | | `-a`, `--all` | `bool` | | Remove all unused build cache, not just dangling ones |
| `--filter` | `filter` | | Provide filter values (e.g. `until=24h`) | | `--filter` | `filter` | | Provide filter values (e.g. `until=24h`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
| `--keep-storage` | `bytes` | `0` | Amount of disk space to keep for cache | | `--keep-storage` | `bytes` | `0` | Amount of disk space to keep for cache |

View File

@ -8,7 +8,7 @@ Create a checkpoint from a running container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------|:---------|:--------|:---------------------------------------------| |:-------------------|:---------|:--------|:---------------------------------------------|
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
| `--leave-running` | | | Leave the container running after checkpoint | | `--leave-running` | `bool` | | Leave the container running after checkpoint |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,408 +0,0 @@
---
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"
aliases:
- /reference/commandline/cli/
- /engine/reference/commandline/engine/
- /engine/reference/commandline/engine_activate/
- /engine/reference/commandline/engine_check/
- /engine/reference/commandline/engine_update/
---
The base command for the Docker CLI is `docker`. For information about the
available flags and subcommands, refer to the [CLI reference](https://docs.docker.com/reference/cli/docker/)
Depending on your Docker system configuration, you may be required to preface
each `docker` command with `sudo`. To avoid having to use `sudo` with the
`docker` command, your system administrator can create a Unix group called
`docker` and add users to it.
For more information about installing Docker or `sudo` configuration, refer to
the [installation](https://docs.docker.com/install/) instructions for your operating system.
## Environment variables
The following list of environment variables are supported by the `docker` command
line:
| Variable | Description |
| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKER_API_VERSION` | Override the negotiated API version to use for debugging (e.g. `1.19`) |
| `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the `docker` CLI and the [`dockerd` daemon](https://docs.docker.com/reference/cli/dockerd/) |
| `DOCKER_CONFIG` | The location of your client configuration files. |
| `DOCKER_CONTENT_TRUST_SERVER` | The URL of the Notary server to use. Defaults to the same URL as the registry. |
| `DOCKER_CONTENT_TRUST` | When set Docker uses notary to sign and verify images. Equates to `--disable-content-trust=false` for build, create, pull, push, run. |
| `DOCKER_CONTEXT` | Name of the `docker context` to use (overrides `DOCKER_HOST` env var and default context set with `docker context use`) |
| `DOCKER_DEFAULT_PLATFORM` | Default platform for commands that take the `--platform` flag. |
| `DOCKER_HIDE_LEGACY_COMMANDS` | When set, Docker hides "legacy" top-level commands (such as `docker rm`, and `docker pull`) in `docker help` output, and only `Management commands` per object-type (e.g., `docker container`) are printed. This may become the default in a future release. |
| `DOCKER_HOST` | Daemon socket to connect to. |
| `DOCKER_TLS` | Enable TLS for connections made by the `docker` CLI (equivalent of the `--tls` command-line option). Set to a non-empty value to enable TLS. Note that TLS is enabled automatically if any of the other TLS options are set. |
| `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the `docker` CLI and the [`dockerd` daemon](https://docs.docker.com/reference/cli/dockerd/) |
| `BUILDKIT_PROGRESS` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`) when [building](https://docs.docker.com/reference/cli/docker/image/build/) with [BuildKit backend](https://docs.docker.com/build/buildkit/). Use plain to show container output (default `auto`). |
Because Docker is developed using Go, you can also use any environment
variables used by the Go runtime. In particular, you may find these useful:
| Variable | Description |
|:--------------|:-------------------------------------------------------------------------------|
| `HTTP_PROXY` | Proxy URL for HTTP requests unless overridden by NoProxy. |
| `HTTPS_PROXY` | Proxy URL for HTTPS requests unless overridden by NoProxy. |
| `NO_PROXY` | Comma-separated values specifying hosts that should be excluded from proxying. |
See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config)
for details on these variables.
## Configuration files
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 shouldn't modify them. However, you can modify the
`config.json` file to control certain aspects of how the `docker`
command behaves.
You can modify the `docker` command behavior using environment
variables or command-line options. You can also use options within
`config.json` to modify some of the same behavior. If an environment variable
and the `--config` flag are set, the flag takes precedent over the environment
variable. Command line options override environment variables and environment
variables override properties you specify in a `config.json` file.
### Change the `.docker` directory
To specify a different directory, use the `DOCKER_CONFIG`
environment variable or the `--config` command line option. If both are
specified, then the `--config` option overrides the `DOCKER_CONFIG` environment
variable. The example below overrides the `docker ps` command using a
`config.json` file located in the `~/testconfigs/` directory.
```console
$ docker --config ~/testconfigs/ ps
```
This flag only applies to whatever command is being ran. For persistent
configuration, you can set the `DOCKER_CONFIG` environment variable in your
shell (e.g. `~/.profile` or `~/.bashrc`). The example below sets the new
directory to be `HOME/newdir/.docker`.
```console
$ echo export DOCKER_CONFIG=$HOME/newdir/.docker > ~/.profile
```
## Docker CLI configuration file (`config.json`) properties
<a name="configjson-properties"><!-- included for deep-links to old section --></a>
Use the Docker CLI configuration to customize settings for the `docker` CLI. The
configuration file uses JSON formatting, and properties:
By default, configuration file is stored in `~/.docker/config.json`. Refer to the
[change the `.docker` directory](#change-the-docker-directory) section to use a
different location.
> **Warning**
>
> The configuration file and other files inside the `~/.docker` configuration
> directory may contain sensitive information, such as authentication information
> for proxies or, depending on your credential store, credentials for your image
> registries. Review your configuration file's content before sharing with others,
> and prevent committing the file to version control.
### Customize the default output format for commands
These fields lets you customize the default output format for some commands
if no `--format` flag is provided.
| Property | Description |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `configFormat` | Custom default format for `docker config ls` output. See [`docker config ls`](https://docs.docker.com/reference/cli/docker/config/ls/#format) for a list of supported formatting directives. |
| `imagesFormat` | Custom default format for `docker images` / `docker image ls` output. See [`docker images`](https://docs.docker.com/reference/cli/docker/image/ls/#format) for a list of supported formatting directives. |
| `networksFormat` | Custom default format for `docker network ls` output. See [`docker network ls`](https://docs.docker.com/reference/cli/docker/network/ls/#format) for a list of supported formatting directives. |
| `nodesFormat` | Custom default format for `docker node ls` output. See [`docker node ls`](https://docs.docker.com/reference/cli/docker/node/ls/#format) for a list of supported formatting directives. |
| `pluginsFormat` | Custom default format for `docker plugin ls` output. See [`docker plugin ls`](https://docs.docker.com/reference/cli/docker/plugin/ls/#format) for a list of supported formatting directives. |
| `psFormat` | Custom default format for `docker ps` / `docker container ps` output. See [`docker ps`](https://docs.docker.com/reference/cli/docker/container/ls/#format) for a list of supported formatting directives. |
| `secretFormat` | Custom default format for `docker secret ls` output. See [`docker secret ls`](https://docs.docker.com/reference/cli/docker/secret/ls/#format) for a list of supported formatting directives. |
| `serviceInspectFormat` | Custom default format for `docker service inspect` output. See [`docker service inspect`](https://docs.docker.com/reference/cli/docker/service/inspect/#format) for a list of supported formatting directives. |
| `servicesFormat` | Custom default format for `docker service ls` output. See [`docker service ls`](https://docs.docker.com/reference/cli/docker/service/ls/#format) for a list of supported formatting directives. |
| `statsFormat` | Custom default format for `docker stats` output. See [`docker stats`](https://docs.docker.com/reference/cli/docker/container/stats/#format) for a list of supported formatting directives. |
| `tasksFormat` | Custom default format for `docker stack ps` output. See [`docker stack ps`](https://docs.docker.com/reference/cli/docker/stack/ps/#format) for a list of supported formatting directives. |
| `volumesFormat` | Custom default format for `docker volume ls` output. See [`docker volume ls`](https://docs.docker.com/reference/cli/docker/volume/ls/#format) for a list of supported formatting directives. |
### Custom HTTP headers
The property `HttpHeaders` specifies a set of headers to include in all messages
sent from the Docker client to the daemon. Docker doesn't try to interpret or
understand these headers; it simply puts them into the messages. Docker does
not allow these headers to change any headers it sets for itself.
### Credential store options
The property `credsStore` specifies an external binary to serve as the default
credential store. When this property is set, `docker login` will attempt to
store credentials in the binary specified by `docker-credential-<value>` which
is visible on `$PATH`. If this property isn't set, credentials are stored
in the `auths` property of the CLI configuration file. For more information,
see the [**Credential stores** section in the `docker login` documentation](https://docs.docker.com/reference/cli/docker/login/#credential-stores)
The property `credHelpers` specifies a set of credential helpers to use
preferentially over `credsStore` or `auths` when storing and retrieving
credentials for specific registries. If this property is set, the binary
`docker-credential-<value>` will be used when storing or retrieving credentials
for a specific registry. For more information, see the
[**Credential helpers** section in the `docker login` documentation](https://docs.docker.com/reference/cli/docker/login/#credential-helpers)
### Automatic proxy configuration for containers
The property `proxies` specifies proxy environment variables to be automatically
set on containers, and set as `--build-arg` on containers used during `docker build`.
A `"default"` set of proxies can be configured, and will be used for any Docker
daemon that the client connects to, or a configuration per host (Docker daemon),
for example, `https://docker-daemon1.example.com`. The following properties can
be set for each environment:
| Property | Description |
|:---------------|:--------------------------------------------------------------------------------------------------------|
| `httpProxy` | Default value of `HTTP_PROXY` and `http_proxy` for containers, and as `--build-arg` on `docker build` |
| `httpsProxy` | Default value of `HTTPS_PROXY` and `https_proxy` for containers, and as `--build-arg` on `docker build` |
| `ftpProxy` | Default value of `FTP_PROXY` and `ftp_proxy` for containers, and as `--build-arg` on `docker build` |
| `noProxy` | Default value of `NO_PROXY` and `no_proxy` for containers, and as `--build-arg` on `docker build` |
| `allProxy` | Default value of `ALL_PROXY` and `all_proxy` for containers, and as `--build-arg` on `docker build` |
These settings are used to configure proxy settings for containers only, and not
used as proxy settings for the `docker` CLI or the `dockerd` daemon. Refer to the
[environment variables](#environment-variables) and [HTTP/HTTPS proxy](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
sections for configuring proxy settings for the cli and daemon.
> **Warning**
>
> Proxy settings may contain sensitive information (for example, if the proxy
> requires authentication). Environment variables are stored as plain text in
> the container's configuration, and as such can be inspected through the remote
> API or committed to an image when using `docker commit`.
{ .warning }
### Default key-sequence to detach from containers
Once attached to a container, users detach from it and leave it running using
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
using the `detachKeys` property. Specify a `<sequence>` value for the
property. The format of the `<sequence>` is a comma-separated list of either
a letter [a-Z], or the `ctrl-` combined with any of the following:
* `a-z` (a single lowercase alpha character )
* `@` (at sign)
* `[` (left bracket)
* `\\` (two backward slashes)
* `_` (underscore)
* `^` (caret)
Your customization applies to all containers started in with your Docker client.
Users can override your custom or the default key sequence on a per-container
basis. To do this, the user specifies the `--detach-keys` flag with the `docker
attach`, `docker exec`, `docker run` or `docker start` command.
### CLI plugin options
The property `plugins` contains settings specific to CLI plugins. The
key is the plugin name, while the value is a further map of options,
which are specific to that plugin.
### Sample configuration file
Following is a sample `config.json` file to illustrate the format used for
various fields:
```json
{
"HttpHeaders": {
"MyHeader": "MyValue"
},
"psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
"imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
"pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
"statsFormat": "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}",
"servicesFormat": "table {{.ID}}\t{{.Name}}\t{{.Mode}}",
"secretFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"configFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"serviceInspectFormat": "pretty",
"nodesFormat": "table {{.ID}}\t{{.Hostname}}\t{{.Availability}}",
"detachKeys": "ctrl-e,e",
"credsStore": "secretservice",
"credHelpers": {
"awesomereg.example.org": "hip-star",
"unicorn.example.com": "vcbait"
},
"plugins": {
"plugin1": {
"option": "value"
},
"plugin2": {
"anotheroption": "anothervalue",
"athirdoption": "athirdvalue"
}
},
"proxies": {
"default": {
"httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "https://my-proxy.example.com:3129",
"noProxy": "intra.mycorp.example.com",
"ftpProxy": "http://user:pass@example.com:3128",
"allProxy": "socks://example.com:1234"
},
"https://manager1.mycorp.example.com:2377": {
"httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "https://my-proxy.example.com:3129"
}
}
}
```
### Experimental features
Experimental features provide early access to future product functionality.
These features are intended for testing and feedback, and they may change
between releases without warning or can be removed from a future release.
Starting with Docker 20.10, experimental CLI features are enabled by default,
and require no configuration to enable them.
### Notary
If using your own notary server and a self-signed certificate or an internal
Certificate Authority, you need to place the certificate at
`tls/<registry_url>/ca.crt` in your Docker config directory.
Alternatively you can trust the certificate globally by adding it to your system's
list of root Certificate Authorities.
## Examples
### <a name="host"></a> Specify daemon host (-H, --host)
You can use the `-H`, `--host` flag to specify a socket to use when you invoke
a `docker` command. You can use the following protocols:
| Scheme | Description | Example |
|----------------------------------------|---------------------------|----------------------------------|
| `unix://[<path>]` | Unix socket (Linux only) | `unix:///var/run/docker.sock` |
| `tcp://[<IP or host>[:port]]` | TCP connection | `tcp://174.17.0.1:2376` |
| `ssh://[username@]<IP or host>[:port]` | SSH connection | `ssh://user@192.168.64.5` |
| `npipe://[<name>]` | Named pipe (Windows only) | `npipe:////./pipe/docker_engine` |
If you don't specify the `-H` flag, and you're not using a custom
[context](https://docs.docker.com/engine/context/working-with-contexts),
commands use the following default sockets:
- `unix:///var/run/docker.sock` on macOS and Linux
- `npipe:////./pipe/docker_engine` on Windows
To achieve a similar effect without having to specify the `-H` flag for every
command, you could also [create a context](https://docs.docker.com/reference/cli/docker/context/create/),
or alternatively, use the
[`DOCKER_HOST` environment variable](#environment-variables).
For more information about the `-H` flag, see
[Daemon socket option](https://docs.docker.com/reference/cli/dockerd/#daemon-socket-option).
#### Using TCP sockets
The following example shows how to invoke `docker ps` over TCP, to a remote
daemon with IP address `174.17.0.1`, listening on port `2376`:
```console
$ docker -H tcp://174.17.0.1:2376 ps
```
> **Note**
>
> By convention, the Docker daemon uses port `2376` for secure TLS connections,
> and port `2375` for insecure, non-TLS connections.
#### Using SSH sockets
When you use SSH invoke a command on a remote daemon, the request gets forwarded
to the `/var/run/docker.sock` Unix socket on the SSH host.
```console
$ docker -H ssh://user@192.168.64.5 ps
```
You can optionally specify the location of the socket by appending a path
component to the end of the SSH address.
```console
$ docker -H ssh://user@192.168.64.5/var/run/docker.sock ps
```
### Display help text
To list the help on any command just execute the command, followed by the
`--help` option.
```console
$ docker run --help
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Create and run a new container from an image
Options:
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
<...>
```
### Option types
Single character command line options can be combined, so rather than
typing `docker run -i -t --name test busybox sh`,
you can write `docker run -it --name test busybox sh`.
#### Boolean
Boolean options take the form `-d=false`. The value you see in the help text is
the default value which is set if you do **not** specify that flag. If you
specify a Boolean flag without a value, this will set the flag to `true`,
irrespective of the default value.
For example, running `docker run -d` will set the value to `true`, so your
container **will** run in "detached" mode, in the background.
Options which default to `true` (e.g., `docker build --rm=true`) can only be
set to the non-default value by explicitly setting them to `false`:
```console
$ docker build --rm=false .
```
#### Multi
You can specify options like `-a=[]` multiple times in a single command line,
for example in these commands:
```console
$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash
$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls
```
Sometimes, multiple options can call for a more complex value string as for
`-v`:
```console
$ docker run -v /host:/container example/mysql
```
> **Note**
>
> Do not use the `-t` and `-a stderr` options together due to
> limitations in the `pty` implementation. All `stderr` in `pty` mode
> simply goes to `stdout`.
#### Strings and Integers
Options like `--name=""` expect a string, and they
can only be specified once. Options like `-c=0`
expect an integer, and they can only be specified once.

View File

@ -8,7 +8,7 @@ Display detailed information on one or more configs
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--pretty` | | | Print the information in a human friendly format | | `--pretty` | `bool` | | Print the information in a human friendly format |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,7 +13,7 @@ List configs
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | `bool` | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -12,7 +12,7 @@ Attach local standard input, output, and error streams to a running container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------------|:---------|:--------|:----------------------------------------------------| |:--------------------------------|:---------|:--------|:----------------------------------------------------|
| [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container | | [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container |
| `--no-stdin` | | | Do not attach STDIN | | `--no-stdin` | `bool` | | Do not attach STDIN |
| `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process | | `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process |
@ -164,4 +164,4 @@ the following:
These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key
sequences. To configure a different configuration default key sequence for all sequences. To configure a different configuration default key sequence for all
containers, see [**Configuration file** section](https://docs.docker.com/engine/reference/commandline/cli/#configuration-files). containers, see [**Configuration file** section](https://docs.docker.com/reference/cli/docker/#configuration-files).

View File

@ -15,10 +15,10 @@ container source to stdout.
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------| |:----------------------|:-------|:--------|:-------------------------------------------------------------------------------------------------------------|
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) | | `-a`, `--archive` | `bool` | | Archive mode (copy all uid/gid information) |
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH | | `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH |
| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | | `-q`, `--quiet` | `bool` | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -54,10 +54,10 @@ Create a new container
| `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
| `--help` | | | Print usage | | `--help` | `bool` | | Print usage |
| `-h`, `--hostname` | `string` | | Container host name | | `-h`, `--hostname` | `string` | | Container host name |
| `--init` | | | Run an init inside the container that forwards signals and reaps processes | | `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached | | `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached |
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
@ -80,20 +80,20 @@ Create a new container
| `--name` | `string` | | Assign a name to the container | | `--name` | `string` | | Assign a name to the container |
| `--network` | `network` | | Connect a container to a network | | `--network` | `network` | | Connect a container to a network |
| `--network-alias` | `list` | | Add network-scoped alias for the container | | `--network-alias` | `list` | | Add network-scoped alias for the container |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--oom-kill-disable` | | | Disable OOM Killer | | `--oom-kill-disable` | `bool` | | Disable OOM Killer |
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
| `--pid` | `string` | | PID namespace to use | | `--pid` | `string` | | PID namespace to use |
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--privileged` | | | Give extended privileges to this container | | `--privileged` | `bool` | | Give extended privileges to this container |
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | | `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports |
| `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) | | `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) |
| `-q`, `--quiet` | | | Suppress the pull output | | `-q`, `--quiet` | `bool` | | Suppress the pull output |
| `--read-only` | | | Mount the container's root filesystem as read only | | `--read-only` | `bool` | | Mount the container's root filesystem as read only |
| `--restart` | `string` | `no` | Restart policy to apply when a container exits | | `--restart` | `string` | `no` | Restart policy to apply when a container exits |
| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits |
| `--runtime` | `string` | | Runtime to use for this container | | `--runtime` | `string` | | Runtime to use for this container |
| `--security-opt` | `list` | | Security Options | | `--security-opt` | `list` | | Security Options |
| `--shm-size` | `bytes` | `0` | Size of /dev/shm | | `--shm-size` | `bytes` | `0` | Size of /dev/shm |
@ -102,7 +102,7 @@ Create a new container
| `--storage-opt` | `list` | | Storage driver options for the container | | `--storage-opt` | `list` | | Storage driver options for the container |
| `--sysctl` | `map` | `map[]` | Sysctl options | | `--sysctl` | `map` | `map[]` | Sysctl options |
| `--tmpfs` | `list` | | Mount a tmpfs directory | | `--tmpfs` | `list` | | Mount a tmpfs directory |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| `--userns` | `string` | | User namespace to use | | `--userns` | `string` | | User namespace to use |

View File

@ -11,13 +11,13 @@ Execute a command in a running container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------------------|:---------|:--------|:-------------------------------------------------------| |:------------------------------------------|:---------|:--------|:-------------------------------------------------------|
| `-d`, `--detach` | | | Detached mode: run command in the background | | `-d`, `--detach` | `bool` | | Detached mode: run command in the background |
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| [`-e`](#env), [`--env`](#env) | `list` | | Set environment variables | | [`-e`](#env), [`--env`](#env) | `list` | | Set environment variables |
| `--env-file` | `list` | | Read in a file of environment variables | | `--env-file` | `list` | | Read in a file of environment variables |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached | | `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached |
| [`--privileged`](#privileged) | | | Give extended privileges to the command | | [`--privileged`](#privileged) | `bool` | | Give extended privileges to the command |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) | | `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) |
| [`-w`](#workdir), [`--workdir`](#workdir) | `string` | | Working directory inside the container | | [`-w`](#workdir), [`--workdir`](#workdir) | `string` | | Working directory inside the container |

View File

@ -8,7 +8,7 @@ Display detailed information on one or more containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-s`, `--size` | | | Display total file sizes | | `-s`, `--size` | `bool` | | Display total file sizes |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,11 +11,11 @@ Fetch the logs of a container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------| |:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------|
| `--details` | | | Show extra details provided to logs | | `--details` | `bool` | | Show extra details provided to logs |
| `-f`, `--follow` | | | Follow log output | | `-f`, `--follow` | `bool` | | Follow log output |
| `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs |
| `-t`, `--timestamps` | | | Show timestamps | | `-t`, `--timestamps` | `bool` | | Show timestamps |
| [`--until`](#until) | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | [`--until`](#until) | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |

View File

@ -11,14 +11,14 @@ List containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-a`](#all), [`--all`](#all) | | | Show all containers (default shows just running) | | [`-a`](#all), [`--all`](#all) | `bool` | | Show all containers (default shows just running) |
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) | | `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) |
| `-l`, `--latest` | | | Show the latest created container (includes all states) | | `-l`, `--latest` | `bool` | | Show the latest created container (includes all states) |
| [`--no-trunc`](#no-trunc) | | | Don't truncate output | | [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only display container IDs | | `-q`, `--quiet` | `bool` | | Only display container IDs |
| [`-s`](#size), [`--size`](#size) | | | Display total file sizes | | [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Remove all stopped containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------|
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,10 +10,10 @@ Remove one or more containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------------------|:-----|:--------|:--------------------------------------------------------| |:------------------------------------------|:-------|:--------|:--------------------------------------------------------|
| [`-f`](#force), [`--force`](#force) | | | Force the removal of a running container (uses SIGKILL) | | [`-f`](#force), [`--force`](#force) | `bool` | | Force the removal of a running container (uses SIGKILL) |
| [`-l`](#link), [`--link`](#link) | | | Remove the specified link | | [`-l`](#link), [`--link`](#link) | `bool` | | Remove the specified link |
| [`-v`](#volumes), [`--volumes`](#volumes) | | | Remove anonymous volumes associated with the container | | [`-v`](#volumes), [`--volumes`](#volumes) | `bool` | | Remove anonymous volumes associated with the container |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -31,7 +31,7 @@ Create and run a new container from an image
| `--cpus` | `decimal` | | Number of CPUs | | `--cpus` | `decimal` | | Number of CPUs |
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | | `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
| [`-d`](#detach), [`--detach`](#detach) | | | Run container in background and print container ID | | [`-d`](#detach), [`--detach`](#detach) | `bool` | | Run container in background and print container ID |
| [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container | | [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container |
| [`--device`](#device) | `list` | | Add a host device to the container | | [`--device`](#device) | `list` | | Add a host device to the container |
| [`--device-cgroup-rule`](#device-cgroup-rule) | `list` | | Add a rule to the cgroup allowed devices list | | [`--device-cgroup-rule`](#device-cgroup-rule) | `list` | | Add a rule to the cgroup allowed devices list |
@ -56,10 +56,10 @@ Create and run a new container from an image
| `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
| `--help` | | | Print usage | | `--help` | `bool` | | Print usage |
| `-h`, `--hostname` | `string` | | Container host name | | `-h`, `--hostname` | `string` | | Container host name |
| [`--init`](#init) | | | Run an init inside the container that forwards signals and reaps processes | | [`--init`](#init) | `bool` | | Run an init inside the container that forwards signals and reaps processes |
| [`-i`](#interactive), [`--interactive`](#interactive) | | | Keep STDIN open even if not attached | | [`-i`](#interactive), [`--interactive`](#interactive) | `bool` | | Keep STDIN open even if not attached |
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
@ -82,20 +82,20 @@ Create and run a new container from an image
| [`--name`](#name) | `string` | | Assign a name to the container | | [`--name`](#name) | `string` | | Assign a name to the container |
| [`--network`](#network) | `network` | | Connect a container to a network | | [`--network`](#network) | `network` | | Connect a container to a network |
| `--network-alias` | `list` | | Add network-scoped alias for the container | | `--network-alias` | `list` | | Add network-scoped alias for the container |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--oom-kill-disable` | | | Disable OOM Killer | | `--oom-kill-disable` | `bool` | | Disable OOM Killer |
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
| [`--pid`](#pid) | `string` | | PID namespace to use | | [`--pid`](#pid) | `string` | | PID namespace to use |
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| [`--privileged`](#privileged) | | | Give extended privileges to this container | | [`--privileged`](#privileged) | `bool` | | Give extended privileges to this container |
| [`-p`](#publish), [`--publish`](#publish) | `list` | | Publish a container's port(s) to the host | | [`-p`](#publish), [`--publish`](#publish) | `list` | | Publish a container's port(s) to the host |
| [`-P`](#publish-all), [`--publish-all`](#publish-all) | | | Publish all exposed ports to random ports | | [`-P`](#publish-all), [`--publish-all`](#publish-all) | `bool` | | Publish all exposed ports to random ports |
| [`--pull`](#pull) | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) | | [`--pull`](#pull) | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) |
| `-q`, `--quiet` | | | Suppress the pull output | | `-q`, `--quiet` | `bool` | | Suppress the pull output |
| [`--read-only`](#read-only) | | | Mount the container's root filesystem as read only | | [`--read-only`](#read-only) | `bool` | | Mount the container's root filesystem as read only |
| [`--restart`](#restart) | `string` | `no` | Restart policy to apply when a container exits | | [`--restart`](#restart) | `string` | `no` | Restart policy to apply when a container exits |
| [`--rm`](#rm) | | | Automatically remove the container and its associated anonymous volumes when it exits | | [`--rm`](#rm) | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits |
| `--runtime` | `string` | | Runtime to use for this container | | `--runtime` | `string` | | Runtime to use for this container |
| [`--security-opt`](#security-opt) | `list` | | Security Options | | [`--security-opt`](#security-opt) | `list` | | Security Options |
| `--shm-size` | `bytes` | `0` | Size of /dev/shm | | `--shm-size` | `bytes` | `0` | Size of /dev/shm |
@ -105,7 +105,7 @@ Create and run a new container from an image
| [`--storage-opt`](#storage-opt) | `list` | | Storage driver options for the container | | [`--storage-opt`](#storage-opt) | `list` | | Storage driver options for the container |
| [`--sysctl`](#sysctl) | `map` | `map[]` | Sysctl options | | [`--sysctl`](#sysctl) | `map` | `map[]` | Sysctl options |
| [`--tmpfs`](#tmpfs) | `list` | | Mount a tmpfs directory | | [`--tmpfs`](#tmpfs) | `list` | | Mount a tmpfs directory |
| [`-t`](#tty), [`--tty`](#tty) | | | Allocate a pseudo-TTY | | [`-t`](#tty), [`--tty`](#tty) | `bool` | | Allocate a pseudo-TTY |
| [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options | | [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| [`--userns`](#userns) | `string` | | User namespace to use | | [`--userns`](#userns) | `string` | | User namespace to use |
@ -869,7 +869,7 @@ the following:
These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key
sequences. To configure a different configuration default key sequence for all sequences. To configure a different configuration default key sequence for all
containers, see [**Configuration file** section](https://docs.docker.com/engine/reference/commandline/cli/#configuration-files). containers, see [**Configuration file** section](https://docs.docker.com/reference/cli/docker/#configuration-files).
### <a name="device"></a> Add host device to container (--device) ### <a name="device"></a> Add host device to container (--device)

View File

@ -11,11 +11,11 @@ Start one or more stopped containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:----------------------------------------------------| |:----------------------|:---------|:--------|:----------------------------------------------------|
| `-a`, `--attach` | | | Attach STDOUT/STDERR and forward signals | | `-a`, `--attach` | `bool` | | Attach STDOUT/STDERR and forward signals |
| `--checkpoint` | `string` | | Restore from this checkpoint | | `--checkpoint` | `string` | | Restore from this checkpoint |
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `-i`, `--interactive` | | | Attach container's STDIN | | `-i`, `--interactive` | `bool` | | Attach container's STDIN |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Display a live stream of container(s) resource usage statistics
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all containers (default shows just running) | | `-a`, `--all` | `bool` | | Show all containers (default shows just running) |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--no-stream` | | | Disable streaming stats and only pull the first result | | `--no-stream` | `bool` | | Disable streaming stats and only pull the first result |
| `--no-trunc` | | | Do not truncate output | | `--no-trunc` | `bool` | | Do not truncate output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -12,7 +12,7 @@ List contexts
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only show context names | | `-q`, `--quiet` | `bool` | | Only show context names |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,8 +10,8 @@ Remove one or more contexts
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:--------------------------------------| |:----------------|:-------|:--------|:--------------------------------------|
| `-f`, `--force` | | | Force the removal of a context in use | | `-f`, `--force` | `bool` | | Force the removal of a context in use |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -15,10 +15,10 @@ container source to stdout.
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------| |:----------------------|:-------|:--------|:-------------------------------------------------------------------------------------------------------------|
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) | | `-a`, `--archive` | `bool` | | Archive mode (copy all uid/gid information) |
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH | | `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH |
| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | | `-q`, `--quiet` | `bool` | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -54,10 +54,10 @@ Create a new container
| `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
| `--help` | | | Print usage | | `--help` | `bool` | | Print usage |
| `-h`, `--hostname` | `string` | | Container host name | | `-h`, `--hostname` | `string` | | Container host name |
| `--init` | | | Run an init inside the container that forwards signals and reaps processes | | `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached | | `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached |
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
@ -80,20 +80,20 @@ Create a new container
| `--name` | `string` | | Assign a name to the container | | `--name` | `string` | | Assign a name to the container |
| `--network` | `network` | | Connect a container to a network | | `--network` | `network` | | Connect a container to a network |
| `--network-alias` | `list` | | Add network-scoped alias for the container | | `--network-alias` | `list` | | Add network-scoped alias for the container |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--oom-kill-disable` | | | Disable OOM Killer | | `--oom-kill-disable` | `bool` | | Disable OOM Killer |
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
| `--pid` | `string` | | PID namespace to use | | `--pid` | `string` | | PID namespace to use |
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--privileged` | | | Give extended privileges to this container | | `--privileged` | `bool` | | Give extended privileges to this container |
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | | `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports |
| `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) | | `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) |
| `-q`, `--quiet` | | | Suppress the pull output | | `-q`, `--quiet` | `bool` | | Suppress the pull output |
| `--read-only` | | | Mount the container's root filesystem as read only | | `--read-only` | `bool` | | Mount the container's root filesystem as read only |
| `--restart` | `string` | `no` | Restart policy to apply when a container exits | | `--restart` | `string` | `no` | Restart policy to apply when a container exits |
| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits |
| `--runtime` | `string` | | Runtime to use for this container | | `--runtime` | `string` | | Runtime to use for this container |
| `--security-opt` | `list` | | Security Options | | `--security-opt` | `list` | | Security Options |
| `--shm-size` | `bytes` | `0` | Size of /dev/shm | | `--shm-size` | `bytes` | `0` | Size of /dev/shm |
@ -102,7 +102,7 @@ Create a new container
| `--storage-opt` | `list` | | Storage driver options for the container | | `--storage-opt` | `list` | | Storage driver options for the container |
| `--sysctl` | `map` | `map[]` | Sysctl options | | `--sysctl` | `map` | `map[]` | Sysctl options |
| `--tmpfs` | `list` | | Mount a tmpfs directory | | `--tmpfs` | `list` | | Mount a tmpfs directory |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| `--userns` | `string` | | User namespace to use | | `--userns` | `string` | | User namespace to use |

View File

@ -69,18 +69,413 @@ The base command for the Docker CLI.
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
| `--config` | `string` | `/root/.docker` | Location of client config files | | `--config` | `string` | `/root/.docker` | Location of client config files |
| `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) | | `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) |
| `-D`, `--debug` | | | Enable debug mode | | `-D`, `--debug` | `bool` | | Enable debug mode |
| `-H`, `--host` | `list` | | Daemon socket to connect to | | [`-H`](#host), [`--host`](#host) | `list` | | Daemon socket to connect to |
| `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) | | `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) |
| `--tls` | | | Use TLS; implied by --tlsverify | | `--tls` | `bool` | | Use TLS; implied by --tlsverify |
| `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA | | `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA |
| `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file | | `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file |
| `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file | | `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file |
| `--tlsverify` | | | Use TLS and verify the remote | | `--tlsverify` | `bool` | | Use TLS and verify the remote |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
## Description
Depending on your Docker system configuration, you may be required to preface
each `docker` command with `sudo`. To avoid having to use `sudo` with the
`docker` command, your system administrator can create a Unix group called
`docker` and add users to it.
For more information about installing Docker or `sudo` configuration, refer to
the [installation](https://docs.docker.com/install/) instructions for your operating system.
### Display help text
To list the help on any command just execute the command, followed by the
`--help` option.
```console
$ docker run --help
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Create and run a new container from an image
Options:
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
<...>
```
### Environment variables
The following list of environment variables are supported by the `docker` command
line:
| Variable | Description |
| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKER_API_VERSION` | Override the negotiated API version to use for debugging (e.g. `1.19`) |
| `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the `docker` CLI and the [`dockerd` daemon](https://docs.docker.com/reference/cli/dockerd/) |
| `DOCKER_CONFIG` | The location of your client configuration files. |
| `DOCKER_CONTENT_TRUST_SERVER` | The URL of the Notary server to use. Defaults to the same URL as the registry. |
| `DOCKER_CONTENT_TRUST` | When set Docker uses notary to sign and verify images. Equates to `--disable-content-trust=false` for build, create, pull, push, run. |
| `DOCKER_CONTEXT` | Name of the `docker context` to use (overrides `DOCKER_HOST` env var and default context set with `docker context use`) |
| `DOCKER_DEFAULT_PLATFORM` | Default platform for commands that take the `--platform` flag. |
| `DOCKER_HIDE_LEGACY_COMMANDS` | When set, Docker hides "legacy" top-level commands (such as `docker rm`, and `docker pull`) in `docker help` output, and only `Management commands` per object-type (e.g., `docker container`) are printed. This may become the default in a future release. |
| `DOCKER_HOST` | Daemon socket to connect to. |
| `DOCKER_TLS` | Enable TLS for connections made by the `docker` CLI (equivalent of the `--tls` command-line option). Set to a non-empty value to enable TLS. Note that TLS is enabled automatically if any of the other TLS options are set. |
| `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the `docker` CLI and the [`dockerd` daemon](https://docs.docker.com/reference/cli/dockerd/) |
| `BUILDKIT_PROGRESS` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`) when [building](https://docs.docker.com/reference/cli/docker/image/build/) with [BuildKit backend](https://docs.docker.com/build/buildkit/). Use plain to show container output (default `auto`). |
Because Docker is developed using Go, you can also use any environment
variables used by the Go runtime. In particular, you may find these useful:
| Variable | Description |
|:--------------|:-------------------------------------------------------------------------------|
| `HTTP_PROXY` | Proxy URL for HTTP requests unless overridden by NoProxy. |
| `HTTPS_PROXY` | Proxy URL for HTTPS requests unless overridden by NoProxy. |
| `NO_PROXY` | Comma-separated values specifying hosts that should be excluded from proxying. |
See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config)
for details on these variables.
### Option types
Single character command line options can be combined, so rather than
typing `docker run -i -t --name test busybox sh`,
you can write `docker run -it --name test busybox sh`.
#### Boolean
Boolean options take the form `-d=false`. The value you see in the help text is
the default value which is set if you do **not** specify that flag. If you
specify a Boolean flag without a value, this will set the flag to `true`,
irrespective of the default value.
For example, running `docker run -d` will set the value to `true`, so your
container **will** run in "detached" mode, in the background.
Options which default to `true` (e.g., `docker build --rm=true`) can only be
set to the non-default value by explicitly setting them to `false`:
```console
$ docker build --rm=false .
```
#### Multi
You can specify options like `-a=[]` multiple times in a single command line,
for example in these commands:
```console
$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash
$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls
```
Sometimes, multiple options can call for a more complex value string as for
`-v`:
```console
$ docker run -v /host:/container example/mysql
```
> **Note**
>
> Do not use the `-t` and `-a stderr` options together due to
> limitations in the `pty` implementation. All `stderr` in `pty` mode
> simply goes to `stdout`.
#### Strings and Integers
Options like `--name=""` expect a string, and they
can only be specified once. Options like `-c=0`
expect an integer, and they can only be specified once.
### Configuration files
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 shouldn't modify them. However, you can modify the
`config.json` file to control certain aspects of how the `docker`
command behaves.
You can modify the `docker` command behavior using environment
variables or command-line options. You can also use options within
`config.json` to modify some of the same behavior. If an environment variable
and the `--config` flag are set, the flag takes precedent over the environment
variable. Command line options override environment variables and environment
variables override properties you specify in a `config.json` file.
#### Change the `.docker` directory
To specify a different directory, use the `DOCKER_CONFIG`
environment variable or the `--config` command line option. If both are
specified, then the `--config` option overrides the `DOCKER_CONFIG` environment
variable. The example below overrides the `docker ps` command using a
`config.json` file located in the `~/testconfigs/` directory.
```console
$ docker --config ~/testconfigs/ ps
```
This flag only applies to whatever command is being ran. For persistent
configuration, you can set the `DOCKER_CONFIG` environment variable in your
shell (e.g. `~/.profile` or `~/.bashrc`). The example below sets the new
directory to be `HOME/newdir/.docker`.
```console
$ echo export DOCKER_CONFIG=$HOME/newdir/.docker > ~/.profile
```
### Docker CLI configuration file (`config.json`) properties
<a name="configjson-properties"><!-- included for deep-links to old section --></a>
Use the Docker CLI configuration to customize settings for the `docker` CLI. The
configuration file uses JSON formatting, and properties:
By default, configuration file is stored in `~/.docker/config.json`. Refer to the
[change the `.docker` directory](#change-the-docker-directory) section to use a
different location.
> **Warning**
>
> The configuration file and other files inside the `~/.docker` configuration
> directory may contain sensitive information, such as authentication information
> for proxies or, depending on your credential store, credentials for your image
> registries. Review your configuration file's content before sharing with others,
> and prevent committing the file to version control.
#### Customize the default output format for commands
These fields lets you customize the default output format for some commands
if no `--format` flag is provided.
| Property | Description |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `configFormat` | Custom default format for `docker config ls` output. See [`docker config ls`](https://docs.docker.com/reference/cli/docker/config/ls/#format) for a list of supported formatting directives. |
| `imagesFormat` | Custom default format for `docker images` / `docker image ls` output. See [`docker images`](https://docs.docker.com/reference/cli/docker/image/ls/#format) for a list of supported formatting directives. |
| `networksFormat` | Custom default format for `docker network ls` output. See [`docker network ls`](https://docs.docker.com/reference/cli/docker/network/ls/#format) for a list of supported formatting directives. |
| `nodesFormat` | Custom default format for `docker node ls` output. See [`docker node ls`](https://docs.docker.com/reference/cli/docker/node/ls/#format) for a list of supported formatting directives. |
| `pluginsFormat` | Custom default format for `docker plugin ls` output. See [`docker plugin ls`](https://docs.docker.com/reference/cli/docker/plugin/ls/#format) for a list of supported formatting directives. |
| `psFormat` | Custom default format for `docker ps` / `docker container ps` output. See [`docker ps`](https://docs.docker.com/reference/cli/docker/container/ls/#format) for a list of supported formatting directives. |
| `secretFormat` | Custom default format for `docker secret ls` output. See [`docker secret ls`](https://docs.docker.com/reference/cli/docker/secret/ls/#format) for a list of supported formatting directives. |
| `serviceInspectFormat` | Custom default format for `docker service inspect` output. See [`docker service inspect`](https://docs.docker.com/reference/cli/docker/service/inspect/#format) for a list of supported formatting directives. |
| `servicesFormat` | Custom default format for `docker service ls` output. See [`docker service ls`](https://docs.docker.com/reference/cli/docker/service/ls/#format) for a list of supported formatting directives. |
| `statsFormat` | Custom default format for `docker stats` output. See [`docker stats`](https://docs.docker.com/reference/cli/docker/container/stats/#format) for a list of supported formatting directives. |
| `tasksFormat` | Custom default format for `docker stack ps` output. See [`docker stack ps`](https://docs.docker.com/reference/cli/docker/stack/ps/#format) for a list of supported formatting directives. |
| `volumesFormat` | Custom default format for `docker volume ls` output. See [`docker volume ls`](https://docs.docker.com/reference/cli/docker/volume/ls/#format) for a list of supported formatting directives. |
#### Custom HTTP headers
The property `HttpHeaders` specifies a set of headers to include in all messages
sent from the Docker client to the daemon. Docker doesn't try to interpret or
understand these headers; it simply puts them into the messages. Docker does
not allow these headers to change any headers it sets for itself.
#### Credential store options
The property `credsStore` specifies an external binary to serve as the default
credential store. When this property is set, `docker login` will attempt to
store credentials in the binary specified by `docker-credential-<value>` which
is visible on `$PATH`. If this property isn't set, credentials are stored
in the `auths` property of the CLI configuration file. For more information,
see the [**Credential stores** section in the `docker login` documentation](https://docs.docker.com/reference/cli/docker/login/#credential-stores)
The property `credHelpers` specifies a set of credential helpers to use
preferentially over `credsStore` or `auths` when storing and retrieving
credentials for specific registries. If this property is set, the binary
`docker-credential-<value>` will be used when storing or retrieving credentials
for a specific registry. For more information, see the
[**Credential helpers** section in the `docker login` documentation](https://docs.docker.com/reference/cli/docker/login/#credential-helpers)
#### Automatic proxy configuration for containers
The property `proxies` specifies proxy environment variables to be automatically
set on containers, and set as `--build-arg` on containers used during `docker build`.
A `"default"` set of proxies can be configured, and will be used for any Docker
daemon that the client connects to, or a configuration per host (Docker daemon),
for example, `https://docker-daemon1.example.com`. The following properties can
be set for each environment:
| Property | Description |
|:---------------|:--------------------------------------------------------------------------------------------------------|
| `httpProxy` | Default value of `HTTP_PROXY` and `http_proxy` for containers, and as `--build-arg` on `docker build` |
| `httpsProxy` | Default value of `HTTPS_PROXY` and `https_proxy` for containers, and as `--build-arg` on `docker build` |
| `ftpProxy` | Default value of `FTP_PROXY` and `ftp_proxy` for containers, and as `--build-arg` on `docker build` |
| `noProxy` | Default value of `NO_PROXY` and `no_proxy` for containers, and as `--build-arg` on `docker build` |
| `allProxy` | Default value of `ALL_PROXY` and `all_proxy` for containers, and as `--build-arg` on `docker build` |
These settings are used to configure proxy settings for containers only, and not
used as proxy settings for the `docker` CLI or the `dockerd` daemon. Refer to the
[environment variables](#environment-variables) and [HTTP/HTTPS proxy](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
sections for configuring proxy settings for the cli and daemon.
> **Warning**
>
> Proxy settings may contain sensitive information (for example, if the proxy
> requires authentication). Environment variables are stored as plain text in
> the container's configuration, and as such can be inspected through the remote
> API or committed to an image when using `docker commit`.
{ .warning }
#### Default key-sequence to detach from containers
Once attached to a container, users detach from it and leave it running using
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
using the `detachKeys` property. Specify a `<sequence>` value for the
property. The format of the `<sequence>` is a comma-separated list of either
a letter [a-Z], or the `ctrl-` combined with any of the following:
* `a-z` (a single lowercase alpha character )
* `@` (at sign)
* `[` (left bracket)
* `\\` (two backward slashes)
* `_` (underscore)
* `^` (caret)
Your customization applies to all containers started in with your Docker client.
Users can override your custom or the default key sequence on a per-container
basis. To do this, the user specifies the `--detach-keys` flag with the `docker
attach`, `docker exec`, `docker run` or `docker start` command.
#### CLI plugin options
The property `plugins` contains settings specific to CLI plugins. The
key is the plugin name, while the value is a further map of options,
which are specific to that plugin.
#### Sample configuration file
Following is a sample `config.json` file to illustrate the format used for
various fields:
```json
{
"HttpHeaders": {
"MyHeader": "MyValue"
},
"psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
"imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
"pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
"statsFormat": "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}",
"servicesFormat": "table {{.ID}}\t{{.Name}}\t{{.Mode}}",
"secretFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"configFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"serviceInspectFormat": "pretty",
"nodesFormat": "table {{.ID}}\t{{.Hostname}}\t{{.Availability}}",
"detachKeys": "ctrl-e,e",
"credsStore": "secretservice",
"credHelpers": {
"awesomereg.example.org": "hip-star",
"unicorn.example.com": "vcbait"
},
"plugins": {
"plugin1": {
"option": "value"
},
"plugin2": {
"anotheroption": "anothervalue",
"athirdoption": "athirdvalue"
}
},
"proxies": {
"default": {
"httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "https://my-proxy.example.com:3129",
"noProxy": "intra.mycorp.example.com",
"ftpProxy": "http://user:pass@example.com:3128",
"allProxy": "socks://example.com:1234"
},
"https://manager1.mycorp.example.com:2377": {
"httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "https://my-proxy.example.com:3129"
}
}
}
```
#### Experimental features
Experimental features provide early access to future product functionality.
These features are intended for testing and feedback, and they may change
between releases without warning or can be removed from a future release.
Starting with Docker 20.10, experimental CLI features are enabled by default,
and require no configuration to enable them.
#### Notary
If using your own notary server and a self-signed certificate or an internal
Certificate Authority, you need to place the certificate at
`tls/<registry_url>/ca.crt` in your Docker config directory.
Alternatively you can trust the certificate globally by adding it to your system's
list of root Certificate Authorities.
## Examples
### <a name="host"></a> Specify daemon host (-H, --host)
You can use the `-H`, `--host` flag to specify a socket to use when you invoke
a `docker` command. You can use the following protocols:
| Scheme | Description | Example |
|----------------------------------------|---------------------------|----------------------------------|
| `unix://[<path>]` | Unix socket (Linux only) | `unix:///var/run/docker.sock` |
| `tcp://[<IP or host>[:port]]` | TCP connection | `tcp://174.17.0.1:2376` |
| `ssh://[username@]<IP or host>[:port]` | SSH connection | `ssh://user@192.168.64.5` |
| `npipe://[<name>]` | Named pipe (Windows only) | `npipe:////./pipe/docker_engine` |
If you don't specify the `-H` flag, and you're not using a custom
[context](https://docs.docker.com/engine/context/working-with-contexts),
commands use the following default sockets:
- `unix:///var/run/docker.sock` on macOS and Linux
- `npipe:////./pipe/docker_engine` on Windows
To achieve a similar effect without having to specify the `-H` flag for every
command, you could also [create a context](https://docs.docker.com/reference/cli/docker/context/create/),
or alternatively, use the
[`DOCKER_HOST` environment variable](#environment-variables).
For more information about the `-H` flag, see
[Daemon socket option](https://docs.docker.com/reference/cli/dockerd/#daemon-socket-option).
#### Using TCP sockets
The following example shows how to invoke `docker ps` over TCP, to a remote
daemon with IP address `174.17.0.1`, listening on port `2376`:
```console
$ docker -H tcp://174.17.0.1:2376 ps
```
> **Note**
>
> By convention, the Docker daemon uses port `2376` for secure TLS connections,
> and port `2375` for insecure, non-TLS connections.
#### Using SSH sockets
When you use SSH invoke a command on a remote daemon, the request gets forwarded
to the `/var/run/docker.sock` Unix socket on the SSH host.
```console
$ docker -H ssh://user@192.168.64.5 ps
```
You can optionally specify the location of the socket by appending a path
component to the end of the SSH address.
```console
$ docker -H ssh://user@192.168.64.5/var/run/docker.sock ps
```

View File

@ -11,13 +11,13 @@ Execute a command in a running container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------------|
| `-d`, `--detach` | | | Detached mode: run command in the background | | `-d`, `--detach` | `bool` | | Detached mode: run command in the background |
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `-e`, `--env` | `list` | | Set environment variables | | `-e`, `--env` | `list` | | Set environment variables |
| `--env-file` | `list` | | Read in a file of environment variables | | `--env-file` | `list` | | Read in a file of environment variables |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached | | `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached |
| `--privileged` | | | Give extended privileges to the command | | `--privileged` | `bool` | | Give extended privileges to the command |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) | | `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) |
| `-w`, `--workdir` | `string` | | Working directory inside the container | | `-w`, `--workdir` | `string` | | Working directory inside the container |

View File

@ -13,8 +13,8 @@ Show the history of an image
|:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format | | `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format |
| `--no-trunc` | | | Don't truncate output | | `--no-trunc` | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only show image IDs | | `-q`, `--quiet` | `bool` | | Only show image IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -15,7 +15,7 @@ Build an image from a Dockerfile
| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables |
| `--cache-from` | `stringSlice` | | Images to consider as cache sources | | `--cache-from` | `stringSlice` | | Images to consider as cache sources |
| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build |
| `--compress` | | | Compress the build context using gzip | | `--compress` | `bool` | | Compress the build context using gzip |
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
@ -23,21 +23,21 @@ Build an image from a Dockerfile
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
| `--force-rm` | | | Always remove intermediate containers | | `--force-rm` | `bool` | | Always remove intermediate containers |
| `--iidfile` | `string` | | Write the image ID to the file | | `--iidfile` | `string` | | Write the image ID to the file |
| [`--isolation`](#isolation) | `string` | | Container isolation technology | | [`--isolation`](#isolation) | `string` | | Container isolation technology |
| `--label` | `list` | | Set metadata for an image | | `--label` | `list` | | Set metadata for an image |
| `-m`, `--memory` | `bytes` | `0` | Memory limit | | `-m`, `--memory` | `bytes` | `0` | Memory limit |
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build |
| `--no-cache` | | | Do not use cache when building the image | | `--no-cache` | `bool` | | Do not use cache when building the image |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--pull` | | | Always attempt to pull a newer version of the image | | `--pull` | `bool` | | Always attempt to pull a newer version of the image |
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | | `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success |
| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build |
| [`--security-opt`](#security-opt) | `stringSlice` | | Security options | | [`--security-opt`](#security-opt) | `stringSlice` | | Security options |
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
| [`--squash`](#squash) | | | Squash newly built layers into a single new layer | | [`--squash`](#squash) | `bool` | | Squash newly built layers into a single new layer |
| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format |
| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |

View File

@ -13,8 +13,8 @@ Show the history of an image
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format | | `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format |
| `--no-trunc` | | | Don't truncate output | | `--no-trunc` | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only show image IDs | | `-q`, `--quiet` | `bool` | | Only show image IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -12,7 +12,7 @@ Load an image from a tar archive or STDIN
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------------|:---------|:--------|:---------------------------------------------| |:------------------------------------|:---------|:--------|:---------------------------------------------|
| [`-i`](#input), [`--input`](#input) | `string` | | Read from tar archive file, instead of STDIN | | [`-i`](#input), [`--input`](#input) | `string` | | Read from tar archive file, instead of STDIN |
| `-q`, `--quiet` | | | Suppress the load output | | `-q`, `--quiet` | `bool` | | Suppress the load output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,12 +11,12 @@ List images
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all images (default hides intermediate images) | | `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) |
| [`--digests`](#digests) | | | Show digests | | [`--digests`](#digests) | `bool` | | Show digests |
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`--no-trunc`](#no-trunc) | | | Don't truncate output | | [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only show image IDs | | `-q`, `--quiet` | `bool` | | Only show image IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,9 +7,9 @@ Remove unused images
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------|
| `-a`, `--all` | | | Remove all unused images, not just dangling ones | | `-a`, `--all` | `bool` | | Remove all unused images, not just dangling ones |
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Download an image from a registry
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------------|:---------|:--------|:-------------------------------------------------| |:---------------------------------------------|:---------|:--------|:-------------------------------------------------|
| [`-a`](#all-tags), [`--all-tags`](#all-tags) | | | Download all tagged images in the repository | | [`-a`](#all-tags), [`--all-tags`](#all-tags) | `bool` | | Download all tagged images in the repository |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `-q`, `--quiet` | | | Suppress verbose output | | `-q`, `--quiet` | `bool` | | Suppress verbose output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Upload an image to a registry
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------|
| [`-a`](#all-tags), [`--all-tags`](#all-tags) | | | Push all tags of an image to the repository | | [`-a`](#all-tags), [`--all-tags`](#all-tags) | `bool` | | Push all tags of an image to the repository |
| `--disable-content-trust` | `bool` | `true` | Skip image signing | | `--disable-content-trust` | `bool` | `true` | Skip image signing |
| `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.<br>'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) | | `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.<br>'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) |
| `-q`, `--quiet` | | | Suppress verbose output | | `-q`, `--quiet` | `bool` | | Suppress verbose output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,9 +10,9 @@ Remove one or more images
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------------------| |:----------------|:-------|:--------|:-------------------------------|
| `-f`, `--force` | | | Force removal of the image | | `-f`, `--force` | `bool` | | Force removal of the image |
| `--no-prune` | | | Do not delete untagged parents | | `--no-prune` | `bool` | | Do not delete untagged parents |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,12 +11,12 @@ List images
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all images (default hides intermediate images) | | `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) |
| `--digests` | | | Show digests | | `--digests` | `bool` | | Show digests |
| `-f`, `--filter` | `filter` | | Filter output based on conditions provided | | `-f`, `--filter` | `filter` | | Filter output based on conditions provided |
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--no-trunc` | | | Don't truncate output | | `--no-trunc` | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only show image IDs | | `-q`, `--quiet` | `bool` | | Only show image IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,7 +10,7 @@ identifier: "smn_cli_guide"
This section contains reference information on using Docker's command line This section contains reference information on using Docker's command line
client. Each command has a reference page along with samples. If you are client. Each command has a reference page along with samples. If you are
unfamiliar with the command line, you should start by reading about how to [Use unfamiliar with the command line, you should start by reading about how to [Use
the Docker command line](https://docs.docker.com/engine/reference/commandline/cli/). the Docker command line](https://docs.docker.com/reference/cli/docker/).
You start the Docker daemon with the command line. How you start the daemon You start the Docker daemon with the command line. How you start the daemon
affects your Docker containers. For that reason you should also make sure to affects your Docker containers. For that reason you should also make sure to

View File

@ -8,7 +8,7 @@ Return low-level information on Docker objects
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`-s`](#size), [`--size`](#size) | | | Display total file sizes if the type is container | | [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes if the type is container |
| [`--type`](#type) | `string` | | Return JSON for specified type | | [`--type`](#type) | `string` | | Return JSON for specified type |

View File

@ -12,7 +12,7 @@ Load an image from a tar archive or STDIN
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------|:---------------------------------------------| |:----------------|:---------|:--------|:---------------------------------------------|
| `-i`, `--input` | `string` | | Read from tar archive file, instead of STDIN | | `-i`, `--input` | `string` | | Read from tar archive file, instead of STDIN |
| `-q`, `--quiet` | | | Suppress the load output | | `-q`, `--quiet` | `bool` | | Suppress the load output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,7 +9,7 @@ If no server is specified, the default is defined by the daemon.
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------------------|:---------|:--------|:-----------------------------| |:--------------------------------------|:---------|:--------|:-----------------------------|
| `-p`, `--password` | `string` | | Password | | `-p`, `--password` | `string` | | Password |
| [`--password-stdin`](#password-stdin) | | | Take the password from stdin | | [`--password-stdin`](#password-stdin) | `bool` | | Take the password from stdin |
| `-u`, `--username` | `string` | | Username | | `-u`, `--username` | `string` | | Username |

View File

@ -11,11 +11,11 @@ Fetch the logs of a container
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------| |:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------|
| `--details` | | | Show extra details provided to logs | | `--details` | `bool` | | Show extra details provided to logs |
| `-f`, `--follow` | | | Follow log output | | `-f`, `--follow` | `bool` | | Follow log output |
| `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs |
| `-t`, `--timestamps` | | | Show timestamps | | `-t`, `--timestamps` | `bool` | | Show timestamps |
| `--until` | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `--until` | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |

View File

@ -6,9 +6,9 @@ Create a local manifest list for annotating and pushing to a registry
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:----------------------------------------------| |:----------------|:-------|:--------|:----------------------------------------------|
| `-a`, `--amend` | | | Amend an existing manifest list | | `-a`, `--amend` | `bool` | | Amend an existing manifest list |
| `--insecure` | | | Allow communication with an insecure registry | | `--insecure` | `bool` | | Allow communication with an insecure registry |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,9 +6,9 @@ Display an image manifest, or manifest list
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------|:-----|:--------|:-----------------------------------------------------| |:------------------|:-------|:--------|:-----------------------------------------------------|
| `--insecure` | | | Allow communication with an insecure registry | | `--insecure` | `bool` | | Allow communication with an insecure registry |
| `-v`, `--verbose` | | | Output additional info including layers and platform | | `-v`, `--verbose` | `bool` | | Output additional info including layers and platform |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,9 +6,9 @@ Push a manifest list to a repository
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:------------------------------------------| |:----------------|:-------|:--------|:------------------------------------------|
| `--insecure` | | | Allow push to an insecure registry | | `--insecure` | `bool` | | Allow push to an insecure registry |
| `-p`, `--purge` | | | Remove the local manifest list after push | | `-p`, `--purge` | `bool` | | Remove the local manifest list after push |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,18 +7,18 @@ Create a network
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------|:--------------|:----------|:--------------------------------------------------------| |:--------------------------|:--------------|:----------|:--------------------------------------------------------|
| `--attachable` | | | Enable manual container attachment | | `--attachable` | `bool` | | Enable manual container attachment |
| `--aux-address` | `map` | `map[]` | Auxiliary IPv4 or IPv6 addresses used by Network driver | | `--aux-address` | `map` | `map[]` | Auxiliary IPv4 or IPv6 addresses used by Network driver |
| `--config-from` | `string` | | The network from which to copy the configuration | | `--config-from` | `string` | | The network from which to copy the configuration |
| `--config-only` | | | Create a configuration only network | | `--config-only` | `bool` | | Create a configuration only network |
| `-d`, `--driver` | `string` | `bridge` | Driver to manage the Network | | `-d`, `--driver` | `string` | `bridge` | Driver to manage the Network |
| `--gateway` | `stringSlice` | | IPv4 or IPv6 Gateway for the master subnet | | `--gateway` | `stringSlice` | | IPv4 or IPv6 Gateway for the master subnet |
| [`--ingress`](#ingress) | | | Create swarm routing-mesh network | | [`--ingress`](#ingress) | `bool` | | Create swarm routing-mesh network |
| [`--internal`](#internal) | | | Restrict external access to the network | | [`--internal`](#internal) | `bool` | | Restrict external access to the network |
| `--ip-range` | `stringSlice` | | Allocate container ip from a sub-range | | `--ip-range` | `stringSlice` | | Allocate container ip from a sub-range |
| `--ipam-driver` | `string` | `default` | IP Address Management Driver | | `--ipam-driver` | `string` | `default` | IP Address Management Driver |
| `--ipam-opt` | `map` | `map[]` | Set IPAM driver specific options | | `--ipam-opt` | `map` | `map[]` | Set IPAM driver specific options |
| `--ipv6` | | | Enable or disable IPv6 networking | | `--ipv6` | `bool` | | Enable or disable IPv6 networking |
| `--label` | `list` | | Set metadata on a network | | `--label` | `list` | | Set metadata on a network |
| `-o`, `--opt` | `map` | `map[]` | Set driver specific options | | `-o`, `--opt` | `map` | `map[]` | Set driver specific options |
| `--scope` | `string` | | Control the network's scope | | `--scope` | `string` | | Control the network's scope |

View File

@ -6,8 +6,8 @@ Disconnect a container from a network
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------------------------------------| |:----------------|:-------|:--------|:-------------------------------------------------|
| `-f`, `--force` | | | Force the container to disconnect from a network | | `-f`, `--force` | `bool` | | Force the container to disconnect from a network |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Display detailed information on one or more networks
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`-v`](#verbose), [`--verbose`](#verbose) | | | Verbose output for diagnostics | | [`-v`](#verbose), [`--verbose`](#verbose) | `bool` | | Verbose output for diagnostics |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,8 +13,8 @@ List networks
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `driver=bridge`) | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `driver=bridge`) |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--no-trunc` | | | Do not truncate the output | | `--no-trunc` | `bool` | | Do not truncate the output |
| `-q`, `--quiet` | | | Only display network IDs | | `-q`, `--quiet` | `bool` | | Only display network IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Remove all unused networks
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------|
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,8 +10,8 @@ Remove one or more networks
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------------------------------| |:----------------|:-------|:--------|:-------------------------------------------|
| `-f`, `--force` | | | Do not error if the network does not exist | | `-f`, `--force` | `bool` | | Do not error if the network does not exist |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Display detailed information on one or more nodes
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--pretty` | | | Print the information in a human friendly format | | `--pretty` | `bool` | | Print the information in a human friendly format |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,7 +13,7 @@ List nodes in the swarm
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | `bool` | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,9 +9,9 @@ List tasks running on one or more nodes, defaults to current node
|:---------------------------------------|:---------|:--------|:-------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Pretty-print tasks using a Go template | | [`--format`](#format) | `string` | | Pretty-print tasks using a Go template |
| `--no-resolve` | | | Do not map IDs to Names | | `--no-resolve` | `bool` | | Do not map IDs to Names |
| `--no-trunc` | | | Do not truncate output | | `--no-trunc` | `bool` | | Do not truncate output |
| `-q`, `--quiet` | | | Only display task IDs | | `-q`, `--quiet` | `bool` | | Only display task IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,8 +10,8 @@ Remove one or more nodes from the swarm
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------------|:-----|:--------|:-----------------------------------| |:------------------------------------|:-------|:--------|:-----------------------------------|
| [`-f`](#force), [`--force`](#force) | | | Force remove a node from the swarm | | [`-f`](#force), [`--force`](#force) | `bool` | | Force remove a node from the swarm |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Create a plugin from a rootfs and configuration. Plugin data directory must cont
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------|:-----|:--------|:--------------------------------| |:-------------|:-------|:--------|:--------------------------------|
| `--compress` | | | Compress the context using gzip | | `--compress` | `bool` | | Compress the context using gzip |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Disable a plugin
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:--------------------------------------| |:----------------|:-------|:--------|:--------------------------------------|
| `-f`, `--force` | | | Force the disable of an active plugin | | `-f`, `--force` | `bool` | | Force the disable of an active plugin |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,9 +8,9 @@ Install a plugin
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------|:---------|:--------|:--------------------------------------------------| |:--------------------------|:---------|:--------|:--------------------------------------------------|
| `--alias` | `string` | | Local name for plugin | | `--alias` | `string` | | Local name for plugin |
| `--disable` | | | Do not enable the plugin on install | | `--disable` | `bool` | | Do not enable the plugin on install |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| `--grant-all-permissions` | | | Grant all permissions necessary to run the plugin | | `--grant-all-permissions` | `bool` | | Grant all permissions necessary to run the plugin |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,8 +13,8 @@ List plugins
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `enabled=true`) | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `enabled=true`) |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--no-trunc` | | | Don't truncate output | | `--no-trunc` | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only display plugin IDs | | `-q`, `--quiet` | `bool` | | Only display plugin IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,8 +10,8 @@ Remove one or more plugins
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:--------------------------------------| |:----------------|:-------|:--------|:--------------------------------------|
| `-f`, `--force` | | | Force the removal of an active plugin | | `-f`, `--force` | `bool` | | Force the removal of an active plugin |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,8 +8,8 @@ Upgrade an existing plugin
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------|:-------|:--------|:----------------------------------------------------------------------| |:--------------------------|:-------|:--------|:----------------------------------------------------------------------|
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| `--grant-all-permissions` | | | Grant all permissions necessary to run the plugin | | `--grant-all-permissions` | `bool` | | Grant all permissions necessary to run the plugin |
| `--skip-remote-check` | | | Do not check if specified remote plugin matches existing plugin image | | `--skip-remote-check` | `bool` | | Do not check if specified remote plugin matches existing plugin image |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,14 +11,14 @@ List containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all containers (default shows just running) | | `-a`, `--all` | `bool` | | Show all containers (default shows just running) |
| `-f`, `--filter` | `filter` | | Filter output based on conditions provided | | `-f`, `--filter` | `filter` | | Filter output based on conditions provided |
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) | | `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) |
| `-l`, `--latest` | | | Show the latest created container (includes all states) | | `-l`, `--latest` | `bool` | | Show the latest created container (includes all states) |
| `--no-trunc` | | | Don't truncate output | | `--no-trunc` | `bool` | | Don't truncate output |
| `-q`, `--quiet` | | | Only display container IDs | | `-q`, `--quiet` | `bool` | | Only display container IDs |
| `-s`, `--size` | | | Display total file sizes | | `-s`, `--size` | `bool` | | Display total file sizes |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Download an image from a registry
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------|:---------|:--------|:-------------------------------------------------| |:--------------------------|:---------|:--------|:-------------------------------------------------|
| `-a`, `--all-tags` | | | Download all tagged images in the repository | | `-a`, `--all-tags` | `bool` | | Download all tagged images in the repository |
| `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--disable-content-trust` | `bool` | `true` | Skip image verification |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `-q`, `--quiet` | | | Suppress verbose output | | `-q`, `--quiet` | `bool` | | Suppress verbose output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Upload an image to a registry
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------| |:--------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all-tags` | | | Push all tags of an image to the repository | | `-a`, `--all-tags` | `bool` | | Push all tags of an image to the repository |
| `--disable-content-trust` | `bool` | `true` | Skip image signing | | `--disable-content-trust` | `bool` | `true` | Skip image signing |
| `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.<br>'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) | | `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.<br>'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) |
| `-q`, `--quiet` | | | Suppress verbose output | | `-q`, `--quiet` | `bool` | | Suppress verbose output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,10 +10,10 @@ Remove one or more containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------|:-----|:--------|:--------------------------------------------------------| |:------------------|:-------|:--------|:--------------------------------------------------------|
| `-f`, `--force` | | | Force the removal of a running container (uses SIGKILL) | | `-f`, `--force` | `bool` | | Force the removal of a running container (uses SIGKILL) |
| `-l`, `--link` | | | Remove the specified link | | `-l`, `--link` | `bool` | | Remove the specified link |
| `-v`, `--volumes` | | | Remove anonymous volumes associated with the container | | `-v`, `--volumes` | `bool` | | Remove anonymous volumes associated with the container |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,9 +10,9 @@ Remove one or more images
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------------------| |:----------------|:-------|:--------|:-------------------------------|
| `-f`, `--force` | | | Force removal of the image | | `-f`, `--force` | `bool` | | Force removal of the image |
| `--no-prune` | | | Do not delete untagged parents | | `--no-prune` | `bool` | | Do not delete untagged parents |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -31,7 +31,7 @@ Create and run a new container from an image
| `--cpus` | `decimal` | | Number of CPUs | | `--cpus` | `decimal` | | Number of CPUs |
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | | `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
| `-d`, `--detach` | | | Run container in background and print container ID | | `-d`, `--detach` | `bool` | | Run container in background and print container ID |
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `--device` | `list` | | Add a host device to the container | | `--device` | `list` | | Add a host device to the container |
| `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list | | `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list |
@ -56,10 +56,10 @@ Create and run a new container from an image
| `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
| `--help` | | | Print usage | | `--help` | `bool` | | Print usage |
| `-h`, `--hostname` | `string` | | Container host name | | `-h`, `--hostname` | `string` | | Container host name |
| `--init` | | | Run an init inside the container that forwards signals and reaps processes | | `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached | | `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached |
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
@ -82,20 +82,20 @@ Create and run a new container from an image
| `--name` | `string` | | Assign a name to the container | | `--name` | `string` | | Assign a name to the container |
| `--network` | `network` | | Connect a container to a network | | `--network` | `network` | | Connect a container to a network |
| `--network-alias` | `list` | | Add network-scoped alias for the container | | `--network-alias` | `list` | | Add network-scoped alias for the container |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--oom-kill-disable` | | | Disable OOM Killer | | `--oom-kill-disable` | `bool` | | Disable OOM Killer |
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
| `--pid` | `string` | | PID namespace to use | | `--pid` | `string` | | PID namespace to use |
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
| `--platform` | `string` | | Set platform if server is multi-platform capable | | `--platform` | `string` | | Set platform if server is multi-platform capable |
| `--privileged` | | | Give extended privileges to this container | | `--privileged` | `bool` | | Give extended privileges to this container |
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | | `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports |
| `--pull` | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) | | `--pull` | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) |
| `-q`, `--quiet` | | | Suppress the pull output | | `-q`, `--quiet` | `bool` | | Suppress the pull output |
| `--read-only` | | | Mount the container's root filesystem as read only | | `--read-only` | `bool` | | Mount the container's root filesystem as read only |
| `--restart` | `string` | `no` | Restart policy to apply when a container exits | | `--restart` | `string` | `no` | Restart policy to apply when a container exits |
| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits |
| `--runtime` | `string` | | Runtime to use for this container | | `--runtime` | `string` | | Runtime to use for this container |
| `--security-opt` | `list` | | Security Options | | `--security-opt` | `list` | | Security Options |
| `--shm-size` | `bytes` | `0` | Size of /dev/shm | | `--shm-size` | `bytes` | `0` | Size of /dev/shm |
@ -105,7 +105,7 @@ Create and run a new container from an image
| `--storage-opt` | `list` | | Storage driver options for the container | | `--storage-opt` | `list` | | Storage driver options for the container |
| `--sysctl` | `map` | `map[]` | Sysctl options | | `--sysctl` | `map` | `map[]` | Sysctl options |
| `--tmpfs` | `list` | | Mount a tmpfs directory | | `--tmpfs` | `list` | | Mount a tmpfs directory |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| `--userns` | `string` | | User namespace to use | | `--userns` | `string` | | User namespace to use |

View File

@ -10,7 +10,7 @@ Search Docker Hub for images
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Pretty-print search using a Go template | | [`--format`](#format) | `string` | | Pretty-print search using a Go template |
| [`--limit`](#limit) | `int` | `0` | Max number of search results | | [`--limit`](#limit) | `int` | `0` | Max number of search results |
| [`--no-trunc`](#no-trunc) | | | Don't truncate output | | [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Display detailed information on one or more secrets
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--pretty` | | | Print the information in a human friendly format | | `--pretty` | `bool` | | Print the information in a human friendly format |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,7 +13,7 @@ List secrets
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | `bool` | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,7 +13,7 @@ Create a new service
| [`--constraint`](#constraint) | `list` | | Placement constraints | | [`--constraint`](#constraint) | `list` | | Placement constraints |
| `--container-label` | `list` | | Container labels | | `--container-label` | `list` | | Container labels |
| `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) | | `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) |
| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | | `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge |
| `--dns` | `list` | | Set custom DNS servers | | `--dns` | `list` | | Set custom DNS servers |
| `--dns-option` | `list` | | Set DNS options | | `--dns-option` | `list` | | Set DNS options |
| `--dns-search` | `list` | | Set custom DNS search domains | | `--dns-search` | `list` | | Set custom DNS search domains |
@ -31,7 +31,7 @@ Create a new service
| `--health-timeout` | `duration` | | Maximum time to allow one check to run (ms\|s\|m\|h) | | `--health-timeout` | `duration` | | Maximum time to allow one check to run (ms\|s\|m\|h) |
| `--host` | `list` | | Set one or more custom host-to-IP mappings (host:ip) | | `--host` | `list` | | Set one or more custom host-to-IP mappings (host:ip) |
| [`--hostname`](#hostname) | `string` | | Container hostname | | [`--hostname`](#hostname) | `string` | | Container hostname |
| `--init` | | | Use an init inside each service container to forward signals and reap processes | | `--init` | `bool` | | Use an init inside each service container to forward signals and reap processes |
| [`--isolation`](#isolation) | `string` | | Service container isolation mode | | [`--isolation`](#isolation) | `string` | | Service container isolation mode |
| [`-l`](#label), [`--label`](#label) | `list` | | Service labels | | [`-l`](#label), [`--label`](#label) | `list` | | Service labels |
| `--limit-cpu` | `decimal` | | Limit CPUs | | `--limit-cpu` | `decimal` | | Limit CPUs |
@ -44,12 +44,12 @@ Create a new service
| [`--mount`](#mount) | `mount` | | Attach a filesystem mount to the service | | [`--mount`](#mount) | `mount` | | Attach a filesystem mount to the service |
| `--name` | `string` | | Service name | | `--name` | `string` | | Service name |
| [`--network`](#network) | `network` | | Network attachments | | [`--network`](#network) | `network` | | Network attachments |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms | | `--no-resolve-image` | `bool` | | Do not query the registry to resolve image digest and supported platforms |
| [`--placement-pref`](#placement-pref) | `pref` | | Add a placement preference | | [`--placement-pref`](#placement-pref) | `pref` | | Add a placement preference |
| [`-p`](#publish), [`--publish`](#publish) | `port` | | Publish a port as a node port | | [`-p`](#publish), [`--publish`](#publish) | `port` | | Publish a port as a node port |
| `-q`, `--quiet` | | | Suppress progress output | | `-q`, `--quiet` | `bool` | | Suppress progress output |
| `--read-only` | | | Mount the container's root filesystem as read only | | `--read-only` | `bool` | | Mount the container's root filesystem as read only |
| [`--replicas`](#replicas) | `uint` | | Number of tasks | | [`--replicas`](#replicas) | `uint` | | Number of tasks |
| [`--replicas-max-per-node`](#replicas-max-per-node) | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) | | [`--replicas-max-per-node`](#replicas-max-per-node) | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) |
| `--reserve-cpu` | `decimal` | | Reserve CPUs | | `--reserve-cpu` | `decimal` | | Reserve CPUs |
@ -68,7 +68,7 @@ Create a new service
| `--stop-grace-period` | `duration` | | Time to wait before force killing a container (ns\|us\|ms\|s\|m\|h) (default 10s) | | `--stop-grace-period` | `duration` | | Time to wait before force killing a container (ns\|us\|ms\|s\|m\|h) (default 10s) |
| `--stop-signal` | `string` | | Signal to stop the container | | `--stop-signal` | `string` | | Signal to stop the container |
| `--sysctl` | `list` | | Sysctl options | | `--sysctl` | `list` | | Sysctl options |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `--ulimit` | `ulimit` | | Ulimit options | | `--ulimit` | `ulimit` | | Ulimit options |
| [`--update-delay`](#update-delay) | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) (default 0s) | | [`--update-delay`](#update-delay) | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) (default 0s) |
| `--update-failure-action` | `string` | | Action on update failure (`pause`, `continue`, `rollback`) (default `pause`) | | `--update-failure-action` | `string` | | Action on update failure (`pause`, `continue`, `rollback`) (default `pause`) |
@ -77,7 +77,7 @@ Create a new service
| `--update-order` | `string` | | Update order (`start-first`, `stop-first`) (default `stop-first`) | | `--update-order` | `string` | | Update order (`start-first`, `stop-first`) (default `stop-first`) |
| `--update-parallelism` | `uint64` | `1` | Maximum number of tasks updated simultaneously (0 to update all at once) | | `--update-parallelism` | `uint64` | `1` | Maximum number of tasks updated simultaneously (0 to update all at once) |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| [`--with-registry-auth`](#with-registry-auth) | | | Send registry authentication details to swarm agents | | [`--with-registry-auth`](#with-registry-auth) | `bool` | | Send registry authentication details to swarm agents |
| `-w`, `--workdir` | `string` | | Working directory inside the container | | `-w`, `--workdir` | `string` | | Working directory inside the container |

View File

@ -8,7 +8,7 @@ Display detailed information on one or more services
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`--pretty`](#pretty) | | | Print the information in a human friendly format | | [`--pretty`](#pretty) | `bool` | | Print the information in a human friendly format |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,15 +7,15 @@ Fetch the logs of a service or task
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------|:---------|:--------|:------------------------------------------------------------------------------------------------| |:---------------------|:---------|:--------|:------------------------------------------------------------------------------------------------|
| `--details` | | | Show extra details provided to logs | | `--details` | `bool` | | Show extra details provided to logs |
| `-f`, `--follow` | | | Follow log output | | `-f`, `--follow` | `bool` | | Follow log output |
| `--no-resolve` | | | Do not map IDs to Names in output | | `--no-resolve` | `bool` | | Do not map IDs to Names in output |
| `--no-task-ids` | | | Do not include task IDs in output | | `--no-task-ids` | `bool` | | Do not include task IDs in output |
| `--no-trunc` | | | Do not truncate output | | `--no-trunc` | `bool` | | Do not truncate output |
| `--raw` | | | Do not neatly format logs | | `--raw` | `bool` | | Do not neatly format logs |
| `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs |
| `-t`, `--timestamps` | | | Show timestamps | | `-t`, `--timestamps` | `bool` | | Show timestamps |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,7 +13,7 @@ List services
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | `bool` | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,9 +9,9 @@ List the tasks of one or more services
|:---------------------------------------|:---------|:--------|:-------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Pretty-print tasks using a Go template | | [`--format`](#format) | `string` | | Pretty-print tasks using a Go template |
| `--no-resolve` | | | Do not map IDs to Names | | `--no-resolve` | `bool` | | Do not map IDs to Names |
| `--no-trunc` | | | Do not truncate output | | `--no-trunc` | `bool` | | Do not truncate output |
| `-q`, `--quiet` | | | Only display task IDs | | `-q`, `--quiet` | `bool` | | Only display task IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,9 +6,9 @@ Revert changes to a service's configuration
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:-----|:--------|:----------------------------------------------------------------| |:-----------------|:-------|:--------|:----------------------------------------------------------------|
| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | | `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge |
| `-q`, `--quiet` | | | Suppress progress output | | `-q`, `--quiet` | `bool` | | Suppress progress output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Scale one or multiple replicated services
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------|:-----|:--------|:----------------------------------------------------------------| |:-----------------|:-------|:--------|:----------------------------------------------------------------|
| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | | `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -17,7 +17,7 @@ Update a service
| `--container-label-add` | `list` | | Add or update a container label | | `--container-label-add` | `list` | | Add or update a container label |
| `--container-label-rm` | `list` | | Remove a container label by its key | | `--container-label-rm` | `list` | | Remove a container label by its key |
| `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) | | `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) |
| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | | `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge |
| `--dns-add` | `list` | | Add or update a custom DNS server | | `--dns-add` | `list` | | Add or update a custom DNS server |
| `--dns-option-add` | `list` | | Add or update a DNS option | | `--dns-option-add` | `list` | | Add or update a DNS option |
| `--dns-option-rm` | `list` | | Remove a DNS option | | `--dns-option-rm` | `list` | | Remove a DNS option |
@ -28,7 +28,7 @@ Update a service
| `--entrypoint` | `command` | | Overwrite the default ENTRYPOINT of the image | | `--entrypoint` | `command` | | Overwrite the default ENTRYPOINT of the image |
| `--env-add` | `list` | | Add or update an environment variable | | `--env-add` | `list` | | Add or update an environment variable |
| `--env-rm` | `list` | | Remove an environment variable | | `--env-rm` | `list` | | Remove an environment variable |
| `--force` | | | Force update even if no changes require it | | `--force` | `bool` | | Force update even if no changes require it |
| `--generic-resource-add` | `list` | | Add a Generic resource | | `--generic-resource-add` | `list` | | Add a Generic resource |
| `--generic-resource-rm` | `list` | | Remove a Generic resource | | `--generic-resource-rm` | `list` | | Remove a Generic resource |
| `--group-add` | `list` | | Add an additional supplementary user group to the container | | `--group-add` | `list` | | Add an additional supplementary user group to the container |
@ -43,7 +43,7 @@ Update a service
| `--host-rm` | `list` | | Remove a custom host-to-IP mapping (`host:ip`) | | `--host-rm` | `list` | | Remove a custom host-to-IP mapping (`host:ip`) |
| `--hostname` | `string` | | Container hostname | | `--hostname` | `string` | | Container hostname |
| `--image` | `string` | | Service image tag | | `--image` | `string` | | Service image tag |
| `--init` | | | Use an init inside each service container to forward signals and reap processes | | `--init` | `bool` | | Use an init inside each service container to forward signals and reap processes |
| [`--isolation`](#isolation) | `string` | | Service container isolation mode | | [`--isolation`](#isolation) | `string` | | Service container isolation mode |
| `--label-add` | `list` | | Add or update a service label | | `--label-add` | `list` | | Add or update a service label |
| `--label-rm` | `list` | | Remove a label by its key | | `--label-rm` | `list` | | Remove a label by its key |
@ -57,14 +57,14 @@ Update a service
| `--mount-rm` | `list` | | Remove a mount by its target path | | `--mount-rm` | `list` | | Remove a mount by its target path |
| [`--network-add`](#network-add) | `network` | | Add a network | | [`--network-add`](#network-add) | `network` | | Add a network |
| `--network-rm` | `list` | | Remove a network | | `--network-rm` | `list` | | Remove a network |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | | `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK |
| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms | | `--no-resolve-image` | `bool` | | Do not query the registry to resolve image digest and supported platforms |
| `--placement-pref-add` | `pref` | | Add a placement preference | | `--placement-pref-add` | `pref` | | Add a placement preference |
| `--placement-pref-rm` | `pref` | | Remove a placement preference | | `--placement-pref-rm` | `pref` | | Remove a placement preference |
| [`--publish-add`](#publish-add) | `port` | | Add or update a published port | | [`--publish-add`](#publish-add) | `port` | | Add or update a published port |
| `--publish-rm` | `port` | | Remove a published port by its target port | | `--publish-rm` | `port` | | Remove a published port by its target port |
| `-q`, `--quiet` | | | Suppress progress output | | `-q`, `--quiet` | `bool` | | Suppress progress output |
| `--read-only` | | | Mount the container's root filesystem as read only | | `--read-only` | `bool` | | Mount the container's root filesystem as read only |
| `--replicas` | `uint` | | Number of tasks | | `--replicas` | `uint` | | Number of tasks |
| `--replicas-max-per-node` | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) | | `--replicas-max-per-node` | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) |
| `--reserve-cpu` | `decimal` | | Reserve CPUs | | `--reserve-cpu` | `decimal` | | Reserve CPUs |
@ -73,7 +73,7 @@ Update a service
| `--restart-delay` | `duration` | | Delay between restart attempts (ns\|us\|ms\|s\|m\|h) | | `--restart-delay` | `duration` | | Delay between restart attempts (ns\|us\|ms\|s\|m\|h) |
| `--restart-max-attempts` | `uint` | | Maximum number of restarts before giving up | | `--restart-max-attempts` | `uint` | | Maximum number of restarts before giving up |
| `--restart-window` | `duration` | | Window used to evaluate the restart policy (ns\|us\|ms\|s\|m\|h) | | `--restart-window` | `duration` | | Window used to evaluate the restart policy (ns\|us\|ms\|s\|m\|h) |
| [`--rollback`](#rollback) | | | Rollback to previous specification | | [`--rollback`](#rollback) | `bool` | | Rollback to previous specification |
| `--rollback-delay` | `duration` | `0s` | Delay between task rollbacks (ns\|us\|ms\|s\|m\|h) | | `--rollback-delay` | `duration` | `0s` | Delay between task rollbacks (ns\|us\|ms\|s\|m\|h) |
| `--rollback-failure-action` | `string` | | Action on rollback failure (`pause`, `continue`) | | `--rollback-failure-action` | `string` | | Action on rollback failure (`pause`, `continue`) |
| `--rollback-max-failure-ratio` | `float` | `0` | Failure rate to tolerate during a rollback | | `--rollback-max-failure-ratio` | `float` | `0` | Failure rate to tolerate during a rollback |
@ -86,7 +86,7 @@ Update a service
| `--stop-signal` | `string` | | Signal to stop the container | | `--stop-signal` | `string` | | Signal to stop the container |
| `--sysctl-add` | `list` | | Add or update a Sysctl option | | `--sysctl-add` | `list` | | Add or update a Sysctl option |
| `--sysctl-rm` | `list` | | Remove a Sysctl option | | `--sysctl-rm` | `list` | | Remove a Sysctl option |
| `-t`, `--tty` | | | Allocate a pseudo-TTY | | `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY |
| `--ulimit-add` | `ulimit` | | Add or update a ulimit option | | `--ulimit-add` | `ulimit` | | Add or update a ulimit option |
| `--ulimit-rm` | `list` | | Remove a ulimit option | | `--ulimit-rm` | `list` | | Remove a ulimit option |
| `--update-delay` | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) | | `--update-delay` | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) |
@ -96,7 +96,7 @@ Update a service
| `--update-order` | `string` | | Update order (`start-first`, `stop-first`) | | `--update-order` | `string` | | Update order (`start-first`, `stop-first`) |
| [`--update-parallelism`](#update-parallelism) | `uint64` | `0` | Maximum number of tasks updated simultaneously (0 to update all at once) | | [`--update-parallelism`](#update-parallelism) | `uint64` | `0` | Maximum number of tasks updated simultaneously (0 to update all at once) |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| `--with-registry-auth` | | | Send registry authentication details to swarm agents | | `--with-registry-auth` | `bool` | | Send registry authentication details to swarm agents |
| `-w`, `--workdir` | `string` | | Working directory inside the container | | `-w`, `--workdir` | `string` | | Working directory inside the container |

View File

@ -8,7 +8,7 @@ Outputs the final config file, after doing merges and interpolations
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------------|:--------------|:--------|:--------------------------------------------------| |:-----------------------|:--------------|:--------|:--------------------------------------------------|
| `-c`, `--compose-file` | `stringSlice` | | Path to a Compose file, or `-` to read from stdin | | `-c`, `--compose-file` | `stringSlice` | | Path to a Compose file, or `-` to read from stdin |
| `--skip-interpolation` | | | Skip interpolation and output only merged config | | `--skip-interpolation` | `bool` | | Skip interpolation and output only merged config |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,10 +13,10 @@ Deploy a new stack or update an existing stack
|:---------------------------------------------------------|:--------------|:---------|:--------------------------------------------------------------------------------------------------| |:---------------------------------------------------------|:--------------|:---------|:--------------------------------------------------------------------------------------------------|
| [`-c`](#compose-file), [`--compose-file`](#compose-file) | `stringSlice` | | Path to a Compose file, or `-` to read from stdin | | [`-c`](#compose-file), [`--compose-file`](#compose-file) | `stringSlice` | | Path to a Compose file, or `-` to read from stdin |
| `-d`, `--detach` | `bool` | `true` | Exit immediately instead of waiting for the stack services to converge | | `-d`, `--detach` | `bool` | `true` | Exit immediately instead of waiting for the stack services to converge |
| `--prune` | | | Prune services that are no longer referenced | | `--prune` | `bool` | | Prune services that are no longer referenced |
| `-q`, `--quiet` | | | Suppress progress output | | `-q`, `--quiet` | `bool` | | Suppress progress output |
| `--resolve-image` | `string` | `always` | Query the registry to resolve image digest and supported platforms (`always`, `changed`, `never`) | | `--resolve-image` | `string` | `always` | Query the registry to resolve image digest and supported platforms (`always`, `changed`, `never`) |
| `--with-registry-auth` | | | Send registry authentication details to Swarm agents | | `--with-registry-auth` | `bool` | | Send registry authentication details to Swarm agents |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,9 +9,9 @@ List the tasks in the stack
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`--no-resolve`](#no-resolve) | | | Do not map IDs to Names | | [`--no-resolve`](#no-resolve) | `bool` | | Do not map IDs to Names |
| [`--no-trunc`](#no-trunc) | | | Do not truncate output | | [`--no-trunc`](#no-trunc) | `bool` | | Do not truncate output |
| [`-q`](#quiet), [`--quiet`](#quiet) | | | Only display task IDs | | [`-q`](#quiet), [`--quiet`](#quiet) | `bool` | | Only display task IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,7 +9,7 @@ List the services in the stack
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | `bool` | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,11 +11,11 @@ Start one or more stopped containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:----------------------------------------------------| |:----------------------|:---------|:--------|:----------------------------------------------------|
| `-a`, `--attach` | | | Attach STDOUT/STDERR and forward signals | | `-a`, `--attach` | `bool` | | Attach STDOUT/STDERR and forward signals |
| `--checkpoint` | `string` | | Restore from this checkpoint | | `--checkpoint` | `string` | | Restore from this checkpoint |
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `-i`, `--interactive` | | | Attach container's STDIN | | `-i`, `--interactive` | `bool` | | Attach container's STDIN |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ Display a live stream of container(s) resource usage statistics
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:--------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all containers (default shows just running) | | `-a`, `--all` | `bool` | | Show all containers (default shows just running) |
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `--no-stream` | | | Disable streaming stats and only pull the first result | | `--no-stream` | `bool` | | Disable streaming stats and only pull the first result |
| `--no-trunc` | | | Do not truncate output | | `--no-trunc` | `bool` | | Do not truncate output |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,10 +10,10 @@ Display and rotate the root CA
| `--ca-cert` | `pem-file` | | Path to the PEM-formatted root CA certificate to use for the new cluster | | `--ca-cert` | `pem-file` | | Path to the PEM-formatted root CA certificate to use for the new cluster |
| `--ca-key` | `pem-file` | | Path to the PEM-formatted root CA key to use for the new cluster | | `--ca-key` | `pem-file` | | Path to the PEM-formatted root CA key to use for the new cluster |
| `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) |
| [`-d`](#detach), [`--detach`](#detach) | | | Exit immediately instead of waiting for the root rotation to converge | | [`-d`](#detach), [`--detach`](#detach) | `bool` | | Exit immediately instead of waiting for the root rotation to converge |
| `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints | | `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints |
| `-q`, `--quiet` | | | Suppress progress output | | `-q`, `--quiet` | `bool` | | Suppress progress output |
| [`--rotate`](#rotate) | | | Rotate the swarm CA - if no certificate or key are provided, new ones will be generated | | [`--rotate`](#rotate) | `bool` | | Rotate the swarm CA - if no certificate or key are provided, new ones will be generated |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Initialize a swarm
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------------------------------------|:--------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------------| |:--------------------------------------------|:--------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------------|
| [`--advertise-addr`](#advertise-addr) | `string` | | Advertised address (format: `<ip\|interface>[:port]`) | | [`--advertise-addr`](#advertise-addr) | `string` | | Advertised address (format: `<ip\|interface>[:port]`) |
| [`--autolock`](#autolock) | | | Enable manager autolocking (requiring an unlock key to start a stopped manager) | | [`--autolock`](#autolock) | `bool` | | Enable manager autolocking (requiring an unlock key to start a stopped manager) |
| [`--availability`](#availability) | `string` | `active` | Availability of the node (`active`, `pause`, `drain`) | | [`--availability`](#availability) | `string` | `active` | Availability of the node (`active`, `pause`, `drain`) |
| `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) |
| [`--data-path-addr`](#data-path-addr) | `string` | | Address or interface to use for data path traffic (format: `<ip\|interface>`) | | [`--data-path-addr`](#data-path-addr) | `string` | | Address or interface to use for data path traffic (format: `<ip\|interface>`) |
@ -17,7 +17,7 @@ Initialize a swarm
| `--default-addr-pool-mask-length` | `uint32` | `24` | default address pool subnet mask length | | `--default-addr-pool-mask-length` | `uint32` | `24` | default address pool subnet mask length |
| `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) | | `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) |
| [`--external-ca`](#external-ca) | `external-ca` | | Specifications of one or more certificate signing endpoints | | [`--external-ca`](#external-ca) | `external-ca` | | Specifications of one or more certificate signing endpoints |
| [`--force-new-cluster`](#force-new-cluster) | | | Force create a new cluster from current state | | [`--force-new-cluster`](#force-new-cluster) | `bool` | | Force create a new cluster from current state |
| [`--listen-addr`](#listen-addr) | `node-addr` | `0.0.0.0:2377` | Listen address (format: `<ip\|interface>[:port]`) | | [`--listen-addr`](#listen-addr) | `node-addr` | `0.0.0.0:2377` | Listen address (format: `<ip\|interface>[:port]`) |
| [`--max-snapshots`](#max-snapshots) | `uint64` | `0` | Number of additional Raft snapshots to retain | | [`--max-snapshots`](#max-snapshots) | `uint64` | `0` | Number of additional Raft snapshots to retain |
| [`--snapshot-interval`](#snapshot-interval) | `uint64` | `10000` | Number of log entries between Raft snapshots | | [`--snapshot-interval`](#snapshot-interval) | `uint64` | `10000` | Number of log entries between Raft snapshots |

View File

@ -6,9 +6,9 @@ Manage join tokens
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------| |:----------------|:-------|:--------|:-------------------|
| `-q`, `--quiet` | | | Only display token | | `-q`, `--quiet` | `bool` | | Only display token |
| `--rotate` | | | Rotate join token | | `--rotate` | `bool` | | Rotate join token |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Leave the swarm
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:------------------------------------------------------| |:----------------|:-------|:--------|:------------------------------------------------------|
| `-f`, `--force` | | | Force this node to leave the swarm, ignoring warnings | | `-f`, `--force` | `bool` | | Force this node to leave the swarm, ignoring warnings |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,9 +6,9 @@ Manage the unlock key
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-------------------| |:----------------|:-------|:--------|:-------------------|
| `-q`, `--quiet` | | | Only display token | | `-q`, `--quiet` | `bool` | | Only display token |
| `--rotate` | | | Rotate unlock key | | `--rotate` | `bool` | | Rotate unlock key |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,7 +7,7 @@ Update the swarm
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------------|:--------------|:------------|:------------------------------------------------------------| |:-------------------------|:--------------|:------------|:------------------------------------------------------------|
| `--autolock` | | | Change manager autolocking setting (true\|false) | | `--autolock` | `bool` | | Change manager autolocking setting (true\|false) |
| `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) |
| `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) | | `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) |
| `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints | | `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints |

View File

@ -8,7 +8,7 @@ Show docker disk usage
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-v`, `--verbose` | | | Show detailed information on space usage | | `-v`, `--verbose` | `bool` | | Show detailed information on space usage |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,10 +7,10 @@ Remove unused data
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:---------|:--------|:---------------------------------------------------| |:----------------------|:---------|:--------|:---------------------------------------------------|
| `-a`, `--all` | | | Remove all unused images not just dangling ones | | `-a`, `--all` | `bool` | | Remove all unused images not just dangling ones |
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<key>=<value>`) | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<key>=<value>`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
| `--volumes` | | | Prune anonymous volumes | | `--volumes` | `bool` | | Prune anonymous volumes |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Return low-level information about keys and signatures
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------|:-----|:--------|:-------------------------------------------------| |:-----------|:-------|:--------|:-------------------------------------------------|
| `--pretty` | | | Print the information in a human friendly format | | `--pretty` | `bool` | | Print the information in a human friendly format |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Remove trust for an image
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:--------------|:-----|:--------|:-------------------------------| |:--------------|:-------|:--------|:-------------------------------|
| `-y`, `--yes` | | | Do not prompt for confirmation | | `-y`, `--yes` | `bool` | | Do not prompt for confirmation |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Sign an image
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------|:-----|:--------|:----------------------------| |:----------|:-------|:--------|:----------------------------|
| `--local` | | | Sign a locally tagged image | | `--local` | `bool` | | Sign a locally tagged image |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -6,8 +6,8 @@ Remove a signer
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:----------------------------------------------------------------------| |:----------------|:-------|:--------|:----------------------------------------------------------------------|
| `-f`, `--force` | | | Do not prompt for confirmation before removing the most recent signer | | `-f`, `--force` | `bool` | | Do not prompt for confirmation before removing the most recent signer |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -11,10 +11,10 @@ List volumes
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--cluster` | | | Display only cluster volumes, and use cluster volume list formatting | | `--cluster` | `bool` | | Display only cluster volumes, and use cluster volume list formatting |
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `dangling=true`) | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `dangling=true`) |
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| `-q`, `--quiet` | | | Only display volume names | | `-q`, `--quiet` | `bool` | | Only display volume names |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,9 +7,9 @@ Remove unused local volumes
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------------|:---------|:--------|:---------------------------------------------------| |:------------------------------|:---------|:--------|:---------------------------------------------------|
| [`-a`](#all), [`--all`](#all) | | | Remove all unused volumes, not just anonymous ones | | [`-a`](#all), [`--all`](#all) | `bool` | | Remove all unused volumes, not just anonymous ones |
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<label>`) | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<label>`) |
| `-f`, `--force` | | | Do not prompt for confirmation | | `-f`, `--force` | `bool` | | Do not prompt for confirmation |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -12,8 +12,8 @@ Remove one or more volumes. You cannot remove a volume that is in use by a conta
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:-----|:--------|:-----------------------------------------| |:----------------|:-------|:--------|:-----------------------------------------|
| `-f`, `--force` | | | Force the removal of one or more volumes | | `-f`, `--force` | `bool` | | Force the removal of one or more volumes |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -133,16 +133,16 @@ to [the `daemon.json` file](#daemon-configuration-file).
The following list of environment variables are supported by the `dockerd` daemon. The following list of environment variables are supported by the `dockerd` daemon.
Some of these environment variables are supported both by the Docker Daemon and Some of these environment variables are supported both by the Docker Daemon and
the `docker` CLI. Refer to [Environment variables](https://docs.docker.com/engine/reference/commandline/cli/#environment-variables) the `docker` CLI. Refer to [Environment variables](https://docs.docker.com/reference/cli/docker/#environment-variables)
in the CLI section to learn about environment variables supported by the in the CLI section to learn about environment variables supported by the
`docker` CLI. `docker` CLI.
| Variable | Description | | Variable | Description |
| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the [`docker` CLI](https://docs.docker.com/engine/reference/commandline/cli/) and the `dockerd` daemon. | | `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the [`docker` CLI](https://docs.docker.com/reference/cli/docker/) and the `dockerd` daemon. |
| `DOCKER_DRIVER` | The storage driver to use. | | `DOCKER_DRIVER` | The storage driver to use. |
| `DOCKER_RAMDISK` | If set this disables `pivot_root`. | | `DOCKER_RAMDISK` | If set this disables `pivot_root`. |
| `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the [`docker` CLI](https://docs.docker.com/engine/reference/commandline/cli/) and the `dockerd` daemon. | | `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the [`docker` CLI](https://docs.docker.com/reference/cli/docker/) and the `dockerd` daemon. |
| `DOCKER_TMPDIR` | Location for temporary files created by the daemon. | | `DOCKER_TMPDIR` | Location for temporary files created by the daemon. |
| `HTTP_PROXY` | Proxy URL for HTTP requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. | | `HTTP_PROXY` | Proxy URL for HTTP requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. |
| `HTTPS_PROXY` | Proxy URL for HTTPS requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. | | `HTTPS_PROXY` | Proxy URL for HTTPS requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. |

Some files were not shown because too many files have changed in this diff Show More