diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 51b7f3a136..6fdd9e4aea 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -5,20 +5,25 @@
/build/ @crazy-max @jedevc @dvdksn
-/compose/ @usha-mandya @aevesdocker
+/compose/ @aevesdocker
/desktop/ @aevesdocker
-/docker-hub/ @jerae-duffin @craig-osterhout
+/desktop/extensions/ @ChrisChinchilla
+
+/desktop/extensions-sdk/ @ChrisChinchilla
+
+/scout/ @ChrisChinchilla
+
+/docker-hub/ @aevesdocker @craig-osterhout
/engine/ @dvdksn
-/subscription/ @jerae-duffin
+/subscription/ @aevesdocker
-/docker-hub/publish/ @dvdksn
+/docker-hub/publish/ @ChrisChinchilla
-/docker-hub/official_images/ @dvdksn
+/docker-hub/official_images/ @ChrisChinchilla
/registry/ @dvdksn
-/atomist/ @dvdksn
diff --git a/.github/vale/Docker/Acronyms.yml b/.github/vale/Docker/Acronyms.yml
index 5dd53743ac..b81e42c7e2 100644
--- a/.github/vale/Docker/Acronyms.yml
+++ b/.github/vale/Docker/Acronyms.yml
@@ -63,3 +63,5 @@ exceptions:
- XSS
- YAML
- ZIP
+ - SBOM
+ - CVE
diff --git a/.github/vale/Docker/ComplexWords.yml b/.github/vale/Docker/ComplexWords.yml
index 7c4fb90cd3..03af01a343 100644
--- a/.github/vale/Docker/ComplexWords.yml
+++ b/.github/vale/Docker/ComplexWords.yml
@@ -63,6 +63,7 @@ swap:
facilitate: ease
females: women
finalize: complete|finish
+ illustrate: show
itemized: listed
jeopardize: risk
liaise: work with|partner with
diff --git a/.github/vale/Docker/Contractions.yml b/.github/vale/Docker/Contractions.yml
index a814a1c8e9..c378035da6 100644
--- a/.github/vale/Docker/Contractions.yml
+++ b/.github/vale/Docker/Contractions.yml
@@ -2,6 +2,8 @@ extends: substitution
message: "Consider using '%s' instead of '%s'."
level: warning
ignorecase: true
+action:
+ name: replace
swap:
are not: aren't
cannot: can't
diff --git a/.github/vale/Docker/Substitute.yml b/.github/vale/Docker/Substitute.yml
index d44f28011b..9acd2d28a4 100644
--- a/.github/vale/Docker/Substitute.yml
+++ b/.github/vale/Docker/Substitute.yml
@@ -3,6 +3,8 @@ message: "Consider using '%s' instead of '%s'"
link: https://docs.docker.com/contribute/style/recommended-words/
ignorecase: true
level: suggestion
+action:
+ name: replace
swap:
'\b(?:eg|e\.g\.)[\s,]': for example
'\b(?:ie|i\.e\.)[\s,]': that is
diff --git a/.github/vale/Vocab/Docker/accept.txt b/.github/vale/Vocab/Docker/accept.txt
index d1b0f6466b..b8658768fc 100644
--- a/.github/vale/Vocab/Docker/accept.txt
+++ b/.github/vale/Vocab/Docker/accept.txt
@@ -1,4 +1,5 @@
(Certified|Verified) Publisher( Program)?
+Docker-Sponsored Open Source
Autotest
BuildKit
Docker
diff --git a/.github/vale/Vocab/Industry/accept.txt b/.github/vale/Vocab/Industry/accept.txt
index 6c4b090737..d8c8e7c152 100644
--- a/.github/vale/Vocab/Industry/accept.txt
+++ b/.github/vale/Vocab/Industry/accept.txt
@@ -1,6 +1,7 @@
ARM
AWS
Amazon
+Ambassador
Anchore
Apple
Artifactory
@@ -9,6 +10,7 @@ BusyBox
CentOS
Ceph
CloudFront
+CNCF
Codefresh
CouchDB
Couchbase
@@ -17,6 +19,7 @@ Django
Fargate
Fedora
Flink
+Gefyra
GeoNetwork
GitHub( Actions)?
Google
@@ -54,6 +57,7 @@ Snyk
Solr
SonarQube
Syft
+Telepresence
TLS
Twilio
Ubuntu
@@ -62,5 +66,9 @@ Wasm
Windows
XWiki
Zsh
+kubefwd
+ktunnel
macOS
minikube
+sandbox
+sandboxed
\ No newline at end of file
diff --git a/.github/vale/Vocab/Technology/accept.txt b/.github/vale/Vocab/Technology/accept.txt
index 082df9686e..9d3d122a6d 100644
--- a/.github/vale/Vocab/Technology/accept.txt
+++ b/.github/vale/Vocab/Technology/accept.txt
@@ -1,4 +1,5 @@
APIs?
+CVEs?
DHCP
DNS
Ethernet
@@ -13,6 +14,7 @@ JPEG
MAC
RPM
PNG
+SARIF
SDKs?
SSO
TCP
diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml
new file mode 100644
index 0000000000..d19f236a17
--- /dev/null
+++ b/.github/workflows/merge.yml
@@ -0,0 +1,31 @@
+name: merge
+
+# open or update publishing PR when there is a push to main
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+
+jobs:
+ main-to-published:
+ runs-on: ubuntu-22.04
+ if: github.repository_owner == 'docker'
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: published
+ - name: Reset published branch
+ run: |
+ git fetch origin main:main
+ git reset --hard main
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5
+ with:
+ delete-branch: false
+ branch: published-update
+ commit-message: publish updates from main
+ labels: area/release
+ title: publish updates from main
+ body: |
+ Automated pull request for publishing docs updates.
diff --git a/.github/workflows/validate-upstream.yml b/.github/workflows/validate-upstream.yml
index cd19b6bf9e..19f70edfc0 100644
--- a/.github/workflows/validate-upstream.yml
+++ b/.github/workflows/validate-upstream.yml
@@ -16,6 +16,9 @@ on:
data-files-folder:
required: false
type: string
+ data-files-placeholder-folder:
+ required: false
+ type: string
jobs:
run:
@@ -64,7 +67,7 @@ jobs:
yq _config.yml
# cleanup js-yaml module and data files
rm -rf ./node_modules
- if [ -n "./_data/${{ inputs.data-files-folder }}" ]; then
+ if [[ -n "${{ inputs.data-files-folder }}" ]] && [[ -d "./_data/${{ inputs.data-files-folder }}" ]]; then
rm -rf ./_data/${{ inputs.data-files-folder }}/*
fi
-
@@ -73,7 +76,41 @@ jobs:
if: ${{ inputs.data-files-id != '' && inputs.data-files-folder != '' }}
with:
name: ${{ inputs.data-files-id }}
- path: ./_data/${{ inputs.data-files-folder }}
+ path: /tmp/_data/${{ inputs.data-files-folder }}
+ -
+ # Copy data files from /tmp/_data/${{ inputs.data-files-folder }} to
+ # _data/${{ inputs.data-files-folder }}. If data-files-placeholder-folder
+ # is set, then check if a placeholder file exists for each data file in
+ # that folder. If not, then creates a placeholder file with the same
+ # name as the data file, but with a .md extension.
+ name: Copy data files
+ if: ${{ inputs.data-files-id != '' && inputs.data-files-folder != '' }}
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const fs = require('fs');
+ const path = require('path');
+ const dataFilesPlaceholderFolder = `${{ inputs.data-files-placeholder-folder }}`;
+ const globber = await glob.create(`/tmp/_data/${{ inputs.data-files-folder }}/*.yaml`);
+ for await (const yamlSrcPath of globber.globGenerator()) {
+ const yamlSrcFilename = path.basename(yamlSrcPath);
+ const yamlDestPath = path.join('_data', `${{ inputs.data-files-folder }}`, yamlSrcFilename);
+ const placeholderPath = path.join(dataFilesPlaceholderFolder, yamlSrcFilename.replace(/^docker_/, '').replace(/\.yaml$/, '.md'));
+ if (dataFilesPlaceholderFolder !== '' && !fs.existsSync(placeholderPath)) {
+ const placeholderContent = `---
+ datafolder: ${{ inputs.data-files-folder }}
+ datafile: ${yamlSrcFilename.replace(/\.[^/.]+$/, '')}
+ title: ${yamlSrcFilename.replace(/\.[^/.]+$/, "").replaceAll('_', ' ')}
+ ---
+ {% include cli.md datafolder=page.datafolder datafile=page.datafile %}`;
+ await core.group(`creating ${placeholderPath}`, async () => {
+ core.info(placeholderContent);
+ });
+ await fs.writeFileSync(placeholderPath, placeholderContent);
+ }
+ core.info(`${yamlSrcPath} => ${yamlDestPath}`);
+ await fs.copyFileSync(yamlSrcPath, yamlDestPath);
+ }
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
diff --git a/Gemfile.lock b/Gemfile.lock
index 6bdce6a01a..3d6ebe40f2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -70,18 +70,16 @@ GEM
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
mercenary (0.4.0)
- mini_portile2 (2.8.0)
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
mixlib-shellout (3.2.7)
chef-utils
- nokogiri (1.13.10)
- mini_portile2 (~> 2.8.0)
+ nokogiri (1.14.3-aarch64-linux)
racc (~> 1.4)
- nokogiri (1.13.10-aarch64-linux)
+ nokogiri (1.14.3-arm-linux)
racc (~> 1.4)
- nokogiri (1.13.10-x86_64-linux)
+ nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
octopress-hooks (2.6.2)
jekyll (>= 2.0)
@@ -89,7 +87,7 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.1)
- racc (1.6.1)
+ racc (1.6.2)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.2)
diff --git a/README.md b/README.md
index a40ddb43c7..4470f80777 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ an existing issue. If possible, we recommend that you suggest a fix to the issue
by creating a pull request.
You can ask general questions and get community support through the [Docker
-Community Slack](http://dockr.ly/slack). Personalized support is available
+Community Slack](https://dockr.ly/comm-slack). Personalized support is available
through the Docker Pro, Team, and Business subscriptions. See [Docker
Pricing](https://www.docker.com/pricing) for details.
@@ -30,11 +30,15 @@ repository.
We've made it really easy for you to file new issues.
-- Click **New issue** on the docs repository and fill in the details, or
+- Click **[New issue](https://github.com/docker/docs/issues/new)** on the docs repository and fill in the details, or
- Click **Request docs changes** in the right column of every page on
- docs.docker.com and add the details.
+ [docs.docker.com](https://docs.docker.com/) and add the details, or
-
+ 
+
+- Click the **Give feedback** link on the side of every page in the docs.
+
+ 
## Contribute to Docker docs
@@ -45,4 +49,4 @@ contribute, see our [Contribute section](https://docs.docker.com/contribute/over
## Copyright and license
-Copyright 2013-2023 Docker, inc, released under the Apache 2.0 license.
+Copyright 2013-2023 Docker, inc, released under the Apache 2.0 license .
diff --git a/_config.yml b/_config.yml
index e96dbac572..cbbd0472bc 100644
--- a/_config.yml
+++ b/_config.yml
@@ -42,10 +42,10 @@ exclude:
# Component versions -- address like site.docker_ce_version
# You can't have - characters in these for non-YAML reasons.
# When updating 'latest_engine_api_version', also update 'min_api_threshold' below.
-latest_engine_api_version: "1.41"
-docker_ce_version: "20.10"
+latest_engine_api_version: "1.42"
+docker_ce_version: "23.0.0"
compose_v1_version: "1.29.2"
-compose_version: "v2.15.1"
+compose_version: "v2.17.2"
compose_file_v3: "3.9"
compose_file_v2: "2.4"
machine_version: "0.16.0"
@@ -153,7 +153,7 @@ defaults:
fetch-remote:
- repo: "https://github.com/docker/cli"
default_branch: "master"
- ref: "20.10"
+ ref: "23.0"
paths:
- dest: "engine/extend"
src:
@@ -171,12 +171,7 @@ fetch-remote:
- repo: "https://github.com/docker/docker"
default_branch: "master"
- # The default branch has separate files for each API version, so we can
- # consume the swagger files from that branch (we only publish the ones
- # that have been released through the stubs in the engine/api/ directory).
- # Using the default (master) branch allows for API docs changes to be
- # published without them being cherry-picked into the release branch.
- ref: "master"
+ ref: "23.0"
paths:
- dest: "engine/api"
src:
@@ -220,3 +215,50 @@ fetch-remote:
- dest: "build/attestations/attestation-storage.md"
src:
- "docs/attestations/attestation-storage.md"
+
+ - repo: "https://github.com/compose-spec/compose-spec"
+ default_branch: "master"
+ ref: "master"
+ paths:
+ - dest: "compose/compose-file/01-status.md"
+ src:
+ - "01-status.md"
+ - dest: "compose/compose-file/02-model.md"
+ src:
+ - "02-model.md"
+ - dest: "compose/compose-file/03-compose-file.md"
+ src:
+ - "03-compose-file.md"
+ - dest: "compose/compose-file/04-version-and-name.md"
+ src:
+ - "04-version-and-name.md"
+ - dest: "compose/compose-file/05-services.md"
+ src:
+ - "05-services.md"
+ - dest: "compose/compose-file/06-networks.md"
+ src:
+ - "06-networks.md"
+ - dest: "compose/compose-file/07-volumes.md"
+ src:
+ - "07-volumes.md"
+ - dest: "compose/compose-file/08-configs.md"
+ src:
+ - "08-configs.md"
+ - dest: "compose/compose-file/09-secrets.md"
+ src:
+ - "09-secrets.md"
+ - dest: "compose/compose-file/10-fragments.md"
+ src:
+ - "10-fragments.md"
+ - dest: "compose/compose-file/11-extension.md"
+ src:
+ - "11-extension.md"
+ - dest: "compose/compose-file/12-interpolation.md"
+ src:
+ - "12-interpolation.md"
+ - dest: "compose/compose-file/build.md"
+ src:
+ - "build.md"
+ - dest: "compose/compose-file/deploy.md"
+ src:
+ - "deploy.md"
diff --git a/_data/buildx/docker_buildx_bake.yaml b/_data/buildx/docker_buildx_bake.yaml
index 08a265e6c6..584f974df4 100644
--- a/_data/buildx/docker_buildx_bake.yaml
+++ b/_data/buildx/docker_buildx_bake.yaml
@@ -5,7 +5,7 @@ long: |-
Bake is a high-level build command. Each specified target will run in parallel
as part of the build.
- Read [High-level build options with Bake](/build/customize/bake/)
+ Read [High-level build options with Bake](/build/bake/)
guide for introduction to writing bake files.
> **Note**
@@ -85,6 +85,7 @@ options:
- option: provenance
value_type: string
description: Shorthand for `--set=*.attest=type=provenance`
+ details_url: '#provenance'
deprecated: false
hidden: false
experimental: false
@@ -115,6 +116,7 @@ options:
- option: sbom
value_type: string
description: Shorthand for `--set=*.attest=type=sbom`
+ details_url: '#sbom'
deprecated: false
hidden: false
experimental: false
@@ -184,7 +186,7 @@ examples: |-
$ docker buildx bake -f docker-bake.dev.hcl db webapp-release
```
- See our [file definition](/build/customize/bake/file-definition/)
+ See our [file definition](/build/bake/file-definition/)
guide for more details.
### Do not use cache when building the image (--no-cache) {#no-cache}
@@ -222,10 +224,18 @@ examples: |-
Same as [`build --progress`](buildx_build.md#progress).
+ ### Create provenance attestations (--provenance) {#provenance}
+
+ Same as [`build --provenance`](buildx_build.md#provenance).
+
### Always attempt to pull a newer version of the image (--pull) {#pull}
Same as `build --pull`.
+ ### Create SBOM attestations (--sbom) {#sbom}
+
+ Same as [`build --sbom`](buildx_build.md#sbom).
+
### Override target configurations from command line (--set) {#set}
```
diff --git a/_data/buildx/docker_buildx_build.yaml b/_data/buildx/docker_buildx_build.yaml
index 1807b494bb..a813ee1743 100644
--- a/_data/buildx/docker_buildx_build.yaml
+++ b/_data/buildx/docker_buildx_build.yaml
@@ -39,6 +39,7 @@ options:
value_type: stringArray
default_value: '[]'
description: 'Attestation parameters (format: `type=sbom,generator=image`)'
+ details_url: '#attest'
deprecated: false
hidden: false
experimental: false
@@ -337,6 +338,7 @@ options:
- option: provenance
value_type: string
description: Shortand for `--attest=type=provenance`
+ details_url: '#provenance'
deprecated: false
hidden: false
experimental: false
@@ -388,6 +390,7 @@ options:
- option: sbom
value_type: string
description: Shorthand for `--attest=type=sbom`
+ details_url: '#sbom'
deprecated: false
hidden: false
experimental: false
@@ -494,6 +497,33 @@ inherited_options:
kubernetes: false
swarm: false
examples: |-
+ ### Create attestations (--attest) {#attest}
+
+ ```
+ --attest=type=sbom,...
+ --attest=type=provenance,...
+ ```
+
+ Create [image attestations](/build/attestations/).
+ BuildKit currently supports:
+
+ - `sbom` - Software Bill of Materials.
+
+ Use `--attest=type=sbom` to generate an SBOM for an image at build-time.
+ Alternatively, you can use the [`--sbom` shorthand](#sbom).
+
+ For more information, see [here](/build/attestations/sbom/).
+
+ - `provenance` - SLSA Provenance
+
+ Use `--attest=type=provenance` to generate provenance for an image at
+ build-time. Alternatively, you can use the [`--provenance` shorthand](#provenance).
+
+ By default, a minimal provenance attestation will be created for the build
+ result, which will only be attached for images pushed to registries.
+
+ For more information, see [here](/build/attestations/slsa-provenance/).
+
### Allow extra privileged entitlement (--allow) {#allow}
```
@@ -815,8 +845,13 @@ examples: |-
Set the target platform for the build. All `FROM` commands inside the Dockerfile
without their own `--platform` flag will pull base images for this platform and
- this value will also be the platform of the resulting image. The default value
- will be the current platform of the buildkit daemon.
+ this value will also be the platform of the resulting image.
+
+ The default value is the platform of the BuildKit daemon where the build runs.
+ The value takes the form of `os/arch` or `os/arch/variant`. For example,
+ `linux/amd64` or `linux/arm/v7`. Additionally, the `--platform` flag also supports
+ a special `local` value, which tells BuildKit to use the platform of the BuildKit
+ client that invokes the build.
When using `docker-container` driver with `buildx`, this flag can accept multiple
values as an input separated by a comma. With multiple values the result will be
@@ -879,11 +914,41 @@ examples: |-
> Check also our [Color output controls guide](https://github.com/docker/buildx/blob/master/docs/guides/color-output.md)
> for modifying the colors that are used to output information to the terminal.
+ ### Create provenance attestations (--provenance) {#provenance}
+
+ Shorthand for [`--attest=type=provenance`](#attest), used to configure
+ provenance attestations for the build result. For example,
+ `--provenance=mode=max` can be used as an abbreviation for
+ `--attest=type=provenance,mode=max`.
+
+ Additionally, `--provenance` can be used with boolean values to broadly enable
+ or disable provenance attestations. For example, `--provenance=false` can be
+ used to disable all provenance attestations, while `--provenance=true` can be
+ used to enable all provenance attestations.
+
+ By default, a minimal provenance attestation will be created for the build
+ result, which will only be attached for images pushed to registries.
+
+ For more information, see [here](/build/attestations/slsa-provenance/).
+
### Push the build result to a registry (--push) {#push}
Shorthand for [`--output=type=registry`](#registry). Will automatically push the
build result to registry.
+ ### Create SBOM attestations (--sbom) {#sbom}
+
+ Shorthand for [`--attest=type=sbom`](#attest), used to configure SBOM
+ attestations for the build result. For example,
+ `--sbom=generator=/` can be used as an abbreviation for
+ `--attest=type=sbom,generator=/`.
+
+ Additionally, `--sbom` can be used with boolean values to broadly enable or
+ disable SBOM attestations. For example, `--sbom=false` can be used to disable
+ all SBOM attestations.
+
+ For more information, see [here](/build/attestations/sbom/).
+
### Secret to expose to the build (--secret) {#secret}
```
diff --git a/_data/compose-cli/docker_compose.yaml b/_data/compose-cli/docker_compose.yaml
index 9709ef880b..16b3d3fd9d 100644
--- a/_data/compose-cli/docker_compose.yaml
+++ b/_data/compose-cli/docker_compose.yaml
@@ -63,12 +63,19 @@ long: |-
### Use `-p` to specify a project name
- Each configuration has a project name. If you supply a `-p` flag, you can specify a project name. If you don’t
- specify the flag, Compose uses the current directory name.
- Project name can also be set by `COMPOSE_PROJECT_NAME` environment variable.
-
- Many Compose subcommands can be run without a Compose file by passing
- the project name.
+ Each configuration has a project name. Compose sets the project name using
+ the following mechanisms, in order of precedence:
+ - The `-p` command line flag
+ - The `COMPOSE_PROJECT_NAME` environment variable
+ - The top level `name:` variable from the config file (or the last `name:`
+ from a series of config files specified using `-f`)
+ - The `basename` of the project directory containing the config file (or
+ containing the first config file specified using `-f`)
+ - The `basename` of the current directory if no config file is specified
+ Project names must contain only lowercase letters, decimal digits, dashes,
+ and underscores, and must begin with a lowercase letter or decimal digit. If
+ the `basename` of the project directory or current directory violates this
+ constraint, you must use one of the other mechanisms.
```console
$ docker compose -p my_project ps -a
@@ -89,13 +96,22 @@ long: |-
Profiles can also be set by `COMPOSE_PROFILES` environment variable.
+ ### Configuring parallelism
+
+ Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls.
+ Calling `docker compose --parallel 1 pull` will pull the pullable images defined in the Compose file
+ one at a time. This can also be used to control build concurrency.
+
+ Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable.
+
### Set up environment variables
You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags.
Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag,
`COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag,
- and `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag.
+ `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag
+ and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag.
If flags are explicitly set on the command line, the associated environment variable is ignored.
@@ -106,7 +122,7 @@ pname: docker
plink: docker.yaml
cname:
- docker compose build
- - docker compose convert
+ - docker compose config
- docker compose cp
- docker compose create
- docker compose down
@@ -132,7 +148,7 @@ cname:
- docker compose version
clink:
- docker_compose_build.yaml
- - docker_compose_convert.yaml
+ - docker_compose_config.yaml
- docker_compose_cp.yaml
- docker_compose_create.yaml
- docker_compose_down.yaml
@@ -178,8 +194,19 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
+ - option: dry-run
+ value_type: bool
+ default_value: "false"
+ description: Execute command in dry run mode
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
- option: env-file
- value_type: string
+ value_type: stringArray
+ default_value: '[]'
description: Specify an alternate environment file.
deprecated: false
hidden: false
diff --git a/_data/compose-cli/docker_compose_alpha.yaml b/_data/compose-cli/docker_compose_alpha.yaml
new file mode 100644
index 0000000000..a8a83b6e74
--- /dev/null
+++ b/_data/compose-cli/docker_compose_alpha.yaml
@@ -0,0 +1,17 @@
+command: docker compose alpha
+short: Experimental commands
+long: Experimental commands
+pname: docker compose
+plink: docker_compose.yaml
+cname:
+ - docker compose alpha dry-run
+ - docker compose alpha watch
+clink:
+ - docker_compose_alpha_dry-run.yaml
+ - docker_compose_alpha_watch.yaml
+deprecated: false
+experimental: false
+experimentalcli: true
+kubernetes: false
+swarm: false
+
diff --git a/_data/compose-cli/docker_compose_alpha_dry-run.yaml b/_data/compose-cli/docker_compose_alpha_dry-run.yaml
new file mode 100644
index 0000000000..d489d39aeb
--- /dev/null
+++ b/_data/compose-cli/docker_compose_alpha_dry-run.yaml
@@ -0,0 +1,14 @@
+command: docker compose alpha dry-run
+short: |
+ EXPERIMENTAL - Dry run command allow you to test a command without applying changes
+long: |
+ EXPERIMENTAL - Dry run command allow you to test a command without applying changes
+usage: docker compose alpha dry-run -- [COMMAND...]
+pname: docker compose alpha
+plink: docker_compose_alpha.yaml
+deprecated: false
+experimental: false
+experimentalcli: true
+kubernetes: false
+swarm: false
+
diff --git a/_data/compose-cli/docker_compose_alpha_watch.yaml b/_data/compose-cli/docker_compose_alpha_watch.yaml
new file mode 100644
index 0000000000..1aa5d9d2ee
--- /dev/null
+++ b/_data/compose-cli/docker_compose_alpha_watch.yaml
@@ -0,0 +1,25 @@
+command: docker compose alpha watch
+short: |
+ EXPERIMENTAL - Watch build context for service and rebuild/refresh containers when files are updated
+long: |
+ EXPERIMENTAL - Watch build context for service and rebuild/refresh containers when files are updated
+usage: docker compose alpha watch [SERVICE...]
+pname: docker compose alpha
+plink: docker_compose_alpha.yaml
+options:
+ - option: quiet
+ value_type: bool
+ default_value: "false"
+ description: hide build output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+deprecated: false
+experimental: false
+experimentalcli: true
+kubernetes: false
+swarm: false
+
diff --git a/_data/compose-cli/docker_compose_build.yaml b/_data/compose-cli/docker_compose_build.yaml
index efb0149b17..11049c99e3 100644
--- a/_data/compose-cli/docker_compose_build.yaml
+++ b/_data/compose-cli/docker_compose_build.yaml
@@ -106,6 +106,16 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
+ - option: push
+ value_type: bool
+ default_value: "false"
+ description: Push service images.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
- option: quiet
shorthand: q
value_type: bool
diff --git a/_data/compose-cli/docker_compose_config.yaml b/_data/compose-cli/docker_compose_config.yaml
new file mode 100644
index 0000000000..d05425e401
--- /dev/null
+++ b/_data/compose-cli/docker_compose_config.yaml
@@ -0,0 +1,138 @@
+command: docker compose config
+aliases: docker compose config, docker compose convert
+short: Parse, resolve and render compose file in canonical format
+long: |-
+ `docker compose config` renders the actual data model to be applied on the Docker engine.
+ it merges the Compose files set by `-f` flags, resolves variables in the Compose file, and expands short-notation into
+ the canonical format.
+usage: docker compose config [OPTIONS] [SERVICE...]
+pname: docker compose
+plink: docker_compose.yaml
+options:
+ - option: format
+ value_type: string
+ default_value: yaml
+ description: 'Format the output. Values: [yaml | json]'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: hash
+ value_type: string
+ description: Print the service config hash, one per line.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: images
+ value_type: bool
+ default_value: "false"
+ description: Print the image names, one per line.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-consistency
+ value_type: bool
+ default_value: "false"
+ description: |
+ Don't check model consistency - warning: may produce invalid Compose output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-interpolate
+ value_type: bool
+ default_value: "false"
+ description: Don't interpolate environment variables.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-normalize
+ value_type: bool
+ default_value: "false"
+ description: Don't normalize compose model.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: output
+ shorthand: o
+ value_type: string
+ description: Save to file (default to stdout)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: profiles
+ value_type: bool
+ default_value: "false"
+ description: Print the profile names, one per line.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only validate the configuration, don't print anything.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: resolve-image-digests
+ value_type: bool
+ default_value: "false"
+ description: Pin image tags to digests.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: services
+ value_type: bool
+ default_value: "false"
+ description: Print the service names, one per line.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volumes
+ value_type: bool
+ default_value: "false"
+ description: Print the volume names, one per line.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+deprecated: false
+experimental: false
+experimentalcli: false
+kubernetes: false
+swarm: false
+
diff --git a/_data/compose-cli/docker_compose_create.yaml b/_data/compose-cli/docker_compose_create.yaml
index 814c5cc394..1dfa25e376 100644
--- a/_data/compose-cli/docker_compose_create.yaml
+++ b/_data/compose-cli/docker_compose_create.yaml
@@ -57,6 +57,27 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
+ - option: remove-orphans
+ value_type: bool
+ default_value: "false"
+ description: Remove containers for services not defined in the Compose file.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: scale
+ value_type: stringArray
+ default_value: '[]'
+ description: |
+ Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/compose-cli/docker_compose_logs.yaml b/_data/compose-cli/docker_compose_logs.yaml
index c9afcc8129..f0163c02c3 100644
--- a/_data/compose-cli/docker_compose_logs.yaml
+++ b/_data/compose-cli/docker_compose_logs.yaml
@@ -47,6 +47,7 @@ options:
kubernetes: false
swarm: false
- option: tail
+ shorthand: "n"
value_type: string
default_value: all
description: |
diff --git a/_data/compose-cli/docker_compose_ps.yaml b/_data/compose-cli/docker_compose_ps.yaml
index 6325f285a1..d19346d18e 100644
--- a/_data/compose-cli/docker_compose_ps.yaml
+++ b/_data/compose-cli/docker_compose_ps.yaml
@@ -2,13 +2,20 @@ command: docker compose ps
short: List containers
long: |-
Lists containers for a Compose project, with current status and exposed ports.
- By default, both running and stopped containers are shown:
```console
$ docker compose ps
- NAME COMMAND SERVICE STATUS PORTS
- example-bar-1 "/docker-entrypoint.…" bar exited (0)
- example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
+ example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
+ ```
+
+ By default, only running containers are shown. `--all` flag can be used to include stopped containers
+
+ ```console
+ $ docker compose ps --all
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
+ example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
+ example-bar-1 alpine "/entrypoint.…" bar 4 seconds ago exited (0)
```
usage: docker compose ps [OPTIONS] [SERVICE...]
pname: docker compose
@@ -139,12 +146,12 @@ examples: |-
```console
$ docker compose ps --status=running
- NAME COMMAND SERVICE STATUS PORTS
- example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
+ example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
$ docker compose ps --status=exited
- NAME COMMAND SERVICE STATUS PORTS
- example-bar-1 "/docker-entrypoint.…" bar exited (0)
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
+ example-bar-1 alpine "/entrypoint.…" bar 4 seconds ago exited (0)
```
### Filter containers by status (--filter) {#filter}
@@ -155,12 +162,8 @@ examples: |-
```console
$ docker compose ps --filter status=running
- NAME COMMAND SERVICE STATUS PORTS
- example-foo-1 "/docker-entrypoint.…" foo running 0.0.0.0:8080->80/tcp
-
- $ docker compose ps --filter status=running
- NAME COMMAND SERVICE STATUS PORTS
- example-bar-1 "/docker-entrypoint.…" bar exited (0)
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
+ example-foo-1 alpine "/entrypoint.…" foo 4 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp
```
The `docker compose ps` command currently only supports the `--filter status=`
diff --git a/_data/compose-cli/docker_compose_restart.yaml b/_data/compose-cli/docker_compose_restart.yaml
index ea6c2628b8..91ba742e84 100644
--- a/_data/compose-cli/docker_compose_restart.yaml
+++ b/_data/compose-cli/docker_compose_restart.yaml
@@ -15,6 +15,16 @@ usage: docker compose restart [OPTIONS] [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:
+ - option: no-deps
+ value_type: bool
+ default_value: "false"
+ description: Don't restart dependent services.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
- option: timeout
shorthand: t
value_type: int
diff --git a/_data/compose-cli/docker_compose_run.yaml b/_data/compose-cli/docker_compose_run.yaml
index 9d5715f4ea..97066f123f 100644
--- a/_data/compose-cli/docker_compose_run.yaml
+++ b/_data/compose-cli/docker_compose_run.yaml
@@ -172,6 +172,16 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
+ - option: remove-orphans
+ value_type: bool
+ default_value: "false"
+ description: Remove containers for services not defined in the Compose file.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
- option: rm
value_type: bool
default_value: "false"
diff --git a/_data/compose-cli/docker_compose_up.yaml b/_data/compose-cli/docker_compose_up.yaml
index f8ab468e7b..fb3dcb98cc 100644
--- a/_data/compose-cli/docker_compose_up.yaml
+++ b/_data/compose-cli/docker_compose_up.yaml
@@ -231,18 +231,6 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- - option: timeout
- shorthand: t
- value_type: int
- default_value: "10"
- description: |
- Use this timeout in seconds for container shutdown when attached or when containers are already running.
- deprecated: false
- hidden: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- option: timestamps
value_type: bool
default_value: "false"
@@ -263,6 +251,28 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
+ - option: wait-timeout
+ value_type: int
+ default_value: "0"
+ description: timeout waiting for application to be running|healthy.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: waitTimeout
+ shorthand: t
+ value_type: int
+ default_value: "10"
+ description: |
+ Use this waitTimeout in seconds for container shutdown when attached or when containers are already running.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/docker-app/docker_app.yaml b/_data/docker-app/docker_app.yaml
deleted file mode 100644
index 95cf64a731..0000000000
--- a/_data/docker-app/docker_app.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-command: docker app
-short: Docker Application
-long: A tool to build and manage Docker Applications.
-pname: docker
-plink: docker.yaml
-cname:
-- docker app bundle
-- docker app completion
-- docker app init
-- docker app inspect
-- docker app install
-- docker app list
-- docker app pull
-- docker app push
-- docker app render
-- docker app status
-- docker app uninstall
-- docker app upgrade
-- docker app validate
-- docker app version
-clink:
-- docker_app_bundle.yaml
-- docker_app_completion.yaml
-- docker_app_init.yaml
-- docker_app_inspect.yaml
-- docker_app_install.yaml
-- docker_app_list.yaml
-- docker_app_pull.yaml
-- docker_app_push.yaml
-- docker_app_render.yaml
-- docker_app_status.yaml
-- docker_app_uninstall.yaml
-- docker_app_upgrade.yaml
-- docker_app_validate.yaml
-- docker_app_version.yaml
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
diff --git a/_data/docker-app/docker_app_bundle.yaml b/_data/docker-app/docker_app_bundle.yaml
deleted file mode 100644
index 87123ebdf2..0000000000
--- a/_data/docker-app/docker_app_bundle.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-command: docker app bundle
-short: Create a CNAB invocation image and `bundle.json` for the application
-long: Create a CNAB invocation image and `bundle.json` for the application
-usage: docker app bundle [APP_NAME] [--output OUTPUT_FILE]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: output
- shorthand: o
- value_type: string
- default_value: bundle.json
- description: Output file (- for stdout)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app bundle myapp.dockerapp
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_completion.yaml b/_data/docker-app/docker_app_completion.yaml
deleted file mode 100644
index be9d9b2a24..0000000000
--- a/_data/docker-app/docker_app_completion.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-command: docker app completion
-short: Generates completion scripts for the specified shell (bash or zsh)
-long: |
- # Load the "docker app" completion code for bash into the current shell
- . <(docker app completion bash)
- # Set the "docker app" completion code for bash to autoload on startup in your ~/.bashrc,
- # ~/.profile or ~/.bash_profile
- . <(docker app completion bash)
- # Note: bash-completion is needed.
-
- # Load the "docker app" completion code for zsh into the current shell
- source <(docker app completion zsh)
- # Set the "docker app" completion code for zsh to autoload on startup in your ~/.zshrc,
- source <(docker app completion zsh)
-usage: docker app completion SHELL
-pname: docker app
-plink: docker_app.yaml
-examples: $ . <(docker app completion bash)
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_init.yaml b/_data/docker-app/docker_app_init.yaml
deleted file mode 100644
index 4b68cc703f..0000000000
--- a/_data/docker-app/docker_app_init.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-command: docker app init
-short: Initialize Docker Application definition
-long: Start building a Docker Application package. If there is a docker-compose.yml
- file in the current directory it will be copied and used.
-usage: docker app init APP_NAME [--compose-file COMPOSE_FILE] [--description DESCRIPTION]
- [--maintainer NAME:EMAIL ...] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: compose-file
- value_type: string
- description: Compose file to use as application base (optional)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: description
- value_type: string
- description: Human readable description of your application (optional)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: maintainer
- value_type: stringArray
- default_value: '[]'
- description: |
- Name and email address of person responsible for the application (name:email) (optional)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: single-file
- value_type: bool
- default_value: "false"
- description: Create a single-file Docker Application definition
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app init myapp --description "a useful description"
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_inspect.yaml b/_data/docker-app/docker_app_inspect.yaml
deleted file mode 100644
index 406cad17c7..0000000000
--- a/_data/docker-app/docker_app_inspect.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-command: docker app inspect
-short: Shows metadata, parameters and a summary of the Compose file for a given application
-long: Shows metadata, parameters and a summary of the Compose file for a given application
-usage: docker app inspect [APP_NAME] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: parameters-file
- value_type: stringArray
- default_value: '[]'
- description: Override parameters file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Pull the bundle
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: set
- shorthand: s
- value_type: stringArray
- default_value: '[]'
- description: Override parameter value
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app inspect myapp.dockerapp
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_install.yaml b/_data/docker-app/docker_app_install.yaml
deleted file mode 100644
index 8862d54393..0000000000
--- a/_data/docker-app/docker_app_install.yaml
+++ /dev/null
@@ -1,115 +0,0 @@
-command: docker app install
-aliases: deploy
-short: Install an application
-long: |-
- Install an application.
- By default, the application definition in the current directory will be
- installed. The APP_NAME can also be:
- - a path to a Docker Application definition (.dockerapp) or a CNAB bundle.json
- - a registry Application Package reference
-usage: docker app install [APP_NAME] [--name INSTALLATION_NAME] [--target-context
- TARGET_CONTEXT] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: credential-set
- value_type: stringArray
- default_value: '[]'
- description: |
- Use a YAML file containing a credential set or a credential set present in the credential store
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kubernetes-namespace
- value_type: string
- default_value: default
- description: Kubernetes namespace to install into
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: name
- value_type: string
- description: Installation name (defaults to application name)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: orchestrator
- value_type: string
- description: Orchestrator to install on (swarm, kubernetes)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: parameters-file
- value_type: stringArray
- default_value: '[]'
- description: Override parameters file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Pull the bundle
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: set
- shorthand: s
- value_type: stringArray
- default_value: '[]'
- description: Override parameter value
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target-context
- value_type: string
- description: |
- Context on which the application is installed (default: )
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: with-registry-auth
- value_type: bool
- default_value: "false"
- description: Sends registry auth
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: |-
- $ docker app install myapp.dockerapp --name myinstallation --target-context=mycontext
- $ docker app install myrepo/myapp:mytag --name myinstallation --target-context=mycontext
- $ docker app install bundle.json --name myinstallation --credential-set=mycredentials.yml
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_list.yaml b/_data/docker-app/docker_app_list.yaml
deleted file mode 100644
index b88ac9d0a5..0000000000
--- a/_data/docker-app/docker_app_list.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-command: docker app list
-aliases: ls
-short: List the installations and their last known installation result
-long: List the installations and their last known installation result
-usage: docker app list [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: target-context
- value_type: string
- description: List installations on this context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_pull.yaml b/_data/docker-app/docker_app_pull.yaml
deleted file mode 100644
index a9131af832..0000000000
--- a/_data/docker-app/docker_app_pull.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-command: docker app pull
-short: Pull an application package from a registry
-long: Pull an application package from a registry
-usage: docker app pull NAME:TAG [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app pull docker/app-example:0.1.0
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_push.yaml b/_data/docker-app/docker_app_push.yaml
deleted file mode 100644
index e7b0ca69ae..0000000000
--- a/_data/docker-app/docker_app_push.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-command: docker app push
-short: Push an application package to a registry
-long: Push an application package to a registry
-usage: docker app push [APP_NAME] --tag TARGET_REFERENCE [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: stringSlice
- default_value: '[]'
- description: |
- For multi-arch service images, only push the specified platforms
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tag
- shorthand: t
- value_type: string
- description: |
- Target registry reference (default: : from metadata)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app push myapp --tag myrepo/myapp:mytag
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_render.yaml b/_data/docker-app/docker_app_render.yaml
deleted file mode 100644
index f895b6c065..0000000000
--- a/_data/docker-app/docker_app_render.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
-command: docker app render
-short: Render the Compose file for an Application Package
-long: Render the Compose file for an Application Package
-usage: docker app render [APP_NAME] [--set KEY=VALUE ...] [--parameters-file PARAMETERS-FILE
- ...] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: formatter
- value_type: string
- default_value: yaml
- description: Configure the output format (yaml|json)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: output
- shorthand: o
- value_type: string
- default_value: '-'
- description: Output file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: parameters-file
- value_type: stringArray
- default_value: '[]'
- description: Override parameters file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Pull the bundle
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: set
- shorthand: s
- value_type: stringArray
- default_value: '[]'
- description: Override parameter value
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app render myapp.dockerapp --set key=value
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_status.yaml b/_data/docker-app/docker_app_status.yaml
deleted file mode 100644
index f18a7c6c7e..0000000000
--- a/_data/docker-app/docker_app_status.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-command: docker app status
-short: Get the installation status of an application
-long: Get the installation status of an application. If the installation is a Docker
- Application, the status shows the stack services.
-usage: docker app status INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: credential-set
- value_type: stringArray
- default_value: '[]'
- description: |
- Use a YAML file containing a credential set or a credential set present in the credential store
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target-context
- value_type: string
- description: |
- Context on which the application is installed (default: )
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: with-registry-auth
- value_type: bool
- default_value: "false"
- description: Sends registry auth
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app status myinstallation --target-context=mycontext
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_uninstall.yaml b/_data/docker-app/docker_app_uninstall.yaml
deleted file mode 100644
index 230df867b3..0000000000
--- a/_data/docker-app/docker_app_uninstall.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-command: docker app uninstall
-short: Uninstall an application
-long: Uninstall an application
-usage: docker app uninstall INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: credential-set
- value_type: stringArray
- default_value: '[]'
- description: |
- Use a YAML file containing a credential set or a credential set present in the credential store
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force
- value_type: bool
- default_value: "false"
- description: Force removal of installation
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target-context
- value_type: string
- description: |
- Context on which the application is installed (default: )
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: with-registry-auth
- value_type: bool
- default_value: "false"
- description: Sends registry auth
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app uninstall myinstallation --target-context=mycontext
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_upgrade.yaml b/_data/docker-app/docker_app_upgrade.yaml
deleted file mode 100644
index 13b4b83ee6..0000000000
--- a/_data/docker-app/docker_app_upgrade.yaml
+++ /dev/null
@@ -1,88 +0,0 @@
-command: docker app upgrade
-short: Upgrade an installed application
-long: Upgrade an installed application
-usage: docker app upgrade INSTALLATION_NAME [--target-context TARGET_CONTEXT] [OPTIONS]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: app-name
- value_type: string
- description: Override the installation with another Application Package
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: credential-set
- value_type: stringArray
- default_value: '[]'
- description: |
- Use a YAML file containing a credential set or a credential set present in the credential store
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: insecure-registries
- value_type: stringSlice
- default_value: '[]'
- description: |
- Use HTTP instead of HTTPS when pulling from/pushing to those registries
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: parameters-file
- value_type: stringArray
- default_value: '[]'
- description: Override parameters file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Pull the bundle
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: set
- shorthand: s
- value_type: stringArray
- default_value: '[]'
- description: Override parameter value
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target-context
- value_type: string
- description: |
- Context on which the application is installed (default: )
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: with-registry-auth
- value_type: bool
- default_value: "false"
- description: Sends registry auth
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: $ docker app upgrade myinstallation --target-context=mycontext --set key=value
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_validate.yaml b/_data/docker-app/docker_app_validate.yaml
deleted file mode 100644
index 4845676593..0000000000
--- a/_data/docker-app/docker_app_validate.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-command: docker app validate
-short: Checks the rendered application is syntactically correct
-long: Checks the rendered application is syntactically correct
-usage: docker app validate [APP_NAME] [--set KEY=VALUE ...] [--parameters-file PARAMETERS_FILE]
-pname: docker app
-plink: docker_app.yaml
-options:
-- option: parameters-file
- value_type: stringArray
- default_value: '[]'
- description: Override parameters file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: set
- shorthand: s
- value_type: stringArray
- default_value: '[]'
- description: Override parameter value
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/docker-app/docker_app_version.yaml b/_data/docker-app/docker_app_version.yaml
deleted file mode 100644
index 860f75d77b..0000000000
--- a/_data/docker-app/docker_app_version.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-command: docker app version
-short: Print version information
-long: Print version information
-usage: docker app version
-pname: docker app
-plink: docker_app.yaml
-deprecated: true
-experimental: false
-experimentalcli: false
-kubernetes: false
-swarm: false
-
diff --git a/_data/engine-cli/docker.yaml b/_data/engine-cli/docker.yaml
index dbd4b6b7db..12008d56d5 100644
--- a/_data/engine-cli/docker.yaml
+++ b/_data/engine-cli/docker.yaml
@@ -2,121 +2,235 @@ command: docker
short: The base command for the Docker CLI.
long: The base command for the Docker CLI.
cname:
-- docker attach
-- docker build
-- docker builder
-- docker checkpoint
-- docker commit
-- docker config
-- docker container
-- docker context
-- docker cp
-- docker create
-- docker diff
-- docker events
-- docker exec
-- docker export
-- docker history
-- docker image
-- docker images
-- docker import
-- docker info
-- docker inspect
-- docker kill
-- docker load
-- docker login
-- docker logout
-- docker logs
-- docker manifest
-- docker network
-- docker node
-- docker pause
-- docker plugin
-- docker port
-- docker ps
-- docker pull
-- docker push
-- docker rename
-- docker restart
-- docker rm
-- docker rmi
-- docker run
-- docker save
-- docker search
-- docker secret
-- docker service
-- docker stack
-- docker start
-- docker stats
-- docker stop
-- docker swarm
-- docker system
-- docker tag
-- docker top
-- docker trust
-- docker unpause
-- docker update
-- docker version
-- docker volume
-- docker wait
+ - docker attach
+ - docker build
+ - docker builder
+ - docker checkpoint
+ - docker commit
+ - docker config
+ - docker container
+ - docker context
+ - docker cp
+ - docker create
+ - docker diff
+ - docker events
+ - docker exec
+ - docker export
+ - docker history
+ - docker image
+ - docker images
+ - docker import
+ - docker info
+ - docker inspect
+ - docker kill
+ - docker load
+ - docker login
+ - docker logout
+ - docker logs
+ - docker manifest
+ - docker network
+ - docker node
+ - docker pause
+ - docker plugin
+ - docker port
+ - docker ps
+ - docker pull
+ - docker push
+ - docker rename
+ - docker restart
+ - docker rm
+ - docker rmi
+ - docker run
+ - docker save
+ - docker search
+ - docker secret
+ - docker service
+ - docker stack
+ - docker start
+ - docker stats
+ - docker stop
+ - docker swarm
+ - docker system
+ - docker tag
+ - docker top
+ - docker trust
+ - docker unpause
+ - docker update
+ - docker version
+ - docker volume
+ - docker wait
clink:
-- docker_attach.yaml
-- docker_build.yaml
-- docker_builder.yaml
-- docker_checkpoint.yaml
-- docker_commit.yaml
-- docker_config.yaml
-- docker_container.yaml
-- docker_context.yaml
-- docker_cp.yaml
-- docker_create.yaml
-- docker_diff.yaml
-- docker_events.yaml
-- docker_exec.yaml
-- docker_export.yaml
-- docker_history.yaml
-- docker_image.yaml
-- docker_images.yaml
-- docker_import.yaml
-- docker_info.yaml
-- docker_inspect.yaml
-- docker_kill.yaml
-- docker_load.yaml
-- docker_login.yaml
-- docker_logout.yaml
-- docker_logs.yaml
-- docker_manifest.yaml
-- docker_network.yaml
-- docker_node.yaml
-- docker_pause.yaml
-- docker_plugin.yaml
-- docker_port.yaml
-- docker_ps.yaml
-- docker_pull.yaml
-- docker_push.yaml
-- docker_rename.yaml
-- docker_restart.yaml
-- docker_rm.yaml
-- docker_rmi.yaml
-- docker_run.yaml
-- docker_save.yaml
-- docker_search.yaml
-- docker_secret.yaml
-- docker_service.yaml
-- docker_stack.yaml
-- docker_start.yaml
-- docker_stats.yaml
-- docker_stop.yaml
-- docker_swarm.yaml
-- docker_system.yaml
-- docker_tag.yaml
-- docker_top.yaml
-- docker_trust.yaml
-- docker_unpause.yaml
-- docker_update.yaml
-- docker_version.yaml
-- docker_volume.yaml
-- docker_wait.yaml
+ - docker_attach.yaml
+ - docker_build.yaml
+ - docker_builder.yaml
+ - docker_checkpoint.yaml
+ - docker_commit.yaml
+ - docker_config.yaml
+ - docker_container.yaml
+ - docker_context.yaml
+ - docker_cp.yaml
+ - docker_create.yaml
+ - docker_diff.yaml
+ - docker_events.yaml
+ - docker_exec.yaml
+ - docker_export.yaml
+ - docker_history.yaml
+ - docker_image.yaml
+ - docker_images.yaml
+ - docker_import.yaml
+ - docker_info.yaml
+ - docker_inspect.yaml
+ - docker_kill.yaml
+ - docker_load.yaml
+ - docker_login.yaml
+ - docker_logout.yaml
+ - docker_logs.yaml
+ - docker_manifest.yaml
+ - docker_network.yaml
+ - docker_node.yaml
+ - docker_pause.yaml
+ - docker_plugin.yaml
+ - docker_port.yaml
+ - docker_ps.yaml
+ - docker_pull.yaml
+ - docker_push.yaml
+ - docker_rename.yaml
+ - docker_restart.yaml
+ - docker_rm.yaml
+ - docker_rmi.yaml
+ - docker_run.yaml
+ - docker_save.yaml
+ - docker_search.yaml
+ - docker_secret.yaml
+ - docker_service.yaml
+ - docker_stack.yaml
+ - docker_start.yaml
+ - docker_stats.yaml
+ - docker_stop.yaml
+ - docker_swarm.yaml
+ - docker_system.yaml
+ - docker_tag.yaml
+ - docker_top.yaml
+ - docker_trust.yaml
+ - docker_unpause.yaml
+ - docker_update.yaml
+ - docker_version.yaml
+ - docker_volume.yaml
+ - docker_wait.yaml
+options:
+ - option: config
+ value_type: string
+ default_value: /root/.docker
+ description: Location of client config files
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: context
+ shorthand: c
+ value_type: string
+ description: |
+ Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: debug
+ shorthand: D
+ value_type: bool
+ default_value: "false"
+ description: Enable debug mode
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: host
+ shorthand: H
+ value_type: list
+ description: Daemon socket(s) to connect to
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-level
+ shorthand: l
+ value_type: string
+ default_value: info
+ description: Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tls
+ value_type: bool
+ default_value: "false"
+ description: Use TLS; implied by --tlsverify
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tlscacert
+ value_type: string
+ default_value: /root/.docker/ca.pem
+ description: Trust certs signed only by this CA
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tlscert
+ value_type: string
+ default_value: /root/.docker/cert.pem
+ description: Path to TLS certificate file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tlskey
+ value_type: string
+ default_value: /root/.docker/key.pem
+ description: Path to TLS key file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tlsverify
+ value_type: bool
+ default_value: "false"
+ description: Use TLS and verify the remote
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_attach.yaml b/_data/engine-cli/docker_attach.yaml
index e29783a11f..ef581befac 100644
--- a/_data/engine-cli/docker_attach.yaml
+++ b/_data/engine-cli/docker_attach.yaml
@@ -1,182 +1,198 @@
command: docker attach
-short: Attach local standard input, output, and error streams to a running container
+aliases: docker container attach, docker attach
+short: |
+ Attach local standard input, output, and error streams to a running container
long: |-
- Use `docker attach` to attach your terminal's standard input, output, and error
- (or any combination of the three) to a running container using the container's
- ID or name. This allows you to view its ongoing output or to control it
- interactively, as though the commands were running directly in your terminal.
+ Use `docker attach` to attach your terminal's standard input, output, and error
+ (or any combination of the three) to a running container using the container's
+ ID or name. This allows you to view its ongoing output or to control it
+ interactively, as though the commands were running directly in your terminal.
- > **Note:**
- > The `attach` command will display the output of the `ENTRYPOINT/CMD` process. This
- > can appear as if the attach command is hung when in fact the process may simply
- > not be interacting with the terminal at that time.
+ > **Note:**
+ > The `attach` command will display the output of the `ENTRYPOINT/CMD` process. This
+ > can appear as if the attach command is hung when in fact the process may simply
+ > not be interacting with the terminal at that time.
- You can attach to the same contained process multiple times simultaneously,
- from different sessions on the Docker host.
+ You can attach to the same contained process multiple times simultaneously,
+ from different sessions on the Docker host.
- To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
- container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
- the container. If the container was run with `-i` and `-t`, you can detach from
- a container and leave it running using the `CTRL-p CTRL-q` key sequence.
+ To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
+ container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
+ the container. If the container was run with `-i` and `-t`, you can detach from
+ a container and leave it running using the `CTRL-p CTRL-q` key sequence.
- > **Note:**
- > A process running as PID 1 inside a container is treated specially by
- > Linux: it ignores any signal with the default action. So, the process
- > will not terminate on `SIGINT` or `SIGTERM` unless it is coded to do
- > so.
+ > **Note:**
+ > A process running as PID 1 inside a container is treated specially by
+ > Linux: it ignores any signal with the default action. So, the process
+ > will not terminate on `SIGINT` or `SIGTERM` unless it is coded to do
+ > so.
- It is forbidden to redirect the standard input of a `docker attach` command
- while attaching to a TTY-enabled container (using the `-i` and `-t` options).
+ It is forbidden to redirect the standard input of a `docker attach` command
+ while attaching to a TTY-enabled container (using the `-i` and `-t` options).
- While a client is connected to container's `stdio` using `docker attach`, Docker
- uses a ~1MB memory buffer to maximize the throughput of the application.
- Once this buffer is full, the speed of the API connection is affected, and so
- this impacts the output process' writing speed. This is similar to other
- applications like SSH. Because of this, it is not recommended to run
- performance critical applications that generate a lot of output in the
- foreground over a slow client connection. Instead, users should use the
- `docker logs` command to get access to the logs.
+ While a client is connected to container's `stdio` using `docker attach`, Docker
+ uses a ~1MB memory buffer to maximize the throughput of the application.
+ Once this buffer is full, the speed of the API connection is affected, and so
+ this impacts the output process' writing speed. This is similar to other
+ applications like SSH. Because of this, it is not recommended to run
+ performance critical applications that generate a lot of output in the
+ foreground over a slow client connection. Instead, users should use the
+ `docker logs` command to get access to the logs.
- ### Override the detach sequence
+ ### Override the detach sequence
- If you want, you can configure an override the Docker key sequence for detach.
- This is useful if the Docker default sequence conflicts with key sequence you
- use for other applications. There are two ways to define your own detach key
- sequence, as a per-container override or as a configuration property on your
- entire configuration.
+ If you want, you can configure an override the Docker key sequence for detach.
+ This is useful if the Docker default sequence conflicts with key sequence you
+ use for other applications. There are two ways to define your own detach key
+ sequence, as a per-container override or as a configuration property on your
+ entire configuration.
- To override the sequence for an individual container, use the
- `--detach-keys=""` flag with the `docker attach` command. The format of
- the `` is either a letter [a-Z], or the `ctrl-` combined with any of
- the following:
+ To override the sequence for an individual container, use the
+ `--detach-keys=""` flag with the `docker attach` command. The format of
+ the `` is 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)
+ * `a-z` (a single lowercase alpha character )
+ * `@` (at sign)
+ * `[` (left bracket)
+ * `\\` (two backward slashes)
+ * `_` (underscore)
+ * `^` (caret)
- 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
- containers, see [**Configuration file** section](cli.md#configuration-files).
+ 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
+ containers, see [**Configuration file** section](cli.md#configuration-files).
usage: docker attach [OPTIONS] CONTAINER
pname: docker
plink: docker.yaml
options:
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-stdin
- value_type: bool
- default_value: "false"
- description: Do not attach STDIN
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sig-proxy
- value_type: bool
- default_value: "true"
- description: Proxy all received signals to the process
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-stdin
+ value_type: bool
+ default_value: "false"
+ description: Do not attach STDIN
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sig-proxy
+ value_type: bool
+ default_value: "true"
+ description: Proxy all received signals to the process
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Attach to and detach from a running container
+ ### Attach to and detach from a running container
- The following example starts an ubuntu container running `top` in detached mode,
- then attaches to the container;
+ The following example starts an ubuntu container running `top` in detached mode,
+ then attaches to the container;
- ```console
- $ docker run -d --name topdemo ubuntu:22.04 /usr/bin/top -b
+ ```console
+ $ docker run -d --name topdemo ubuntu:22.04 /usr/bin/top -b
- $ docker attach topdemo
+ $ docker attach topdemo
- top - 12:27:44 up 3 days, 21:54, 0 users, load average: 0.00, 0.00, 0.00
- Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
- %Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
- MiB Mem : 3934.3 total, 770.1 free, 674.2 used, 2490.1 buff/cache
- MiB Swap: 1024.0 total, 839.3 free, 184.7 used. 2814.0 avail Mem
+ top - 12:27:44 up 3 days, 21:54, 0 users, load average: 0.00, 0.00, 0.00
+ Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
+ %Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
+ MiB Mem : 3934.3 total, 770.1 free, 674.2 used, 2490.1 buff/cache
+ MiB Swap: 1024.0 total, 839.3 free, 184.7 used. 2814.0 avail Mem
- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 1 root 20 0 7180 2896 2568 R 0.0 0.1 0:00.02 top
- ```
+ PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
+ 1 root 20 0 7180 2896 2568 R 0.0 0.1 0:00.02 top
+ ```
- As the container was started without the `-i`, and `-t` options, signals are
- forwarded to the attached process, which means that the default `CTRL-p CTRL-q`
- detach key sequence produces no effect, but pressing `CTRL-c` terminates the
- container:
+ As the container was started without the `-i`, and `-t` options, signals are
+ forwarded to the attached process, which means that the default `CTRL-p CTRL-q`
+ detach key sequence produces no effect, but pressing `CTRL-c` terminates the
+ container:
- ```console
- <...>
- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 1 root 20 0 7180 2896 2568 R 0.0 0.1 0:00.02 top^P^Q
- ^C
+ ```console
+ <...>
+ PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
+ 1 root 20 0 7180 2896 2568 R 0.0 0.1 0:00.02 top^P^Q
+ ^C
- $ docker ps -a --filter name=topdemo
+ $ docker ps -a --filter name=topdemo
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 4cf0d0ebb079 ubuntu:22.04 "/usr/bin/top -b" About a minute ago Exited (0) About a minute ago topdemo
- ```
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ 4cf0d0ebb079 ubuntu:22.04 "/usr/bin/top -b" About a minute ago Exited (0) About a minute ago topdemo
+ ```
- Repeating the example above, but this time with the `-i` and `-t` options set;
+ Repeating the example above, but this time with the `-i` and `-t` options set;
- ```console
- $ docker run -dit --name topdemo2 ubuntu:22.04 /usr/bin/top -b
- ```
+ ```console
+ $ docker run -dit --name topdemo2 ubuntu:22.04 /usr/bin/top -b
+ ```
- Now, when attaching to the container, and pressing the `CTRL-p CTRL-q` ("read
- escape sequence"), the Docker CLI is handling the detach sequence, and the
- `attach` command is detached from the container. Checking the container's status
- with `docker ps` shows that the container is still running in the background:
+ Now, when attaching to the container, and pressing the `CTRL-p CTRL-q` ("read
+ escape sequence"), the Docker CLI is handling the detach sequence, and the
+ `attach` command is detached from the container. Checking the container's status
+ with `docker ps` shows that the container is still running in the background:
- ```console
- $ docker attach topdemo2
+ ```console
+ $ docker attach topdemo2
- top - 12:44:32 up 3 days, 22:11, 0 users, load average: 0.00, 0.00, 0.00
- Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
- %Cpu(s): 50.0 us, 0.0 sy, 0.0 ni, 50.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
- MiB Mem : 3934.3 total, 770.6 free, 672.4 used, 2491.4 buff/cache
- MiB Swap: 1024.0 total, 839.3 free, 184.7 used. 2815.8 avail Mem
+ top - 12:44:32 up 3 days, 22:11, 0 users, load average: 0.00, 0.00, 0.00
+ Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
+ %Cpu(s): 50.0 us, 0.0 sy, 0.0 ni, 50.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
+ MiB Mem : 3934.3 total, 770.6 free, 672.4 used, 2491.4 buff/cache
+ MiB Swap: 1024.0 total, 839.3 free, 184.7 used. 2815.8 avail Mem
- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 1 root 20 0 7180 2776 2452 R 0.0 0.1 0:00.02 topread escape sequence
+ PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
+ 1 root 20 0 7180 2776 2452 R 0.0 0.1 0:00.02 topread escape sequence
- $ docker ps -a --filter name=topdemo2
+ $ docker ps -a --filter name=topdemo2
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- b1661dce0fc2 ubuntu:22.04 "/usr/bin/top -b" 2 minutes ago Up 2 minutes topdemo2
- ```
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ b1661dce0fc2 ubuntu:22.04 "/usr/bin/top -b" 2 minutes ago Up 2 minutes topdemo2
+ ```
- ### Get the exit code of the container's command
+ ### Get the exit code of the container's command
- And in this second example, you can see the exit code returned by the `bash`
- process is returned by the `docker attach` command to its caller too:
+ And in this second example, you can see the exit code returned by the `bash`
+ process is returned by the `docker attach` command to its caller too:
- ```console
- $ docker run --name test -dit alpine
- 275c44472aebd77c926d4527885bb09f2f6db21d878c75f0a1c212c03d3bcfab
+ ```console
+ $ docker run --name test -dit alpine
+ 275c44472aebd77c926d4527885bb09f2f6db21d878c75f0a1c212c03d3bcfab
- $ docker attach test
- /# exit 13
+ $ docker attach test
+ /# exit 13
- $ echo $?
- 13
+ $ echo $?
+ 13
- $ docker ps -a --filter name=test
+ $ docker ps -a --filter name=test
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- a2fe3fd886db alpine "/bin/sh" About a minute ago Exited (13) 40 seconds ago test
- ```
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ a2fe3fd886db alpine "/bin/sh" About a minute ago Exited (13) 40 seconds ago test
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_build.yaml b/_data/engine-cli/docker_build.yaml
index 43b6891f15..db54cf12ff 100644
--- a/_data/engine-cli/docker_build.yaml
+++ b/_data/engine-cli/docker_build.yaml
@@ -1,1017 +1,1011 @@
command: docker build
+aliases: docker image build, docker build, docker buildx build, docker builder build
short: Build an image from a Dockerfile
long: |-
- The `docker build` command builds Docker images from a Dockerfile and a
- "context". A build's context is the set of files located in the specified
- `PATH` or `URL`. The build process can refer to any of the files in the
- context. For example, your build can use a [*COPY*](../builder.md#copy)
- instruction to reference a file in the context.
+ The `docker build` command builds Docker images from a Dockerfile and a
+ "context". A build's context is the set of files located in the specified
+ `PATH` or `URL`. The build process can refer to any of the files in the
+ context. For example, your build can use a [*COPY*](/engine/reference/builder/#copy)
+ instruction to reference a file in the context.
- The `URL` parameter can refer to three kinds of resources: Git repositories,
- pre-packaged tarball contexts and plain text files.
+ The `URL` parameter can refer to three kinds of resources: Git repositories,
+ pre-packaged tarball contexts and plain text files.
- ### Git repositories
+ ### Git repositories
- When the `URL` parameter points to the location of a Git repository, the
- repository acts as the build context. The system recursively fetches the
- repository and its submodules. The commit history is not preserved. A
- repository is first pulled into a temporary directory on your local host. After
- that succeeds, the directory is sent to the Docker daemon as the context.
- Local copy gives you the ability to access private repositories using local
- user credentials, VPN's, and so forth.
+ When the `URL` parameter points to the location of a Git repository, the
+ repository acts as the build context. The system recursively fetches the
+ repository and its submodules. The commit history is not preserved. A
+ repository is first pulled into a temporary directory on your local host. After
+ that succeeds, the directory is sent to the Docker daemon as the context.
+ Local copy gives you the ability to access private repositories using local
+ user credentials, VPN's, and so forth.
- > **Note**
- >
- > If the `URL` parameter contains a fragment the system will recursively clone
- > the repository and its submodules using a `git clone --recursive` command.
+ > **Note**
+ >
+ > If the `URL` parameter contains a fragment the system will recursively clone
+ > the repository and its submodules using a `git clone --recursive` command.
- Git URLs accept context configuration in their fragment section, separated by a
- colon (`:`). The first part represents the reference that Git will check out,
- and can be either a branch, a tag, or a remote reference. The second part
- represents a subdirectory inside the repository that will be used as a build
- context.
+ Git URLs accept context configuration in their fragment section, separated by a
+ colon (`:`). The first part represents the reference that Git will check out,
+ and can be either a branch, a tag, or a remote reference. The second part
+ represents a subdirectory inside the repository that will be used as a build
+ context.
- For example, run this command to use a directory called `docker` in the branch
- `container`:
+ For example, run this command to use a directory called `docker` in the branch
+ `container`:
- ```console
- $ docker build https://github.com/docker/rootfs.git#container:docker
- ```
+ ```console
+ $ docker build https://github.com/docker/rootfs.git#container:docker
+ ```
- The following table represents all the valid suffixes with their build
- contexts:
+ The following table represents all the valid suffixes with their build
+ contexts:
- | Build Syntax Suffix | Commit Used | Build Context Used |
- |--------------------------------|-----------------------|--------------------|
- | `myrepo.git` | `refs/heads/master` | `/` |
- | `myrepo.git#mytag` | `refs/tags/mytag` | `/` |
- | `myrepo.git#mybranch` | `refs/heads/mybranch` | `/` |
- | `myrepo.git#pull/42/head` | `refs/pull/42/head` | `/` |
- | `myrepo.git#:myfolder` | `refs/heads/master` | `/myfolder` |
- | `myrepo.git#master:myfolder` | `refs/heads/master` | `/myfolder` |
- | `myrepo.git#mytag:myfolder` | `refs/tags/mytag` | `/myfolder` |
- | `myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder` |
+ | Build Syntax Suffix | Commit Used | Build Context Used |
+ |--------------------------------|-----------------------|--------------------|
+ | `myrepo.git` | `refs/heads/master` | `/` |
+ | `myrepo.git#mytag` | `refs/tags/mytag` | `/` |
+ | `myrepo.git#mybranch` | `refs/heads/mybranch` | `/` |
+ | `myrepo.git#pull/42/head` | `refs/pull/42/head` | `/` |
+ | `myrepo.git#:myfolder` | `refs/heads/master` | `/myfolder` |
+ | `myrepo.git#master:myfolder` | `refs/heads/master` | `/myfolder` |
+ | `myrepo.git#mytag:myfolder` | `refs/tags/mytag` | `/myfolder` |
+ | `myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder` |
- > **Note**
- >
- > You cannot specify the build-context directory (`myfolder` in the examples above)
- > when using BuildKit as builder (`DOCKER_BUILDKIT=1`). Support for this feature
- > is tracked in [buildkit#1684](https://github.com/moby/buildkit/issues/1684).
+ ### Tarball contexts
- ### Tarball contexts
+ If you pass an URL to a remote tarball, the URL itself is sent to the daemon:
- If you pass an URL to a remote tarball, the URL itself is sent to the daemon:
+ ```console
+ $ docker build http://server/context.tar.gz
+ ```
- ```console
- $ docker build http://server/context.tar.gz
- ```
+ The download operation will be performed on the host the Docker daemon is
+ running on, which is not necessarily the same host from which the build command
+ is being issued. The Docker daemon will fetch `context.tar.gz` and use it as the
+ build context. Tarball contexts must be tar archives conforming to the standard
+ `tar` UNIX format and can be compressed with any one of the 'xz', 'bzip2',
+ 'gzip' or 'identity' (no compression) formats.
- The download operation will be performed on the host the Docker daemon is
- running on, which is not necessarily the same host from which the build command
- is being issued. The Docker daemon will fetch `context.tar.gz` and use it as the
- build context. Tarball contexts must be tar archives conforming to the standard
- `tar` UNIX format and can be compressed with any one of the 'xz', 'bzip2',
- 'gzip' or 'identity' (no compression) formats.
+ ### Text files
- ### Text files
+ Instead of specifying a context, you can pass a single `Dockerfile` in the
+ `URL` or pipe the file in via `STDIN`. To pipe a `Dockerfile` from `STDIN`:
- Instead of specifying a context, you can pass a single `Dockerfile` in the
- `URL` or pipe the file in via `STDIN`. To pipe a `Dockerfile` from `STDIN`:
+ ```console
+ $ docker build - < Dockerfile
+ ```
- ```console
- $ docker build - < Dockerfile
- ```
+ With Powershell on Windows, you can run:
- With Powershell on Windows, you can run:
+ ```powershell
+ Get-Content Dockerfile | docker build -
+ ```
- ```powershell
- Get-Content Dockerfile | docker build -
- ```
+ If you use `STDIN` or specify a `URL` pointing to a plain text file, the system
+ places the contents into a file called `Dockerfile`, and any `-f`, `--file`
+ option is ignored. In this scenario, there is no context.
- If you use `STDIN` or specify a `URL` pointing to a plain text file, the system
- places the contents into a file called `Dockerfile`, and any `-f`, `--file`
- option is ignored. In this scenario, there is no context.
+ By default the `docker build` command will look for a `Dockerfile` at the root
+ of the build context. The `-f`, `--file`, option lets you specify the path to
+ an alternative file to use instead. This is useful in cases where the same set
+ of files are used for multiple builds. The path must be to a file within the
+ build context. If a relative path is specified then it is interpreted as
+ relative to the root of the context.
- By default the `docker build` command will look for a `Dockerfile` at the root
- of the build context. The `-f`, `--file`, option lets you specify the path to
- an alternative file to use instead. This is useful in cases where the same set
- of files are used for multiple builds. The path must be to a file within the
- build context. If a relative path is specified then it is interpreted as
- relative to the root of the context.
+ In most cases, it's best to put each Dockerfile in an empty directory. Then,
+ add to that directory only the files needed for building the Dockerfile. To
+ increase the build's performance, you can exclude files and directories by
+ adding a `.dockerignore` file to that directory as well. For information on
+ creating one, see the [.dockerignore file](/engine/reference/builder/#dockerignore-file).
- In most cases, it's best to put each Dockerfile in an empty directory. Then,
- add to that directory only the files needed for building the Dockerfile. To
- increase the build's performance, you can exclude files and directories by
- adding a `.dockerignore` file to that directory as well. For information on
- creating one, see the [.dockerignore file](../builder.md#dockerignore-file).
-
- If the Docker client loses connection to the daemon, the build is canceled.
- This happens if you interrupt the Docker client with `CTRL-c` or if the Docker
- client is killed for any reason. If the build initiated a pull which is still
- running at the time the build is cancelled, the pull is cancelled as well.
+ If the Docker client loses connection to the daemon, the build is canceled.
+ This happens if you interrupt the Docker client with `CTRL-c` or if the Docker
+ client is killed for any reason. If the build initiated a pull which is still
+ running at the time the build is cancelled, the pull is cancelled as well.
usage: docker build [OPTIONS] PATH | URL | -
pname: docker
plink: docker.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: build-arg
- value_type: list
- description: Set build-time variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cache-from
- value_type: stringSlice
- default_value: '[]'
- description: Images to consider as cache sources
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: compress
- value_type: bool
- default_value: "false"
- description: Compress the build context using gzip
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: file
- shorthand: f
- value_type: string
- description: Name of the Dockerfile (Default is 'PATH/Dockerfile')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force-rm
- value_type: bool
- default_value: "false"
- description: Always remove intermediate containers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: iidfile
- value_type: string
- description: Write the image ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- value_type: list
- description: Set metadata for an image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: string
- default_value: default
- description: |
- Set the networking mode for the RUN instructions during build
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-cache
- value_type: bool
- default_value: "false"
- description: Do not use cache when building the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: output
- shorthand: o
- value_type: stringArray
- default_value: '[]'
- description: 'Output destination (format: type=local,dest=path)'
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.38"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: progress
- value_type: string
- default_value: auto
- description: |
- Set type of progress output (auto, plain, tty). Use plain to show container output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Always attempt to pull a newer version of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress the build output and print image ID on success
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "true"
- description: Remove intermediate containers after a successful build
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: secret
- value_type: stringArray
- default_value: '[]'
- description: |
- Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: stringSlice
- default_value: '[]'
- description: Security options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: squash
- value_type: bool
- default_value: "false"
- description: Squash newly built layers into a single new layer
- deprecated: false
- min_api_version: "1.25"
- experimental: true
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ssh
- value_type: stringArray
- default_value: '[]'
- description: |
- SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|[=|[,]])
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stream
- value_type: bool
- default_value: "false"
- description: Stream attaches to server to negotiate build context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tag
- shorthand: t
- value_type: list
- description: Name and optionally a tag in the 'name:tag' format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target
- value_type: string
- description: Set the target build stage to build.
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (`host:ip`)
+ details_url: '#add-host'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: build-arg
+ value_type: list
+ description: Set build-time variables
+ details_url: '#build-arg'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cache-from
+ value_type: stringSlice
+ default_value: '[]'
+ description: Images to consider as cache sources
+ details_url: '#cache-from'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ details_url: '#cgroup-parent'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: compress
+ value_type: bool
+ default_value: "false"
+ description: Compress the build context using gzip
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: file
+ shorthand: f
+ value_type: string
+ description: Name of the Dockerfile (Default is `PATH/Dockerfile`)
+ details_url: '#file'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force-rm
+ value_type: bool
+ default_value: "false"
+ description: Always remove intermediate containers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: iidfile
+ value_type: string
+ description: Write the image ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ details_url: '#isolation'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ value_type: list
+ description: Set metadata for an image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: string
+ default_value: default
+ description: Set the networking mode for the RUN instructions during build
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-cache
+ value_type: bool
+ default_value: "false"
+ description: Do not use cache when building the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.38"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: bool
+ default_value: "false"
+ description: Always attempt to pull a newer version of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the build output and print image ID on success
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "true"
+ description: Remove intermediate containers after a successful build
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: stringSlice
+ default_value: '[]'
+ description: Security options
+ details_url: '#security-opt'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of `/dev/shm`
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: squash
+ value_type: bool
+ default_value: "false"
+ description: Squash newly built layers into a single new layer
+ details_url: '#squash'
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: true
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tag
+ shorthand: t
+ value_type: list
+ description: Name and optionally a tag in the `name:tag` format
+ details_url: '#tag'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: target
+ value_type: string
+ description: Set the target build stage to build.
+ details_url: '#target'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ details_url: '#ulimit'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Build with PATH
-
- ```console
- $ docker build .
-
- Uploading context 10240 bytes
- Step 1/3 : FROM busybox
- Pulling repository busybox
- ---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/
- Step 2/3 : RUN ls -lh /
- ---> Running in 9c9e81692ae9
- total 24
- drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin
- drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev
- drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc
- drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib
- lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib
- dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc
- lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin
- dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys
- drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp
- drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr
- ---> b35f4035db3f
- Step 3/3 : CMD echo Hello world
- ---> Running in 02071fceb21b
- ---> f52f38b7823e
- Successfully built f52f38b7823e
- Removing intermediate container 9c9e81692ae9
- Removing intermediate container 02071fceb21b
- ```
-
- This example specifies that the `PATH` is `.`, and so all the files in the
- local directory get `tar`d and sent to the Docker daemon. The `PATH` specifies
- where to find the files for the "context" of the build on the Docker daemon.
- Remember that the daemon could be running on a remote machine and that no
- parsing of the Dockerfile happens at the client side (where you're running
- `docker build`). That means that *all* the files at `PATH` get sent, not just
- the ones listed to [*ADD*](../builder.md#add) in the Dockerfile.
-
- The transfer of context from the local machine to the Docker daemon is what the
- `docker` client means when you see the "Sending build context" message.
-
- If you wish to keep the intermediate containers after the build is complete,
- you must use `--rm=false`. This does not affect the build cache.
-
- ### Build with URL
-
- ```console
- $ docker build github.com/creack/docker-firefox
- ```
-
- This will clone the GitHub repository and use the cloned repository as context.
- The Dockerfile at the root of the repository is used as Dockerfile. You can
- specify an arbitrary Git repository by using the `git://` or `git@` scheme.
-
- ```console
- $ docker build -f ctx/Dockerfile http://server/ctx.tar.gz
-
- Downloading context: http://server/ctx.tar.gz [===================>] 240 B/240 B
- Step 1/3 : FROM busybox
- ---> 8c2e06607696
- Step 2/3 : ADD ctx/container.cfg /
- ---> e7829950cee3
- Removing intermediate container b35224abf821
- Step 3/3 : CMD /bin/ls
- ---> Running in fbc63d321d73
- ---> 3286931702ad
- Removing intermediate container fbc63d321d73
- Successfully built 377c409b35e4
- ```
-
- This sends the URL `http://server/ctx.tar.gz` to the Docker daemon, which
- downloads and extracts the referenced tarball. The `-f ctx/Dockerfile`
- parameter specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used
- to build the image. Any `ADD` commands in that `Dockerfile` that refers to local
- paths must be relative to the root of the contents inside `ctx.tar.gz`. In the
- example above, the tarball contains a directory `ctx/`, so the `ADD
- ctx/container.cfg /` operation works as expected.
-
- ### Build with -
-
- ```console
- $ docker build - < Dockerfile
- ```
-
- This will read a Dockerfile from `STDIN` without context. Due to the lack of a
- context, no contents of any local directory will be sent to the Docker daemon.
- Since there is no context, a Dockerfile `ADD` only works if it refers to a
- remote URL.
-
- ```console
- $ docker build - < context.tar.gz
- ```
-
- This will build an image for a compressed context read from `STDIN`. Supported
- formats are: bzip2, gzip and xz.
-
- ### Use a .dockerignore file
-
- ```console
- $ docker build .
-
- Uploading context 18.829 MB
- Uploading context
- Step 1/2 : FROM busybox
- ---> 769b9341d937
- Step 2/2 : CMD echo Hello world
- ---> Using cache
- ---> 99cc1ad10469
- Successfully built 99cc1ad10469
- $ echo ".git" > .dockerignore
- $ docker build .
- Uploading context 6.76 MB
- Uploading context
- Step 1/2 : FROM busybox
- ---> 769b9341d937
- Step 2/2 : CMD echo Hello world
- ---> Using cache
- ---> 99cc1ad10469
- Successfully built 99cc1ad10469
- ```
-
- This example shows the use of the `.dockerignore` file to exclude the `.git`
- directory from the context. Its effect can be seen in the changed size of the
- uploaded context. The builder reference contains detailed information on
- [creating a .dockerignore file](../builder.md#dockerignore-file).
-
- When using the [BuildKit backend](https://docs.docker.com/build/buildkit/),
- `docker build` searches for a `.dockerignore` file relative to the Dockerfile
- name. For example, running `docker build -f myapp.Dockerfile .` will first look
- for an ignore file named `myapp.Dockerfile.dockerignore`. If such a file is not
- found, the `.dockerignore` file is used if present. Using a Dockerfile based
- `.dockerignore` is useful if a project contains multiple Dockerfiles that
- expect to ignore different sets of files.
-
-
- ### Tag an image (-t, --tag)
-
- ```console
- $ docker build -t vieux/apache:2.0 .
- ```
-
- This will build like the previous example, but it will then tag the resulting
- image. The repository name will be `vieux/apache` and the tag will be `2.0`.
- [Read more about valid tags](tag.md).
-
- You can apply multiple tags to an image. For example, you can apply the `latest`
- tag to a newly built image and add another tag that references a specific
- version.
- For example, to tag an image both as `whenry/fedora-jboss:latest` and
- `whenry/fedora-jboss:v2.1`, use the following:
-
- ```console
- $ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
- ```
-
- ### Specify a Dockerfile (-f, --file)
-
- ```console
- $ docker build -f Dockerfile.debug .
- ```
-
- This will use a file called `Dockerfile.debug` for the build instructions
- instead of `Dockerfile`.
-
- ```console
- $ curl example.com/remote/Dockerfile | docker build -f - .
- ```
-
- The above command will use the current directory as the build context and read
- a Dockerfile from stdin.
-
- ```console
- $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
- $ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod .
- ```
-
- The above commands will build the current build context (as specified by the
- `.`) twice, once using a debug version of a `Dockerfile` and once using a
- production version.
+ ### Build with PATH
+
+ ```console
+ $ docker build .
+
+ Uploading context 10240 bytes
+ Step 1/3 : FROM busybox
+ Pulling repository busybox
+ ---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/
+ Step 2/3 : RUN ls -lh /
+ ---> Running in 9c9e81692ae9
+ total 24
+ drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin
+ drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev
+ drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc
+ drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib
+ lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib
+ dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc
+ lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin
+ dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys
+ drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp
+ drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr
+ ---> b35f4035db3f
+ Step 3/3 : CMD echo Hello world
+ ---> Running in 02071fceb21b
+ ---> f52f38b7823e
+ Successfully built f52f38b7823e
+ Removing intermediate container 9c9e81692ae9
+ Removing intermediate container 02071fceb21b
+ ```
+
+ This example specifies that the `PATH` is `.`, and so all the files in the
+ local directory get `tar`d and sent to the Docker daemon. The `PATH` specifies
+ where to find the files for the "context" of the build on the Docker daemon.
+ Remember that the daemon could be running on a remote machine and that no
+ parsing of the Dockerfile happens at the client side (where you're running
+ `docker build`). That means that *all* the files at `PATH` get sent, not just
+ the ones listed to [*ADD*](/engine/reference/builder/#add)
+ in the Dockerfile.
+
+ The transfer of context from the local machine to the Docker daemon is what the
+ `docker` client means when you see the "Sending build context" message.
+
+ If you wish to keep the intermediate containers after the build is complete,
+ you must use `--rm=false`. This does not affect the build cache.
+
+ ### Build with URL
+
+ ```console
+ $ docker build github.com/creack/docker-firefox
+ ```
+
+ This will clone the GitHub repository and use the cloned repository as context.
+ The Dockerfile at the root of the repository is used as Dockerfile. You can
+ specify an arbitrary Git repository by using the `git://` or `git@` scheme.
+
+ ```console
+ $ docker build -f ctx/Dockerfile http://server/ctx.tar.gz
+
+ Downloading context: http://server/ctx.tar.gz [===================>] 240 B/240 B
+ Step 1/3 : FROM busybox
+ ---> 8c2e06607696
+ Step 2/3 : ADD ctx/container.cfg /
+ ---> e7829950cee3
+ Removing intermediate container b35224abf821
+ Step 3/3 : CMD /bin/ls
+ ---> Running in fbc63d321d73
+ ---> 3286931702ad
+ Removing intermediate container fbc63d321d73
+ Successfully built 377c409b35e4
+ ```
+
+ This sends the URL `http://server/ctx.tar.gz` to the Docker daemon, which
+ downloads and extracts the referenced tarball. The `-f ctx/Dockerfile`
+ parameter specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used
+ to build the image. Any `ADD` commands in that `Dockerfile` that refers to local
+ paths must be relative to the root of the contents inside `ctx.tar.gz`. In the
+ example above, the tarball contains a directory `ctx/`, so the `ADD
+ ctx/container.cfg /` operation works as expected.
+
+ ### Build with -
+
+ ```console
+ $ docker build - < Dockerfile
+ ```
+
+ This will read a Dockerfile from `STDIN` without context. Due to the lack of a
+ context, no contents of any local directory will be sent to the Docker daemon.
+ Since there is no context, a Dockerfile `ADD` only works if it refers to a
+ remote URL.
+
+ ```console
+ $ docker build - < context.tar.gz
+ ```
+
+ This will build an image for a compressed context read from `STDIN`. Supported
+ formats are: bzip2, gzip and xz.
+
+ ### Use a .dockerignore file
+
+ ```console
+ $ docker build .
+
+ Uploading context 18.829 MB
+ Uploading context
+ Step 1/2 : FROM busybox
+ ---> 769b9341d937
+ Step 2/2 : CMD echo Hello world
+ ---> Using cache
+ ---> 99cc1ad10469
+ Successfully built 99cc1ad10469
+ $ echo ".git" > .dockerignore
+ $ docker build .
+ Uploading context 6.76 MB
+ Uploading context
+ Step 1/2 : FROM busybox
+ ---> 769b9341d937
+ Step 2/2 : CMD echo Hello world
+ ---> Using cache
+ ---> 99cc1ad10469
+ Successfully built 99cc1ad10469
+ ```
+
+ This example shows the use of the `.dockerignore` file to exclude the `.git`
+ directory from the context. Its effect can be seen in the changed size of the
+ uploaded context. The builder reference contains detailed information on
+ [creating a .dockerignore file](/engine/reference/builder/#dockerignore-file).
+
+ When using the [BuildKit backend](/build/buildkit/),
+ `docker build` searches for a `.dockerignore` file relative to the Dockerfile
+ name. For example, running `docker build -f myapp.Dockerfile .` will first look
+ for an ignore file named `myapp.Dockerfile.dockerignore`. If such a file is not
+ found, the `.dockerignore` file is used if present. Using a Dockerfile based
+ `.dockerignore` is useful if a project contains multiple Dockerfiles that expect
+ to ignore different sets of files.
+
+
+ ### Tag an image (-t, --tag) {#tag}
+
+ ```console
+ $ docker build -t vieux/apache:2.0 .
+ ```
+
+ This will build like the previous example, but it will then tag the resulting
+ image. The repository name will be `vieux/apache` and the tag will be `2.0`.
+ [Read more about valid tags](tag.md).
+
+ You can apply multiple tags to an image. For example, you can apply the `latest`
+ tag to a newly built image and add another tag that references a specific
+ version.
+ For example, to tag an image both as `whenry/fedora-jboss:latest` and
+ `whenry/fedora-jboss:v2.1`, use the following:
+
+ ```console
+ $ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
+ ```
+
+ ### Specify a Dockerfile (-f, --file) {#file}
+
+ ```console
+ $ docker build -f Dockerfile.debug .
+ ```
+
+ This will use a file called `Dockerfile.debug` for the build instructions
+ instead of `Dockerfile`.
+
+ ```console
+ $ curl example.com/remote/Dockerfile | docker build -f - .
+ ```
+
+ The above command will use the current directory as the build context and read
+ a Dockerfile from stdin.
+
+ ```console
+ $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
+ $ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod .
+ ```
+
+ The above commands will build the current build context (as specified by the
+ `.`) twice, once using a debug version of a `Dockerfile` and once using a
+ production version.
- ```console
- $ cd /home/me/myapp/some/dir/really/deep
- $ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
- $ docker build -f ../../../../dockerfiles/debug /home/me/myapp
- ```
+ ```console
+ $ cd /home/me/myapp/some/dir/really/deep
+ $ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
+ $ docker build -f ../../../../dockerfiles/debug /home/me/myapp
+ ```
- These two `docker build` commands do the exact same thing. They both use the
- contents of the `debug` file instead of looking for a `Dockerfile` and will use
- `/home/me/myapp` as the root of the build context. Note that `debug` is in the
- directory structure of the build context, regardless of how you refer to it on
- the command line.
+ These two `docker build` commands do the exact same thing. They both use the
+ contents of the `debug` file instead of looking for a `Dockerfile` and will use
+ `/home/me/myapp` as the root of the build context. Note that `debug` is in the
+ directory structure of the build context, regardless of how you refer to it on
+ the command line.
- > **Note**
- >
- > `docker build` returns a `no such file or directory` error if the
- > file or directory does not exist in the uploaded context. This may
- > happen if there is no context, or if you specify a file that is
- > elsewhere on the Host system. The context is limited to the current
- > directory (and its children) for security reasons, and to ensure
- > repeatable builds on remote Docker hosts. This is also the reason why
- > `ADD ../file` does not work.
-
- ### Use a custom parent cgroup (--cgroup-parent)
-
- When `docker build` is run with the `--cgroup-parent` option the containers
- used in the build will be run with the [corresponding `docker run` flag](../run.md#specify-custom-cgroups).
+ > **Note**
+ >
+ > `docker build` returns a `no such file or directory` error if the
+ > file or directory does not exist in the uploaded context. This may
+ > happen if there is no context, or if you specify a file that is
+ > elsewhere on the Host system. The context is limited to the current
+ > directory (and its children) for security reasons, and to ensure
+ > repeatable builds on remote Docker hosts. This is also the reason why
+ > `ADD ../file` does not work.
+
+ ### Use a custom parent cgroup (--cgroup-parent) {#cgroup-parent}
+
+ When `docker build` is run with the `--cgroup-parent` option the containers
+ used in the build will be run with the [corresponding `docker run` flag](../run.md#specify-custom-cgroups).
- ### Set ulimits in container (--ulimit)
+ ### Set ulimits in container (--ulimit) {#ulimit}
- Using the `--ulimit` option with `docker build` will cause each build step's
- container to be started using those [`--ulimit` flag values](run.md#ulimit).
+ Using the `--ulimit` option with `docker build` will cause each build step's
+ container to be started using those [`--ulimit` flag values](run.md#ulimit).
- ### Set build-time variables (--build-arg)
+ ### Set build-time variables (--build-arg) {#build-arg}
- You can use `ENV` instructions in a Dockerfile to define variable
- values. These values persist in the built image. However, often
- persistence is not what you want. Users want to specify variables differently
- depending on which host they build an image on.
+ You can use `ENV` instructions in a Dockerfile to define variable
+ values. These values persist in the built image. However, often
+ persistence is not what you want. Users want to specify variables differently
+ depending on which host they build an image on.
- A good example is `http_proxy` or source versions for pulling intermediate
- files. The `ARG` instruction lets Dockerfile authors define values that users
- can set at build-time using the `--build-arg` flag:
+ A good example is `http_proxy` or source versions for pulling intermediate
+ files. The `ARG` instruction lets Dockerfile authors define values that users
+ can set at build-time using the `--build-arg` flag:
- ```console
- $ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 .
- ```
+ ```console
+ $ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 .
+ ```
- This flag allows you to pass the build-time variables that are
- accessed like regular environment variables in the `RUN` instruction of the
- Dockerfile. Also, these values don't persist in the intermediate or final images
- like `ENV` values do. You must add `--build-arg` for each build argument.
+ This flag allows you to pass the build-time variables that are
+ accessed like regular environment variables in the `RUN` instruction of the
+ Dockerfile. Also, these values don't persist in the intermediate or final images
+ like `ENV` values do. You must add `--build-arg` for each build argument.
- Using this flag will not alter the output you see when the `ARG` lines from the
- Dockerfile are echoed during the build process.
+ Using this flag will not alter the output you see when the `ARG` lines from the
+ Dockerfile are echoed during the build process.
- For detailed information on using `ARG` and `ENV` instructions, see the
- [Dockerfile reference](../builder.md).
+ For detailed information on using `ARG` and `ENV` instructions, see the
+ [Dockerfile reference](/engine/reference/builder/).
- You may also use the `--build-arg` flag without a value, in which case the value
- from the local environment will be propagated into the Docker container being
- built:
+ You may also use the `--build-arg` flag without a value, in which case the value
+ from the local environment will be propagated into the Docker container being
+ built:
- ```console
- $ export HTTP_PROXY=http://10.20.30.2:1234
- $ docker build --build-arg HTTP_PROXY .
- ```
+ ```console
+ $ export HTTP_PROXY=http://10.20.30.2:1234
+ $ docker build --build-arg HTTP_PROXY .
+ ```
- This is similar to how `docker run -e` works. Refer to the [`docker run` documentation](run.md#env)
- for more information.
+ This is similar to how `docker run -e` works. Refer to the [`docker run` documentation](run.md#env)
+ for more information.
- ### Optional security options (--security-opt)
+ ### Optional security options (--security-opt) {#security-opt}
- This flag is only supported on a daemon running on Windows, and only supports
- the `credentialspec` option. The `credentialspec` must be in the format
- `file://spec.txt` or `registry://keyname`.
+ This flag is only supported on a daemon running on Windows, and only supports
+ the `credentialspec` option. The `credentialspec` must be in the format
+ `file://spec.txt` or `registry://keyname`.
- ### Specify isolation technology for container (--isolation)
+ ### Specify isolation technology for container (--isolation) {#isolation}
- This option is useful in situations where you are running Docker containers on
- Windows. The `--isolation=` option sets a container's isolation
- technology. On Linux, the only supported is the `default` option which uses
- Linux namespaces. On Microsoft Windows, you can specify these values:
+ This option is useful in situations where you are running Docker containers on
+ Windows. The `--isolation=` option sets a container's isolation
+ technology. On Linux, the only supported is the `default` option which uses
+ Linux namespaces. On Microsoft Windows, you can specify these values:
- | Value | Description |
- |-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
- | `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. |
- | `process` | Namespace isolation only. |
- | `hyperv` | Hyper-V hypervisor partition-based isolation. |
+ | Value | Description |
+ |-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+ | `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. |
+ | `process` | Namespace isolation only. |
+ | `hyperv` | Hyper-V hypervisor partition-based isolation. |
- Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
+ Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
- ### Add entries to container hosts file (--add-host)
+ ### Add entries to container hosts file (--add-host) {#add-host}
- You can add other hosts into a container's `/etc/hosts` file by using one or
- more `--add-host` flags. This example adds a static address for a host named
- `docker`:
+ You can add other hosts into a container's `/etc/hosts` file by using one or
+ more `--add-host` flags. This example adds a static address for a host named
+ `docker`:
- $ docker build --add-host=docker:10.180.0.1 .
+ $ docker build --add-host=docker:10.180.0.1 .
- ### Specifying target build stage (--target)
+ ### Specifying target build stage (--target) {#target}
- When building a Dockerfile with multiple build stages, `--target` can be used to
- specify an intermediate build stage by name as a final stage for the resulting
- image. Commands after the target stage will be skipped.
+ When building a Dockerfile with multiple build stages, `--target` can be used to
+ specify an intermediate build stage by name as a final stage for the resulting
+ image. Commands after the target stage will be skipped.
- ```dockerfile
- FROM debian AS build-env
- # ...
+ ```dockerfile
+ FROM debian AS build-env
+ # ...
- FROM alpine AS production-env
- # ...
- ```
+ FROM alpine AS production-env
+ # ...
+ ```
- ```console
- $ docker build -t mybuildimage --target build-env .
- ```
+ ```console
+ $ docker build -t mybuildimage --target build-env .
+ ```
- ### Custom build outputs (--output)
+ ### Custom build outputs (--output) {#output}
- > **Note**
- >
- > This feature requires the BuildKit backend. You can either
- > [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or
- > use the [buildx](https://github.com/docker/buildx) plugin which provides more
- > output type options.
+ > **Note**
+ >
+ > This feature requires the BuildKit backend. You can either
+ > [enable BuildKit](/build/buildkit/#getting-started) or
+ > use the [buildx](https://github.com/docker/buildx) plugin which provides more
+ > output type options.
- By default, a local container image is created from the build result. The
- `--output` (or `-o`) flag allows you to override this behavior, and a specify a
- custom exporter. For example, custom exporters allow you to export the build
- artifacts as files on the local filesystem instead of a Docker image, which can
- be useful for generating local binaries, code generation etc.
+ By default, a local container image is created from the build result. The
+ `--output` (or `-o`) flag allows you to override this behavior, and a specify a
+ custom exporter. For example, custom exporters allow you to export the build
+ artifacts as files on the local filesystem instead of a Docker image, which can
+ be useful for generating local binaries, code generation etc.
- The value for `--output` is a CSV-formatted string defining the exporter type
- and options. Currently, `local` and `tar` exporters are supported. The `local`
- exporter writes the resulting build files to a directory on the client side. The
- `tar` exporter is similar but writes the files as a single tarball (`.tar`).
+ The value for `--output` is a CSV-formatted string defining the exporter type
+ and options. Currently, `local` and `tar` exporters are supported. The `local`
+ exporter writes the resulting build files to a directory on the client side. The
+ `tar` exporter is similar but writes the files as a single tarball (`.tar`).
- If no type is specified, the value defaults to the output directory of the local
- exporter. Use a hyphen (`-`) to write the output tarball to standard output
- (`STDOUT`).
+ If no type is specified, the value defaults to the output directory of the local
+ exporter. Use a hyphen (`-`) to write the output tarball to standard output
+ (`STDOUT`).
- The following example builds an image using the current directory (`.`) as build
- context, and exports the files to a directory named `out` in the current directory.
- If the directory does not exist, Docker creates the directory automatically:
+ The following example builds an image using the current directory (`.`) as build
+ context, and exports the files to a directory named `out` in the current directory.
+ If the directory does not exist, Docker creates the directory automatically:
- ```console
- $ docker build -o out .
- ```
+ ```console
+ $ docker build -o out .
+ ```
- The example above uses the short-hand syntax, omitting the `type` options, and
- thus uses the default (`local`) exporter. The example below shows the equivalent
- using the long-hand CSV syntax, specifying both `type` and `dest` (destination
- path):
+ The example above uses the short-hand syntax, omitting the `type` options, and
+ thus uses the default (`local`) exporter. The example below shows the equivalent
+ using the long-hand CSV syntax, specifying both `type` and `dest` (destination
+ path):
- ```console
- $ docker build --output type=local,dest=out .
- ```
+ ```console
+ $ docker build --output type=local,dest=out .
+ ```
- Use the `tar` type to export the files as a `.tar` archive:
+ Use the `tar` type to export the files as a `.tar` archive:
- ```console
- $ docker build --output type=tar,dest=out.tar .
- ```
+ ```console
+ $ docker build --output type=tar,dest=out.tar .
+ ```
- The example below shows the equivalent when using the short-hand syntax. In this
- case, `-` is specified as destination, which automatically selects the `tar` type,
- and writes the output tarball to standard output, which is then redirected to
- the `out.tar` file:
+ The example below shows the equivalent when using the short-hand syntax. In this
+ case, `-` is specified as destination, which automatically selects the `tar` type,
+ and writes the output tarball to standard output, which is then redirected to
+ the `out.tar` file:
- ```console
- $ docker build -o - . > out.tar
- ```
+ ```console
+ $ docker build -o - . > out.tar
+ ```
- The `--output` option exports all files from the target stage. A common pattern
- for exporting only specific files is to do multi-stage builds and to copy the
- desired files to a new scratch stage with [`COPY --from`](../builder.md#copy).
+ The `--output` option exports all files from the target stage. A common pattern
+ for exporting only specific files is to do multi-stage builds and to copy the
+ desired files to a new scratch stage with [`COPY --from`](/engine/reference/builder/#copy).
- The example `Dockerfile` below uses a separate stage to collect the
- build-artifacts for exporting:
+ The example `Dockerfile` below uses a separate stage to collect the
+ build-artifacts for exporting:
- ```dockerfile
- FROM golang AS build-stage
- RUN go get -u github.com/LK4D4/vndr
+ ```dockerfile
+ FROM golang AS build-stage
+ RUN go get -u github.com/LK4D4/vndr
- FROM scratch AS export-stage
- COPY --from=build-stage /go/bin/vndr /
- ```
+ FROM scratch AS export-stage
+ COPY --from=build-stage /go/bin/vndr /
+ ```
- When building the Dockerfile with the `-o` option, only the files from the final
- stage are exported to the `out` directory, in this case, the `vndr` binary:
+ When building the Dockerfile with the `-o` option, only the files from the final
+ stage are exported to the `out` directory, in this case, the `vndr` binary:
- ```console
- $ docker build -o out .
-
- [+] Building 2.3s (7/7) FINISHED
- => [internal] load build definition from Dockerfile 0.1s
- => => transferring dockerfile: 176B 0.0s
- => [internal] load .dockerignore 0.0s
- => => transferring context: 2B 0.0s
- => [internal] load metadata for docker.io/library/golang:latest 1.6s
- => [build-stage 1/2] FROM docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s
- => => resolve docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s
- => CACHED [build-stage 2/2] RUN go get -u github.com/LK4D4/vndr 0.0s
- => [export-stage 1/1] COPY --from=build-stage /go/bin/vndr / 0.2s
- => exporting to client 0.4s
- => => copying files 10.30MB 0.3s
-
- $ ls ./out
- vndr
- ```
-
- ### Specifying external cache sources (--cache-from)
-
- > **Note**
- >
- > This feature requires the BuildKit backend. You can either
- > [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or
- > use the [buildx](https://github.com/docker/buildx) plugin. The previous
- > builder has limited support for reusing cache from pre-pulled images.
-
- In addition to local build cache, the builder can reuse the cache generated from
- previous builds with the `--cache-from` flag pointing to an image in the registry.
-
- To use an image as a cache source, cache metadata needs to be written into the
- image on creation. This can be done by setting `--build-arg BUILDKIT_INLINE_CACHE=1`
- when building the image. After that, the built image can be used as a cache source
- for subsequent builds.
-
- Upon importing the cache, the builder will only pull the JSON metadata from the
- registry and determine possible cache hits based on that information. If there
- is a cache hit, the matched layers are pulled into the local environment.
-
- In addition to images, the cache can also be pulled from special cache manifests
- generated by [`buildx`](https://github.com/docker/buildx) or the BuildKit CLI
- (`buildctl`). These manifests (when built with the `type=registry` and `mode=max`
- options) allow pulling layer data for intermediate stages in multi-stage builds.
-
- The following example builds an image with inline-cache metadata and pushes it
- to a registry, then uses the image as a cache source on another machine:
-
- ```console
- $ docker build -t myname/myapp --build-arg BUILDKIT_INLINE_CACHE=1 .
- $ docker push myname/myapp
- ```
-
- After pushing the image, the image is used as cache source on another machine.
- BuildKit automatically pulls the image from the registry if needed.
-
- On another machine:
-
- ```console
- $ docker build --cache-from myname/myapp .
- ```
-
- ### Squash an image's layers (--squash) (experimental)
-
- #### Overview
-
- Once the image is built, squash the new layers into a new image with a single
- new layer. Squashing does not destroy any existing image, rather it creates a new
- image with the content of the squashed layers. This effectively makes it look
- like all `Dockerfile` commands were created with a single layer. The build
- cache is preserved with this method.
-
- The `--squash` option is an experimental feature, and should not be considered
- stable.
-
-
- Squashing layers can be beneficial if your Dockerfile produces multiple layers
- modifying the same files, for example, files that are created in one step, and
- removed in another step. For other use-cases, squashing images may actually have
- a negative impact on performance; when pulling an image consisting of multiple
- layers, layers can be pulled in parallel, and allows sharing layers between
- images (saving space).
-
- For most use cases, multi-stage builds are a better alternative, as they give more
- fine-grained control over your build, and can take advantage of future
- optimizations in the builder. Refer to the [use multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/)
- section in the userguide for more information.
-
-
- #### Known limitations
-
- The `--squash` option has a number of known limitations:
-
- - When squashing layers, the resulting image cannot take advantage of layer
- sharing with other images, and may use significantly more space. Sharing the
- base image is still supported.
- - When using this option you may see significantly more space used due to
- storing two copies of the image, one for the build cache with all the cache
- layers intact, and one for the squashed version.
- - While squashing layers may produce smaller images, it may have a negative
- impact on performance, as a single layer takes longer to extract, and
- downloading a single layer cannot be parallelized.
- - When attempting to squash an image that does not make changes to the
- filesystem (for example, the Dockerfile only contains `ENV` instructions),
- the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)).
-
- #### Prerequisites
-
- The example on this page is using experimental mode in Docker 19.03.
-
- Experimental mode can be enabled by using the `--experimental` flag when starting
- the Docker daemon or setting `experimental: true` in the `daemon.json` configuration
- file.
-
- By default, experimental mode is disabled. To see the current configuration of
- the docker daemon, use the `docker version` command and check the `Experimental`
- line in the `Engine` section:
-
- ```console
- Client: Docker Engine - Community
- Version: 19.03.8
- API version: 1.40
- Go version: go1.12.17
- Git commit: afacb8b
- Built: Wed Mar 11 01:21:11 2020
- OS/Arch: darwin/amd64
- Experimental: false
-
- Server: Docker Engine - Community
- Engine:
- Version: 19.03.8
- API version: 1.40 (minimum version 1.12)
- Go version: go1.12.17
- Git commit: afacb8b
- Built: Wed Mar 11 01:29:16 2020
- OS/Arch: linux/amd64
- Experimental: true
- [...]
- ```
-
- To enable experimental mode, users need to restart the docker daemon with the
- experimental flag enabled.
-
- #### Enable Docker experimental
-
- To enable experimental features, you need to start the Docker daemon with
- `--experimental` flag. You can also enable the daemon flag via
- `/etc/docker/daemon.json`, for example:
-
- ```json
- {
- "experimental": true
- }
- ```
-
- Then make sure the experimental flag is enabled:
-
- ```console
- $ docker version -f '{{.Server.Experimental}}'
- true
- ```
-
- #### Build an image with `--squash` argument
-
- The following is an example of docker build with `--squash` argument
-
- ```dockerfile
- FROM busybox
- RUN echo hello > /hello
- RUN echo world >> /hello
- RUN touch remove_me /remove_me
- ENV HELLO=world
- RUN rm /remove_me
- ```
-
- An image named `test` is built with `--squash` argument.
-
- ```console
- $ docker build --squash -t test .
-
- <...>
- ```
-
- If everything is right, the history looks like this:
-
- ```console
- $ docker history test
-
- IMAGE CREATED CREATED BY SIZE COMMENT
- 4e10cb5b4cac 3 seconds ago 12 B merge sha256:88a7b0112a41826885df0e7072698006ee8f621c6ab99fca7fe9151d7b599702 to sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
- 5 minutes ago /bin/sh -c rm /remove_me 0 B
- 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0 B
- 5 minutes ago /bin/sh -c touch remove_me /remove_me 0 B
- 5 minutes ago /bin/sh -c echo world >> /hello 0 B
- 6 minutes ago /bin/sh -c echo hello > /hello 0 B
- 7 weeks ago /bin/sh -c #(nop) CMD ["sh"] 0 B
- 7 weeks ago /bin/sh -c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB
- ```
-
- We could find that a layer's name is ``, and there is a new layer with
- COMMENT `merge`.
-
- Test the image, check for `/remove_me` being gone, make sure `hello\nworld` is
- in `/hello`, make sure the `HELLO` environment variable's value is `world`.
+ ```console
+ $ docker build -o out .
+
+ [+] Building 2.3s (7/7) FINISHED
+ => [internal] load build definition from Dockerfile 0.1s
+ => => transferring dockerfile: 176B 0.0s
+ => [internal] load .dockerignore 0.0s
+ => => transferring context: 2B 0.0s
+ => [internal] load metadata for docker.io/library/golang:latest 1.6s
+ => [build-stage 1/2] FROM docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s
+ => => resolve docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s
+ => CACHED [build-stage 2/2] RUN go get -u github.com/LK4D4/vndr 0.0s
+ => [export-stage 1/1] COPY --from=build-stage /go/bin/vndr / 0.2s
+ => exporting to client 0.4s
+ => => copying files 10.30MB 0.3s
+
+ $ ls ./out
+ vndr
+ ```
+
+ ### Specifying external cache sources (--cache-from) {#cache-from}
+
+ > **Note**
+ >
+ > This feature requires the BuildKit backend. You can either
+ > [enable BuildKit](/build/buildkit/#getting-started) or
+ > use the [buildx](https://github.com/docker/buildx) plugin. The previous
+ > builder has limited support for reusing cache from pre-pulled images.
+
+ In addition to local build cache, the builder can reuse the cache generated from
+ previous builds with the `--cache-from` flag pointing to an image in the registry.
+
+ To use an image as a cache source, cache metadata needs to be written into the
+ image on creation. This can be done by setting `--build-arg BUILDKIT_INLINE_CACHE=1`
+ when building the image. After that, the built image can be used as a cache source
+ for subsequent builds.
+
+ Upon importing the cache, the builder will only pull the JSON metadata from the
+ registry and determine possible cache hits based on that information. If there
+ is a cache hit, the matched layers are pulled into the local environment.
+
+ In addition to images, the cache can also be pulled from special cache manifests
+ generated by [`buildx`](https://github.com/docker/buildx) or the BuildKit CLI
+ (`buildctl`). These manifests (when built with the `type=registry` and `mode=max`
+ options) allow pulling layer data for intermediate stages in multi-stage builds.
+
+ The following example builds an image with inline-cache metadata and pushes it
+ to a registry, then uses the image as a cache source on another machine:
+
+ ```console
+ $ docker build -t myname/myapp --build-arg BUILDKIT_INLINE_CACHE=1 .
+ $ docker push myname/myapp
+ ```
+
+ After pushing the image, the image is used as cache source on another machine.
+ BuildKit automatically pulls the image from the registry if needed.
+
+ On another machine:
+
+ ```console
+ $ docker build --cache-from myname/myapp .
+ ```
+
+ ### Squash an image's layers (--squash) (experimental) {#squash}
+
+ #### Overview
+
+ Once the image is built, squash the new layers into a new image with a single
+ new layer. Squashing does not destroy any existing image, rather it creates a new
+ image with the content of the squashed layers. This effectively makes it look
+ like all `Dockerfile` commands were created with a single layer. The build
+ cache is preserved with this method.
+
+ The `--squash` option is an experimental feature, and should not be considered
+ stable.
+
+
+ Squashing layers can be beneficial if your Dockerfile produces multiple layers
+ modifying the same files, for example, files that are created in one step, and
+ removed in another step. For other use-cases, squashing images may actually have
+ a negative impact on performance; when pulling an image consisting of multiple
+ layers, layers can be pulled in parallel, and allows sharing layers between
+ images (saving space).
+
+ For most use cases, multi-stage builds are a better alternative, as they give more
+ fine-grained control over your build, and can take advantage of future
+ optimizations in the builder. Refer to the [use multi-stage builds](/develop/develop-images/multistage-build/)
+ section in the userguide for more information.
+
+
+ #### Known limitations
+
+ The `--squash` option has a number of known limitations:
+
+ - When squashing layers, the resulting image cannot take advantage of layer
+ sharing with other images, and may use significantly more space. Sharing the
+ base image is still supported.
+ - When using this option you may see significantly more space used due to
+ storing two copies of the image, one for the build cache with all the cache
+ layers intact, and one for the squashed version.
+ - While squashing layers may produce smaller images, it may have a negative
+ impact on performance, as a single layer takes longer to extract, and
+ downloading a single layer cannot be parallelized.
+ - When attempting to squash an image that does not make changes to the
+ filesystem (for example, the Dockerfile only contains `ENV` instructions),
+ the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)).
+
+ #### Prerequisites
+
+ The example on this page is using experimental mode in Docker 19.03.
+
+ Experimental mode can be enabled by using the `--experimental` flag when starting
+ the Docker daemon or setting `experimental: true` in the `daemon.json` configuration
+ file.
+
+ By default, experimental mode is disabled. To see the current configuration of
+ the docker daemon, use the `docker version` command and check the `Experimental`
+ line in the `Engine` section:
+
+ ```console
+ Client: Docker Engine - Community
+ Version: 19.03.8
+ API version: 1.40
+ Go version: go1.12.17
+ Git commit: afacb8b
+ Built: Wed Mar 11 01:21:11 2020
+ OS/Arch: darwin/amd64
+ Experimental: false
+
+ Server: Docker Engine - Community
+ Engine:
+ Version: 19.03.8
+ API version: 1.40 (minimum version 1.12)
+ Go version: go1.12.17
+ Git commit: afacb8b
+ Built: Wed Mar 11 01:29:16 2020
+ OS/Arch: linux/amd64
+ Experimental: true
+ [...]
+ ```
+
+ To enable experimental mode, users need to restart the docker daemon with the
+ experimental flag enabled.
+
+ #### Enable Docker experimental
+
+ To enable experimental features, you need to start the Docker daemon with
+ `--experimental` flag. You can also enable the daemon flag via
+ `/etc/docker/daemon.json`, for example:
+
+ ```json
+ {
+ "experimental": true
+ }
+ ```
+
+ Then make sure the experimental flag is enabled:
+
+ ```console
+ $ docker version -f '{{.Server.Experimental}}'
+ true
+ ```
+
+ #### Build an image with `--squash` argument
+
+ The following is an example of docker build with `--squash` argument
+
+ ```dockerfile
+ FROM busybox
+ RUN echo hello > /hello
+ RUN echo world >> /hello
+ RUN touch remove_me /remove_me
+ ENV HELLO=world
+ RUN rm /remove_me
+ ```
+
+ An image named `test` is built with `--squash` argument.
+
+ ```console
+ $ docker build --squash -t test .
+
+ <...>
+ ```
+
+ If everything is right, the history looks like this:
+
+ ```console
+ $ docker history test
+
+ IMAGE CREATED CREATED BY SIZE COMMENT
+ 4e10cb5b4cac 3 seconds ago 12 B merge sha256:88a7b0112a41826885df0e7072698006ee8f621c6ab99fca7fe9151d7b599702 to sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
+ 5 minutes ago /bin/sh -c rm /remove_me 0 B
+ 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0 B
+ 5 minutes ago /bin/sh -c touch remove_me /remove_me 0 B
+ 5 minutes ago /bin/sh -c echo world >> /hello 0 B
+ 6 minutes ago /bin/sh -c echo hello > /hello 0 B
+ 7 weeks ago /bin/sh -c #(nop) CMD ["sh"] 0 B
+ 7 weeks ago /bin/sh -c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB
+ ```
+
+ We could find that a layer's name is ``, and there is a new layer with
+ COMMENT `merge`.
+
+ Test the image, check for `/remove_me` being gone, make sure `hello\nworld` is
+ in `/hello`, make sure the `HELLO` environment variable's value is `world`.
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_builder.yaml b/_data/engine-cli/docker_builder.yaml
index c7178bfbd6..518ca35fda 100644
--- a/_data/engine-cli/docker_builder.yaml
+++ b/_data/engine-cli/docker_builder.yaml
@@ -5,11 +5,22 @@ usage: docker builder
pname: docker
plink: docker.yaml
cname:
-- docker builder build
-- docker builder prune
+ - docker builder build
+ - docker builder prune
clink:
-- docker_builder_build.yaml
-- docker_builder_prune.yaml
+ - docker_builder_build.yaml
+ - docker_builder_prune.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.31"
experimental: false
diff --git a/_data/engine-cli/docker_builder_build.yaml b/_data/engine-cli/docker_builder_build.yaml
index 30b108b6d8..b3ddc82567 100644
--- a/_data/engine-cli/docker_builder_build.yaml
+++ b/_data/engine-cli/docker_builder_build.yaml
@@ -1,330 +1,318 @@
command: docker builder build
+aliases: docker image build, docker build, docker buildx build, docker builder build
short: Build an image from a Dockerfile
-long: Build an image from a Dockerfile
+long: See [docker build](build.md) for more information.
usage: docker builder build [OPTIONS] PATH | URL | -
pname: docker builder
plink: docker_builder.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: build-arg
- value_type: list
- description: Set build-time variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cache-from
- value_type: stringSlice
- default_value: '[]'
- description: Images to consider as cache sources
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: compress
- value_type: bool
- default_value: "false"
- description: Compress the build context using gzip
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: file
- shorthand: f
- value_type: string
- description: Name of the Dockerfile (Default is 'PATH/Dockerfile')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force-rm
- value_type: bool
- default_value: "false"
- description: Always remove intermediate containers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: iidfile
- value_type: string
- description: Write the image ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- value_type: list
- description: Set metadata for an image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: string
- default_value: default
- description: |
- Set the networking mode for the RUN instructions during build
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-cache
- value_type: bool
- default_value: "false"
- description: Do not use cache when building the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: output
- shorthand: o
- value_type: stringArray
- default_value: '[]'
- description: 'Output destination (format: type=local,dest=path)'
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.38"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: progress
- value_type: string
- default_value: auto
- description: |
- Set type of progress output (auto, plain, tty). Use plain to show container output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Always attempt to pull a newer version of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress the build output and print image ID on success
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "true"
- description: Remove intermediate containers after a successful build
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: secret
- value_type: stringArray
- default_value: '[]'
- description: |
- Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: stringSlice
- default_value: '[]'
- description: Security options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: squash
- value_type: bool
- default_value: "false"
- description: Squash newly built layers into a single new layer
- deprecated: false
- min_api_version: "1.25"
- experimental: true
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ssh
- value_type: stringArray
- default_value: '[]'
- description: |
- SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|[=|[,]])
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stream
- value_type: bool
- default_value: "false"
- description: Stream attaches to server to negotiate build context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tag
- shorthand: t
- value_type: list
- description: Name and optionally a tag in the 'name:tag' format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target
- value_type: string
- description: Set the target build stage to build.
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (`host:ip`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: build-arg
+ value_type: list
+ description: Set build-time variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cache-from
+ value_type: stringSlice
+ default_value: '[]'
+ description: Images to consider as cache sources
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: compress
+ value_type: bool
+ default_value: "false"
+ description: Compress the build context using gzip
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: file
+ shorthand: f
+ value_type: string
+ description: Name of the Dockerfile (Default is `PATH/Dockerfile`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force-rm
+ value_type: bool
+ default_value: "false"
+ description: Always remove intermediate containers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: iidfile
+ value_type: string
+ description: Write the image ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ value_type: list
+ description: Set metadata for an image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: string
+ default_value: default
+ description: Set the networking mode for the RUN instructions during build
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-cache
+ value_type: bool
+ default_value: "false"
+ description: Do not use cache when building the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.38"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: bool
+ default_value: "false"
+ description: Always attempt to pull a newer version of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the build output and print image ID on success
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "true"
+ description: Remove intermediate containers after a successful build
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: stringSlice
+ default_value: '[]'
+ description: Security options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of `/dev/shm`
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: squash
+ value_type: bool
+ default_value: "false"
+ description: Squash newly built layers into a single new layer
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: true
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tag
+ shorthand: t
+ value_type: list
+ description: Name and optionally a tag in the `name:tag` format
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: target
+ value_type: string
+ description: Set the target build stage to build.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.31"
experimental: false
diff --git a/_data/engine-cli/docker_builder_prune.yaml b/_data/engine-cli/docker_builder_prune.yaml
index f8614f9904..00071e4c19 100644
--- a/_data/engine-cli/docker_builder_prune.yaml
+++ b/_data/engine-cli/docker_builder_prune.yaml
@@ -5,43 +5,58 @@ usage: docker builder prune
pname: docker builder
plink: docker_builder.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Remove all unused build cache, not just dangling ones
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: filter
- value_type: filter
- description: Provide filter values (e.g. 'until=24h')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Do not prompt for confirmation
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: keep-storage
- value_type: bytes
- default_value: "0"
- description: Amount of disk space to keep for cache
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Remove all unused build cache, not just dangling ones
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: filter
+ value_type: filter
+ description: Provide filter values (e.g. `until=24h`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Do not prompt for confirmation
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: keep-storage
+ value_type: bytes
+ default_value: "0"
+ description: Amount of disk space to keep for cache
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.39"
experimental: false
diff --git a/_data/engine-cli/docker_checkpoint.yaml b/_data/engine-cli/docker_checkpoint.yaml
index c2b9713145..f650506834 100644
--- a/_data/engine-cli/docker_checkpoint.yaml
+++ b/_data/engine-cli/docker_checkpoint.yaml
@@ -1,110 +1,121 @@
command: docker checkpoint
short: Manage checkpoints
long: |-
- Checkpoint and Restore is an experimental feature that allows you to freeze a running
- container by checkpointing it, which turns its state into a collection of files
- on disk. Later, the container can be restored from the point it was frozen.
+ Checkpoint and Restore is an experimental feature that allows you to freeze a running
+ container by checkpointing it, which turns its state into a collection of files
+ on disk. Later, the container can be restored from the point it was frozen.
- This is accomplished using a tool called [CRIU](https://criu.org), which is an
- external dependency of this feature. A good overview of the history of
- checkpoint and restore in Docker is available in this
- [Kubernetes blog post](https://kubernetes.io/blog/2015/07/how-did-quake-demo-from-dockercon-work/).
+ This is accomplished using a tool called [CRIU](https://criu.org), which is an
+ external dependency of this feature. A good overview of the history of
+ checkpoint and restore in Docker is available in this
+ [Kubernetes blog post](https://kubernetes.io/blog/2015/07/how-did-quake-demo-from-dockercon-work/).
- ### Installing CRIU
+ ### Installing CRIU
- If you use a Debian system, you can add the CRIU PPA and install with `apt-get`
- [from the criu launchpad](https://launchpad.net/~criu/+archive/ubuntu/ppa).
+ If you use a Debian system, you can add the CRIU PPA and install with `apt-get`
+ [from the criu launchpad](https://launchpad.net/~criu/+archive/ubuntu/ppa).
- Alternatively, you can [build CRIU from source](https://criu.org/Installation).
+ Alternatively, you can [build CRIU from source](https://criu.org/Installation).
- You need at least version 2.0 of CRIU to run checkpoint and restore in Docker.
+ You need at least version 2.0 of CRIU to run checkpoint and restore in Docker.
- ### Use cases for checkpoint and restore
+ ### Use cases for checkpoint and restore
- This feature is currently focused on single-host use cases for checkpoint and
- restore. Here are a few:
+ This feature is currently focused on single-host use cases for checkpoint and
+ restore. Here are a few:
- - Restarting the host machine without stopping/starting containers
- - Speeding up the start time of slow start applications
- - "Rewinding" processes to an earlier point in time
- - "Forensic debugging" of running processes
+ - Restarting the host machine without stopping/starting containers
+ - Speeding up the start time of slow start applications
+ - "Rewinding" processes to an earlier point in time
+ - "Forensic debugging" of running processes
- Another primary use case of checkpoint and restore outside of Docker is the live
- migration of a server from one machine to another. This is possible with the
- current implementation, but not currently a priority (and so the workflow is
- not optimized for the task).
+ Another primary use case of checkpoint and restore outside of Docker is the live
+ migration of a server from one machine to another. This is possible with the
+ current implementation, but not currently a priority (and so the workflow is
+ not optimized for the task).
- ### Using checkpoint and restore
+ ### Using checkpoint and restore
- A new top level command `docker checkpoint` is introduced, with three subcommands:
+ A new top level command `docker checkpoint` is introduced, with three subcommands:
- - `docker checkpoint create` (creates a new checkpoint)
- - `docker checkpoint ls` (lists existing checkpoints)
- - `docker checkpoint rm` (deletes an existing checkpoint)
+ - `docker checkpoint create` (creates a new checkpoint)
+ - `docker checkpoint ls` (lists existing checkpoints)
+ - `docker checkpoint rm` (deletes an existing checkpoint)
- Additionally, a `--checkpoint` flag is added to the `docker container start` command.
+ Additionally, a `--checkpoint` flag is added to the `docker container start` command.
- The options for `docker checkpoint create`:
+ The options for `docker checkpoint create`:
- ```console
- Usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
+ ```console
+ Usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
- Create a checkpoint from a running container
+ Create a checkpoint from a running container
- --leave-running=false Leave the container running after checkpoint
- --checkpoint-dir Use a custom checkpoint storage directory
- ```
+ --leave-running=false Leave the container running after checkpoint
+ --checkpoint-dir Use a custom checkpoint storage directory
+ ```
- And to restore a container:
+ And to restore a container:
- ```console
- Usage: docker start --checkpoint CHECKPOINT_ID [OTHER OPTIONS] CONTAINER
- ```
+ ```console
+ Usage: docker start --checkpoint CHECKPOINT_ID [OTHER OPTIONS] CONTAINER
+ ```
- Example of using checkpoint and restore on a container:
+ Example of using checkpoint and restore on a container:
- ```console
- $ docker run --security-opt=seccomp:unconfined --name cr -d busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
- abc0123
+ ```console
+ $ docker run --security-opt=seccomp:unconfined --name cr -d busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
+ abc0123
- $ docker checkpoint create cr checkpoint1
+ $ docker checkpoint create cr checkpoint1
- #
- $ docker start --checkpoint checkpoint1 cr
- abc0123
- ```
+ #
+ $ docker start --checkpoint checkpoint1 cr
+ abc0123
+ ```
- This process just logs an incrementing counter to stdout. If you run `docker logs`
- in between running/checkpoint/restoring you should see that the counter
- increases while the process is running, stops while it's checkpointed, and
- resumes from the point it left off once you restore.
+ This process just logs an incrementing counter to stdout. If you run `docker logs`
+ in between running/checkpoint/restoring you should see that the counter
+ increases while the process is running, stops while it's checkpointed, and
+ resumes from the point it left off once you restore.
- ### Known limitations
+ ### Known limitations
- seccomp is only supported by CRIU in very up to date kernels.
+ seccomp is only supported by CRIU in very up to date kernels.
- External terminal (i.e. `docker run -t ..`) is not supported at the moment.
- If you try to create a checkpoint for a container with an external terminal,
- it would fail:
+ External terminal (i.e. `docker run -t ..`) is not supported at the moment.
+ If you try to create a checkpoint for a container with an external terminal,
+ it would fail:
- ```console
- $ docker checkpoint create cr checkpoint1
- Error response from daemon: Cannot checkpoint container c1: rpc error: code = 2 desc = exit status 1: "criu failed: type NOTIFY errno 0\nlog file: /var/lib/docker/containers/eb62ebdbf237ce1a8736d2ae3c7d88601fc0a50235b0ba767b559a1f3c5a600b/checkpoints/checkpoint1/criu.work/dump.log\n"
+ ```console
+ $ docker checkpoint create cr checkpoint1
+ Error response from daemon: Cannot checkpoint container c1: rpc error: code = 2 desc = exit status 1: "criu failed: type NOTIFY errno 0\nlog file: /var/lib/docker/containers/eb62ebdbf237ce1a8736d2ae3c7d88601fc0a50235b0ba767b559a1f3c5a600b/checkpoints/checkpoint1/criu.work/dump.log\n"
- $ cat /var/lib/docker/containers/eb62ebdbf237ce1a8736d2ae3c7d88601fc0a50235b0ba767b559a1f3c5a600b/checkpoints/checkpoint1/criu.work/dump.log
- Error (mount.c:740): mnt: 126:./dev/console doesn't have a proper root mount
- ```
+ $ cat /var/lib/docker/containers/eb62ebdbf237ce1a8736d2ae3c7d88601fc0a50235b0ba767b559a1f3c5a600b/checkpoints/checkpoint1/criu.work/dump.log
+ Error (mount.c:740): mnt: 126:./dev/console doesn't have a proper root mount
+ ```
usage: docker checkpoint
pname: docker
plink: docker.yaml
cname:
-- docker checkpoint create
-- docker checkpoint ls
-- docker checkpoint rm
+ - docker checkpoint create
+ - docker checkpoint ls
+ - docker checkpoint rm
clink:
-- docker_checkpoint_create.yaml
-- docker_checkpoint_ls.yaml
-- docker_checkpoint_rm.yaml
+ - docker_checkpoint_create.yaml
+ - docker_checkpoint_ls.yaml
+ - docker_checkpoint_rm.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
diff --git a/_data/engine-cli/docker_checkpoint_create.yaml b/_data/engine-cli/docker_checkpoint_create.yaml
index c45b1f5228..0fe3f3f9f1 100644
--- a/_data/engine-cli/docker_checkpoint_create.yaml
+++ b/_data/engine-cli/docker_checkpoint_create.yaml
@@ -5,23 +5,36 @@ usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
pname: docker checkpoint
plink: docker_checkpoint.yaml
options:
-- option: checkpoint-dir
- value_type: string
- description: Use a custom checkpoint storage directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: leave-running
- value_type: bool
- default_value: "false"
- description: Leave the container running after checkpoint
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: checkpoint-dir
+ value_type: string
+ description: Use a custom checkpoint storage directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: leave-running
+ value_type: bool
+ default_value: "false"
+ description: Leave the container running after checkpoint
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
diff --git a/_data/engine-cli/docker_checkpoint_ls.yaml b/_data/engine-cli/docker_checkpoint_ls.yaml
index 2d5966a347..7188092ddb 100644
--- a/_data/engine-cli/docker_checkpoint_ls.yaml
+++ b/_data/engine-cli/docker_checkpoint_ls.yaml
@@ -1,19 +1,31 @@
command: docker checkpoint ls
-aliases: list
+aliases: docker checkpoint ls, docker checkpoint list
short: List checkpoints for a container
long: List checkpoints for a container
usage: docker checkpoint ls [OPTIONS] CONTAINER
pname: docker checkpoint
plink: docker_checkpoint.yaml
options:
-- option: checkpoint-dir
- value_type: string
- description: Use a custom checkpoint storage directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: checkpoint-dir
+ value_type: string
+ description: Use a custom checkpoint storage directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
diff --git a/_data/engine-cli/docker_checkpoint_rm.yaml b/_data/engine-cli/docker_checkpoint_rm.yaml
index eab14820c7..a29cd33b5c 100644
--- a/_data/engine-cli/docker_checkpoint_rm.yaml
+++ b/_data/engine-cli/docker_checkpoint_rm.yaml
@@ -1,19 +1,31 @@
command: docker checkpoint rm
-aliases: remove
+aliases: docker checkpoint rm, docker checkpoint remove
short: Remove a checkpoint
long: Remove a checkpoint
usage: docker checkpoint rm [OPTIONS] CONTAINER CHECKPOINT
pname: docker checkpoint
plink: docker_checkpoint.yaml
options:
-- option: checkpoint-dir
- value_type: string
- description: Use a custom checkpoint storage directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: checkpoint-dir
+ value_type: string
+ description: Use a custom checkpoint storage directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
diff --git a/_data/engine-cli/docker_commit.yaml b/_data/engine-cli/docker_commit.yaml
index a6e6efa2c2..0a40a255b9 100644
--- a/_data/engine-cli/docker_commit.yaml
+++ b/_data/engine-cli/docker_commit.yaml
@@ -1,130 +1,147 @@
command: docker commit
+aliases: docker container commit, docker commit
short: Create a new image from a container's changes
long: |-
- It can be useful to commit a container's file changes or settings into a new
- image. This allows you to debug a container by running an interactive shell, or to
- export a working dataset to another server. Generally, it is better to use
- Dockerfiles to manage your images in a documented and maintainable way.
- [Read more about valid image names and tags](tag.md).
+ It can be useful to commit a container's file changes or settings into a new
+ image. This allows you to debug a container by running an interactive shell, or to
+ export a working dataset to another server. Generally, it is better to use
+ Dockerfiles to manage your images in a documented and maintainable way.
+ [Read more about valid image names and tags](tag.md).
- The commit operation will not include any data contained in
- volumes mounted inside the container.
+ The commit operation will not include any data contained in
+ volumes mounted inside the container.
- By default, the container being committed and its processes will be paused
- while the image is committed. This reduces the likelihood of encountering data
- corruption during the process of creating the commit. If this behavior is
- undesired, set the `--pause` option to false.
+ By default, the container being committed and its processes will be paused
+ while the image is committed. This reduces the likelihood of encountering data
+ corruption during the process of creating the commit. If this behavior is
+ undesired, set the `--pause` option to false.
- The `--change` option will apply `Dockerfile` instructions to the image that is
- created. Supported `Dockerfile` instructions:
- `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`LABEL`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
+ The `--change` option will apply `Dockerfile` instructions to the image that is
+ created. Supported `Dockerfile` instructions:
+ `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`LABEL`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
pname: docker
plink: docker.yaml
options:
-- option: author
- shorthand: a
- value_type: string
- description: Author (e.g., "John Hannibal Smith ")
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: change
- shorthand: c
- value_type: list
- description: Apply Dockerfile instruction to the created image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: message
- shorthand: m
- value_type: string
- description: Commit message
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pause
- shorthand: p
- value_type: bool
- default_value: "true"
- description: Pause container during commit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: author
+ shorthand: a
+ value_type: string
+ description: Author (e.g., `John Hannibal Smith `)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: change
+ shorthand: c
+ value_type: list
+ description: Apply Dockerfile instruction to the created image
+ details_url: '#change'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: message
+ shorthand: m
+ value_type: string
+ description: Commit message
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pause
+ shorthand: p
+ value_type: bool
+ default_value: "true"
+ description: Pause container during commit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Commit a container
+ ### Commit a container
- ```console
- $ docker ps
+ ```console
+ $ docker ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
- 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
+ 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
- $ docker commit c3f279d17e0a svendowideit/testimage:version3
+ $ docker commit c3f279d17e0a svendowideit/testimage:version3
- f5283438590d
+ f5283438590d
- $ docker images
+ $ docker images
- REPOSITORY TAG ID CREATED SIZE
- svendowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
- ```
+ REPOSITORY TAG ID CREATED SIZE
+ svendowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
+ ```
- ### Commit a container with new configurations (--change)
+ ### Commit a container with new configurations (--change) {#change}
- ```console
- $ docker ps
+ ```console
+ $ docker ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
- 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
+ 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
- $ docker inspect -f "{{ .Config.Env }}" c3f279d17e0a
+ $ docker inspect -f "{{ .Config.Env }}" c3f279d17e0a
- [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
+ [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
- $ docker commit --change "ENV DEBUG=true" c3f279d17e0a svendowideit/testimage:version3
+ $ docker commit --change "ENV DEBUG=true" c3f279d17e0a svendowideit/testimage:version3
- f5283438590d
+ f5283438590d
- $ docker inspect -f "{{ .Config.Env }}" f5283438590d
+ $ docker inspect -f "{{ .Config.Env }}" f5283438590d
- [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true]
- ```
+ [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true]
+ ```
- ### Commit a container with new `CMD` and `EXPOSE` instructions
+ ### Commit a container with new `CMD` and `EXPOSE` instructions
- ```console
- $ docker ps
+ ```console
+ $ docker ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
- 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
+ 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
- $ docker commit --change='CMD ["apachectl", "-DFOREGROUND"]' -c "EXPOSE 80" c3f279d17e0a svendowideit/testimage:version4
+ $ docker commit --change='CMD ["apachectl", "-DFOREGROUND"]' -c "EXPOSE 80" c3f279d17e0a svendowideit/testimage:version4
- f5283438590d
+ f5283438590d
- $ docker run -d svendowideit/testimage:version4
+ $ docker run -d svendowideit/testimage:version4
- 89373736e2e7f00bc149bd783073ac43d0507da250e999f3f1036e0db60817c0
+ 89373736e2e7f00bc149bd783073ac43d0507da250e999f3f1036e0db60817c0
- $ docker ps
+ $ docker ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 89373736e2e7 testimage:version4 "apachectl -DFOREGROU" 3 seconds ago Up 2 seconds 80/tcp distracted_fermat
- c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
- 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
- ```
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ 89373736e2e7 testimage:version4 "apachectl -DFOREGROU" 3 seconds ago Up 2 seconds 80/tcp distracted_fermat
+ c3f279d17e0a ubuntu:22.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
+ 197387f1b436 ubuntu:22.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_config.yaml b/_data/engine-cli/docker_config.yaml
index 81801f1d9f..7abf0068dc 100644
--- a/_data/engine-cli/docker_config.yaml
+++ b/_data/engine-cli/docker_config.yaml
@@ -1,19 +1,30 @@
command: docker config
-short: Manage Docker configs
+short: Manage Swarm configs
long: Manage configs.
usage: docker config
pname: docker
plink: docker.yaml
cname:
-- docker config create
-- docker config inspect
-- docker config ls
-- docker config rm
+ - docker config create
+ - docker config inspect
+ - docker config ls
+ - docker config rm
clink:
-- docker_config_create.yaml
-- docker_config_inspect.yaml
-- docker_config_ls.yaml
-- docker_config_rm.yaml
+ - docker_config_create.yaml
+ - docker_config_inspect.yaml
+ - docker_config_ls.yaml
+ - docker_config_rm.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
min_api_version: "1.30"
experimental: false
diff --git a/_data/engine-cli/docker_config_create.yaml b/_data/engine-cli/docker_config_create.yaml
index e9991284f3..6d716986a1 100644
--- a/_data/engine-cli/docker_config_create.yaml
+++ b/_data/engine-cli/docker_config_create.yaml
@@ -1,98 +1,112 @@
command: docker config create
short: Create a config from a file or STDIN
long: |-
- Creates a config using standard input or from a file for the config content.
+ Creates a config using standard input or from a file for the config content.
- For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).
+ For detailed information about using configs, refer to [store configuration data using Docker Configs](/engine/swarm/configs/).
- > **Note**
- >
- > This is a cluster management command, and must be executed on a swarm
- > manager node. To learn about managers and workers, refer to the
- > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
- > documentation.
+ > **Note**
+ >
+ > This is a cluster management command, and must be executed on a swarm
+ > manager node. To learn about managers and workers, refer to the
+ > [Swarm mode section](/engine/swarm/) in the
+ > documentation.
usage: docker config create [OPTIONS] CONFIG file|-
pname: docker config
plink: docker_config.yaml
options:
-- option: label
- shorthand: l
- value_type: list
- description: Config labels
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: template-driver
- value_type: string
- description: Template driver
- deprecated: false
- min_api_version: "1.37"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: label
+ shorthand: l
+ value_type: list
+ description: Config labels
+ details_url: '#label'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: template-driver
+ value_type: string
+ description: Template driver
+ deprecated: false
+ hidden: false
+ min_api_version: "1.37"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Create a config
+ ### Create a config
- ```console
- $ printf | docker config create my_config -
+ ```console
+ $ printf | docker config create my_config -
- onakdyv307se2tl7nl20anokv
+ onakdyv307se2tl7nl20anokv
- $ docker config ls
+ $ docker config ls
- ID NAME CREATED UPDATED
- onakdyv307se2tl7nl20anokv my_config 6 seconds ago 6 seconds ago
- ```
+ ID NAME CREATED UPDATED
+ onakdyv307se2tl7nl20anokv my_config 6 seconds ago 6 seconds ago
+ ```
- ### Create a config with a file
+ ### Create a config with a file
- ```console
- $ docker config create my_config ./config.json
+ ```console
+ $ docker config create my_config ./config.json
- dg426haahpi5ezmkkj5kyl3sn
+ dg426haahpi5ezmkkj5kyl3sn
- $ docker config ls
+ $ docker config ls
- ID NAME CREATED UPDATED
- dg426haahpi5ezmkkj5kyl3sn my_config 7 seconds ago 7 seconds ago
- ```
+ ID NAME CREATED UPDATED
+ dg426haahpi5ezmkkj5kyl3sn my_config 7 seconds ago 7 seconds ago
+ ```
- ### Create a config with labels (-l, --label)
+ ### Create a config with labels (-l, --label) {#label}
- ```console
- $ docker config create \
- --label env=dev \
- --label rev=20170324 \
- my_config ./config.json
+ ```console
+ $ docker config create \
+ --label env=dev \
+ --label rev=20170324 \
+ my_config ./config.json
- eo7jnzguqgtpdah3cm5srfb97
- ```
+ eo7jnzguqgtpdah3cm5srfb97
+ ```
- ```console
- $ docker config inspect my_config
+ ```console
+ $ docker config inspect my_config
- [
- {
- "ID": "eo7jnzguqgtpdah3cm5srfb97",
- "Version": {
- "Index": 17
- },
- "CreatedAt": "2017-03-24T08:15:09.735271783Z",
- "UpdatedAt": "2017-03-24T08:15:09.735271783Z",
- "Spec": {
- "Name": "my_config",
- "Labels": {
- "env": "dev",
- "rev": "20170324"
- },
- "Data": "aGVsbG8K"
- }
- }
- ]
- ```
+ [
+ {
+ "ID": "eo7jnzguqgtpdah3cm5srfb97",
+ "Version": {
+ "Index": 17
+ },
+ "CreatedAt": "2017-03-24T08:15:09.735271783Z",
+ "UpdatedAt": "2017-03-24T08:15:09.735271783Z",
+ "Spec": {
+ "Name": "my_config",
+ "Labels": {
+ "env": "dev",
+ "rev": "20170324"
+ },
+ "Data": "aGVsbG8K"
+ }
+ }
+ ]
+ ```
deprecated: false
min_api_version: "1.30"
experimental: false
diff --git a/_data/engine-cli/docker_config_inspect.yaml b/_data/engine-cli/docker_config_inspect.yaml
index 3335b0817d..0cdfe1dc63 100644
--- a/_data/engine-cli/docker_config_inspect.yaml
+++ b/_data/engine-cli/docker_config_inspect.yaml
@@ -1,96 +1,114 @@
command: docker config inspect
short: Display detailed information on one or more configs
long: |-
- Inspects the specified config.
+ Inspects the specified config.
- By default, this renders all results in a JSON array. If a format is specified,
- the given template will be executed for each result.
+ By default, this renders all results in a JSON array. If a format is specified,
+ the given template will be executed for each result.
- Go's [text/template](https://golang.org/pkg/text/template/) package
- describes all the details of the format.
+ Go's [text/template](https://golang.org/pkg/text/template/) package
+ describes all the details of the format.
- For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).
+ For detailed information about using configs, refer to [store configuration data using Docker Configs](/engine/swarm/configs/).
- > **Note**
- >
- > This is a cluster management command, and must be executed on a swarm
- > manager node. To learn about managers and workers, refer to the
- > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
- > documentation.
+ > **Note**
+ >
+ > This is a cluster management command, and must be executed on a swarm
+ > manager node. To learn about managers and workers, refer to the
+ > [Swarm mode section](/engine/swarm/) in the
+ > documentation.
usage: docker config inspect [OPTIONS] CONFIG [CONFIG...]
pname: docker config
plink: docker_config.yaml
options:
-- option: format
- shorthand: f
- value_type: string
- description: Format the output using the given Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pretty
- value_type: bool
- default_value: "false"
- description: Print the information in a human friendly format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ shorthand: f
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ details_url: '#format'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pretty
+ value_type: bool
+ default_value: "false"
+ description: Print the information in a human friendly format
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Inspect a config by name or ID
+ ### Inspect a config by name or ID
- You can inspect a config, either by its *name*, or *ID*
+ You can inspect a config, either by its *name*, or *ID*
- For example, given the following config:
+ For example, given the following config:
- ```console
- $ docker config ls
+ ```console
+ $ docker config ls
- ID NAME CREATED UPDATED
- eo7jnzguqgtpdah3cm5srfb97 my_config 3 minutes ago 3 minutes ago
- ```
+ ID NAME CREATED UPDATED
+ eo7jnzguqgtpdah3cm5srfb97 my_config 3 minutes ago 3 minutes ago
+ ```
- ```console
- $ docker config inspect config.json
- ```
+ ```console
+ $ docker config inspect config.json
+ ```
- The output is in JSON format, for example:
+ The output is in JSON format, for example:
- ```json
- [
- {
- "ID": "eo7jnzguqgtpdah3cm5srfb97",
- "Version": {
- "Index": 17
- },
- "CreatedAt": "2017-03-24T08:15:09.735271783Z",
- "UpdatedAt": "2017-03-24T08:15:09.735271783Z",
- "Spec": {
- "Name": "my_config",
- "Labels": {
- "env": "dev",
- "rev": "20170324"
+ ```json
+ [
+ {
+ "ID": "eo7jnzguqgtpdah3cm5srfb97",
+ "Version": {
+ "Index": 17
},
- "Data": "aGVsbG8K"
+ "CreatedAt": "2017-03-24T08:15:09.735271783Z",
+ "UpdatedAt": "2017-03-24T08:15:09.735271783Z",
+ "Spec": {
+ "Name": "my_config",
+ "Labels": {
+ "env": "dev",
+ "rev": "20170324"
+ },
+ "Data": "aGVsbG8K"
+ }
}
- }
- ]
- ```
+ ]
+ ```
- ### Format the output (--format)
+ ### Format the output (--format) {#format}
- You can use the --format option to obtain specific information about a
- config. The following example command outputs the creation time of the
- config.
+ You can use the --format option to obtain specific information about a
+ config. The following example command outputs the creation time of the
+ config.
- ```console
- $ docker config inspect --format='{{.CreatedAt}}' eo7jnzguqgtpdah3cm5srfb97
+ ```console
+ $ docker config inspect --format='{{.CreatedAt}}' eo7jnzguqgtpdah3cm5srfb97
- 2017-03-24 08:15:09.735271783 +0000 UTC
- ```
+ 2017-03-24 08:15:09.735271783 +0000 UTC
+ ```
deprecated: false
min_api_version: "1.30"
experimental: false
diff --git a/_data/engine-cli/docker_config_ls.yaml b/_data/engine-cli/docker_config_ls.yaml
index d6934213c0..7d4b3a89d0 100644
--- a/_data/engine-cli/docker_config_ls.yaml
+++ b/_data/engine-cli/docker_config_ls.yaml
@@ -1,160 +1,182 @@
command: docker config ls
-aliases: list
+aliases: docker config ls, docker config list
short: List configs
long: |-
- Run this command on a manager node to list the configs in the swarm.
+ Run this command on a manager node to list the configs in the swarm.
- For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).
+ For detailed information about using configs, refer to [store configuration data using Docker Configs](/engine/swarm/configs/).
- > **Note**
- >
- > This is a cluster management command, and must be executed on a swarm
- > manager node. To learn about managers and workers, refer to the
- > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
- > documentation.
+ > **Note**
+ >
+ > This is a cluster management command, and must be executed on a swarm
+ > manager node. To learn about managers and workers, refer to the
+ > [Swarm mode section](/engine/swarm/) in the
+ > documentation.
usage: docker config ls [OPTIONS]
pname: docker config
plink: docker_config.yaml
options:
-- option: filter
- shorthand: f
- value_type: filter
- description: Filter output based on conditions provided
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Pretty-print configs using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only display IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: filter
+ shorthand: f
+ value_type: filter
+ description: Filter output based on conditions provided
+ details_url: '#filter'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ details_url: '#format'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only display IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ```console
- $ docker config ls
+ ```console
+ $ docker config ls
- ID NAME CREATED UPDATED
- 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago
- 9u9hk4br2ej0wgngkga6rp4hq my_config 5 weeks ago 5 weeks ago
- mem02h8n73mybpgqjf0kfi1n0 test_config 3 seconds ago 3 seconds ago
- ```
+ ID NAME CREATED UPDATED
+ 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago
+ 9u9hk4br2ej0wgngkga6rp4hq my_config 5 weeks ago 5 weeks ago
+ mem02h8n73mybpgqjf0kfi1n0 test_config 3 seconds ago 3 seconds ago
+ ```
- ### Filtering (-f, --filter)
+ ### Filtering (-f, --filter) {#filter}
- The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
- than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
+ The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
+ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
- The currently supported filters are:
+ The currently supported filters are:
- - [id](#id) (config's ID)
- - [label](#label) (`label=` or `label==`)
- - [name](#name) (config's name)
+ - [id](#id) (config's ID)
+ - [label](#label) (`label=` or `label==`)
+ - [name](#name) (config's name)
- #### id
+ #### id
- The `id` filter matches all or prefix of a config's id.
+ The `id` filter matches all or prefix of a config's id.
- ```console
- $ docker config ls -f "id=6697bflskwj1998km1gnnjr38"
+ ```console
+ $ docker config ls -f "id=6697bflskwj1998km1gnnjr38"
- ID NAME CREATED UPDATED
- 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago
- ```
+ ID NAME CREATED UPDATED
+ 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago
+ ```
- #### label
+ #### label
- The `label` filter matches configs based on the presence of a `label` alone or
- a `label` and a value.
+ The `label` filter matches configs based on the presence of a `label` alone or
+ a `label` and a value.
- The following filter matches all configs with a `project` label regardless of
- its value:
+ The following filter matches all configs with a `project` label regardless of
+ its value:
- ```console
- $ docker config ls --filter label=project
+ ```console
+ $ docker config ls --filter label=project
- ID NAME CREATED UPDATED
- mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
- ```
+ ID NAME CREATED UPDATED
+ mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
+ ```
- The following filter matches only services with the `project` label with the
- `project-a` value.
+ The following filter matches only services with the `project` label with the
+ `project-a` value.
- ```console
- $ docker service ls --filter label=project=test
+ ```console
+ $ docker service ls --filter label=project=test
- ID NAME CREATED UPDATED
- mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
- ```
+ ID NAME CREATED UPDATED
+ mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
+ ```
- #### name
+ #### name
- The `name` filter matches on all or prefix of a config's name.
+ The `name` filter matches on all or prefix of a config's name.
- The following filter matches config with a name containing a prefix of `test`.
+ The following filter matches config with a name containing a prefix of `test`.
- ```console
- $ docker config ls --filter name=test_config
+ ```console
+ $ docker config ls --filter name=test_config
- ID NAME CREATED UPDATED
- mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
- ```
+ ID NAME CREATED UPDATED
+ mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
+ ```
- ### Format the output (--format)
+ ### Format the output (--format) {#format}
- The formatting option (`--format`) pretty prints configs output
- using a Go template.
+ The formatting option (`--format`) pretty prints configs output
+ using a Go template.
- Valid placeholders for the Go template are listed below:
+ Valid placeholders for the Go template are listed below:
- | Placeholder | Description |
- |--------------|--------------------------------------------------------------------------------------|
- | `.ID` | Config ID |
- | `.Name` | Config name |
- | `.CreatedAt` | Time when the config was created |
- | `.UpdatedAt` | Time when the config was updated |
- | `.Labels` | All labels assigned to the config |
- | `.Label` | Value of a specific label for this config. For example `{{.Label "my-label"}}` |
+ | Placeholder | Description |
+ |--------------|--------------------------------------------------------------------------------------|
+ | `.ID` | Config ID |
+ | `.Name` | Config name |
+ | `.CreatedAt` | Time when the config was created |
+ | `.UpdatedAt` | Time when the config was updated |
+ | `.Labels` | All labels assigned to the config |
+ | `.Label` | Value of a specific label for this config. For example `{{.Label "my-label"}}` |
- When using the `--format` option, the `config ls` command will either
- output the data exactly as the template declares or, when using the
- `table` directive, will include column headers as well.
+ When using the `--format` option, the `config ls` command will either
+ output the data exactly as the template declares or, when using the
+ `table` directive, will include column headers as well.
- The following example uses a template without headers and outputs the
- `ID` and `Name` entries separated by a colon (`:`) for all images:
+ The following example uses a template without headers and outputs the
+ `ID` and `Name` entries separated by a colon (`:`) for all images:
- ```console
- $ docker config ls --format "{{.ID}}: {{.Name}}"
+ ```console
+ $ docker config ls --format "{{.ID}}: {{.Name}}"
- 77af4d6b9913: config-1
- b6fa739cedf5: config-2
- 78a85c484f71: config-3
- ```
+ 77af4d6b9913: config-1
+ b6fa739cedf5: config-2
+ 78a85c484f71: config-3
+ ```
- To list all configs with their name and created date in a table format you
- can use:
+ To list all configs with their name and created date in a table format you
+ can use:
- ```console
- $ docker config ls --format "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}"
+ ```console
+ $ docker config ls --format "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}"
- ID NAME CREATED
- 77af4d6b9913 config-1 5 minutes ago
- b6fa739cedf5 config-2 3 hours ago
- 78a85c484f71 config-3 10 days ago
- ```
+ ID NAME CREATED
+ 77af4d6b9913 config-1 5 minutes ago
+ b6fa739cedf5 config-2 3 hours ago
+ 78a85c484f71 config-3 10 days ago
+ ```
deprecated: false
min_api_version: "1.30"
experimental: false
diff --git a/_data/engine-cli/docker_config_rm.yaml b/_data/engine-cli/docker_config_rm.yaml
index c29e1a3867..db718561b4 100644
--- a/_data/engine-cli/docker_config_rm.yaml
+++ b/_data/engine-cli/docker_config_rm.yaml
@@ -1,32 +1,43 @@
command: docker config rm
-aliases: remove
+aliases: docker config rm, docker config remove
short: Remove one or more configs
long: |-
- Removes the specified configs from the swarm.
+ Removes the specified configs from the swarm.
- For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).
+ For detailed information about using configs, refer to [store configuration data using Docker Configs](/engine/swarm/configs/).
- > **Note**
- >
- > This is a cluster management command, and must be executed on a swarm
- > manager node. To learn about managers and workers, refer to the
- > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
- > documentation.
+ > **Note**
+ >
+ > This is a cluster management command, and must be executed on a swarm
+ > manager node. To learn about managers and workers, refer to the
+ > [Swarm mode section](/engine/swarm/) in the
+ > documentation.
usage: docker config rm CONFIG [CONFIG...]
pname: docker config
plink: docker_config.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- This example removes a config:
+ This example removes a config:
- ```console
- $ docker config rm my_config
- sapth4csdo5b6wz2p5uimh5xg
- ```
+ ```console
+ $ docker config rm my_config
+ sapth4csdo5b6wz2p5uimh5xg
+ ```
- > **Warning**
- >
- > Unlike `docker rm`, this command does not ask for confirmation before removing
- > a config.
+ > **Warning**
+ >
+ > Unlike `docker rm`, this command does not ask for confirmation before removing
+ > a config.
deprecated: false
min_api_version: "1.30"
experimental: false
diff --git a/_data/engine-cli/docker_container.yaml b/_data/engine-cli/docker_container.yaml
index 3c501b4487..28ef753a3a 100644
--- a/_data/engine-cli/docker_container.yaml
+++ b/_data/engine-cli/docker_container.yaml
@@ -5,57 +5,68 @@ usage: docker container
pname: docker
plink: docker.yaml
cname:
-- docker container attach
-- docker container commit
-- docker container cp
-- docker container create
-- docker container diff
-- docker container exec
-- docker container export
-- docker container inspect
-- docker container kill
-- docker container logs
-- docker container ls
-- docker container pause
-- docker container port
-- docker container prune
-- docker container rename
-- docker container restart
-- docker container rm
-- docker container run
-- docker container start
-- docker container stats
-- docker container stop
-- docker container top
-- docker container unpause
-- docker container update
-- docker container wait
+ - docker container attach
+ - docker container commit
+ - docker container cp
+ - docker container create
+ - docker container diff
+ - docker container exec
+ - docker container export
+ - docker container inspect
+ - docker container kill
+ - docker container logs
+ - docker container ls
+ - docker container pause
+ - docker container port
+ - docker container prune
+ - docker container rename
+ - docker container restart
+ - docker container rm
+ - docker container run
+ - docker container start
+ - docker container stats
+ - docker container stop
+ - docker container top
+ - docker container unpause
+ - docker container update
+ - docker container wait
clink:
-- docker_container_attach.yaml
-- docker_container_commit.yaml
-- docker_container_cp.yaml
-- docker_container_create.yaml
-- docker_container_diff.yaml
-- docker_container_exec.yaml
-- docker_container_export.yaml
-- docker_container_inspect.yaml
-- docker_container_kill.yaml
-- docker_container_logs.yaml
-- docker_container_ls.yaml
-- docker_container_pause.yaml
-- docker_container_port.yaml
-- docker_container_prune.yaml
-- docker_container_rename.yaml
-- docker_container_restart.yaml
-- docker_container_rm.yaml
-- docker_container_run.yaml
-- docker_container_start.yaml
-- docker_container_stats.yaml
-- docker_container_stop.yaml
-- docker_container_top.yaml
-- docker_container_unpause.yaml
-- docker_container_update.yaml
-- docker_container_wait.yaml
+ - docker_container_attach.yaml
+ - docker_container_commit.yaml
+ - docker_container_cp.yaml
+ - docker_container_create.yaml
+ - docker_container_diff.yaml
+ - docker_container_exec.yaml
+ - docker_container_export.yaml
+ - docker_container_inspect.yaml
+ - docker_container_kill.yaml
+ - docker_container_logs.yaml
+ - docker_container_ls.yaml
+ - docker_container_pause.yaml
+ - docker_container_port.yaml
+ - docker_container_prune.yaml
+ - docker_container_rename.yaml
+ - docker_container_restart.yaml
+ - docker_container_rm.yaml
+ - docker_container_run.yaml
+ - docker_container_start.yaml
+ - docker_container_stats.yaml
+ - docker_container_stop.yaml
+ - docker_container_top.yaml
+ - docker_container_unpause.yaml
+ - docker_container_update.yaml
+ - docker_container_wait.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_attach.yaml b/_data/engine-cli/docker_container_attach.yaml
index 95b4d3ede8..eed5223945 100644
--- a/_data/engine-cli/docker_container_attach.yaml
+++ b/_data/engine-cli/docker_container_attach.yaml
@@ -1,36 +1,52 @@
command: docker container attach
-short: Attach local standard input, output, and error streams to a running container
-long: Attach local standard input, output, and error streams to a running container
+aliases: docker container attach, docker attach
+short: |
+ Attach local standard input, output, and error streams to a running container
+long: See [docker attach](attach.md) for more information.
usage: docker container attach [OPTIONS] CONTAINER
pname: docker container
plink: docker_container.yaml
options:
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-stdin
- value_type: bool
- default_value: "false"
- description: Do not attach STDIN
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sig-proxy
- value_type: bool
- default_value: "true"
- description: Proxy all received signals to the process
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-stdin
+ value_type: bool
+ default_value: "false"
+ description: Do not attach STDIN
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sig-proxy
+ value_type: bool
+ default_value: "true"
+ description: Proxy all received signals to the process
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_commit.yaml b/_data/engine-cli/docker_container_commit.yaml
index 8524a53a5b..1d39b8ed50 100644
--- a/_data/engine-cli/docker_container_commit.yaml
+++ b/_data/engine-cli/docker_container_commit.yaml
@@ -1,47 +1,63 @@
command: docker container commit
+aliases: docker container commit, docker commit
short: Create a new image from a container's changes
-long: Create a new image from a container's changes
+long: See [docker commit](commit.md) for more information.
usage: docker container commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
pname: docker container
plink: docker_container.yaml
options:
-- option: author
- shorthand: a
- value_type: string
- description: Author (e.g., "John Hannibal Smith ")
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: change
- shorthand: c
- value_type: list
- description: Apply Dockerfile instruction to the created image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: message
- shorthand: m
- value_type: string
- description: Commit message
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pause
- shorthand: p
- value_type: bool
- default_value: "true"
- description: Pause container during commit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: author
+ shorthand: a
+ value_type: string
+ description: Author (e.g., `John Hannibal Smith `)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: change
+ shorthand: c
+ value_type: list
+ description: Apply Dockerfile instruction to the created image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: message
+ shorthand: m
+ value_type: string
+ description: Commit message
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pause
+ shorthand: p
+ value_type: bool
+ default_value: "true"
+ description: Pause container during commit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_cp.yaml b/_data/engine-cli/docker_container_cp.yaml
index e308f4068a..9da8707c47 100644
--- a/_data/engine-cli/docker_container_cp.yaml
+++ b/_data/engine-cli/docker_container_cp.yaml
@@ -1,37 +1,58 @@
command: docker container cp
+aliases: docker container cp, docker cp
short: Copy files/folders between a container and the local filesystem
-long: |-
- Copy files/folders between a container and the local filesystem
-
- Use '-' as the source to read a tar archive from stdin
- and extract it to a directory destination in a container.
- Use '-' as the destination to stream a tar archive of a
- container source to stdout.
-usage: "docker container cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-\n\tdocker cp
- [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH"
+long: See [docker cp](cp.md) for more information.
+usage: |-
+ docker container cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
+ docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
pname: docker container
plink: docker_container.yaml
options:
-- option: archive
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Archive mode (copy all uid/gid information)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: follow-link
- shorthand: L
- value_type: bool
- default_value: "false"
- description: Always follow symbol link in SRC_PATH
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: archive
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Archive mode (copy all uid/gid information)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: follow-link
+ shorthand: L
+ value_type: bool
+ default_value: "false"
+ description: Always follow symbol link in SRC_PATH
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: |
+ Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_create.yaml b/_data/engine-cli/docker_container_create.yaml
index ece16dca1b..5020770013 100644
--- a/_data/engine-cli/docker_container_create.yaml
+++ b/_data/engine-cli/docker_container_create.yaml
@@ -1,891 +1,1000 @@
command: docker container create
+aliases: docker container create, docker create
short: Create a new container
-long: Create a new container
+long: See [docker create](create.md) for more information.
usage: docker container create [OPTIONS] IMAGE [COMMAND] [ARG...]
pname: docker container
plink: docker_container.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: attach
- shorthand: a
- value_type: list
- description: Attach to STDIN, STDOUT or STDERR
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight
- value_type: uint16
- default_value: "0"
- description: |
- Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight-device
- value_type: list
- default_value: '[]'
- description: Block IO weight (relative device weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-add
- value_type: list
- description: Add Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-drop
- value_type: list
- description: Drop Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroupns
- value_type: string
- description: |-
- Cgroup namespace to use (host|private)
- 'host': Run the container in the Docker host's cgroup namespace
- 'private': Run the container in its own private cgroup namespace
- '': Use the cgroup namespace as configured by the
- default-cgroupns-mode option on the daemon (default)
- deprecated: false
- min_api_version: "1.41"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cidfile
- value_type: string
- description: Write the container ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-count
- value_type: int64
- default_value: "0"
- description: CPU count (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-percent
- value_type: int64
- default_value: "0"
- description: CPU percent (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-period
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time period in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-runtime
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time runtime in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpus
- value_type: decimal
- description: Number of CPUs
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device
- value_type: list
- description: Add a host device to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-cgroup-rule
- value_type: list
- description: Add a rule to the cgroup allowed devices list
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-bps
- value_type: list
- default_value: '[]'
- description: Limit read rate (bytes per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-iops
- value_type: list
- default_value: '[]'
- description: Limit read rate (IO per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-bps
- value_type: list
- default_value: '[]'
- description: Limit write rate (bytes per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-iops
- value_type: list
- default_value: '[]'
- description: Limit write rate (IO per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns
- value_type: list
- description: Set custom DNS servers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-opt
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-option
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-search
- value_type: list
- description: Set custom DNS search domains
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: domainname
- value_type: string
- description: Container NIS domain name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: entrypoint
- value_type: string
- description: Overwrite the default ENTRYPOINT of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env
- shorthand: e
- value_type: list
- description: Set environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env-file
- value_type: list
- description: Read in a file of environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: expose
- value_type: list
- description: Expose a port or a range of ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: gpus
- value_type: gpu-request
- description: GPU devices to add to the container ('all' to pass all GPUs)
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: group-add
- value_type: list
- description: Add additional groups to join
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-cmd
- value_type: string
- description: Command to run to check health
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-interval
- value_type: duration
- default_value: 0s
- description: Time between running the check (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-retries
- value_type: int
- default_value: "0"
- description: Consecutive failures needed to report unhealthy
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-start-period
- value_type: duration
- default_value: 0s
- description: |
- Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
- deprecated: false
- min_api_version: "1.29"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-timeout
- value_type: duration
- default_value: 0s
- description: |
- Maximum time to allow one check to run (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: help
- value_type: bool
- default_value: "false"
- description: Print usage
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: hostname
- shorthand: h
- value_type: string
- description: Container host name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: init
- value_type: bool
- default_value: "false"
- description: |
- Run an init inside the container that forwards signals and reaps processes
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Keep STDIN open even if not attached
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: io-maxbandwidth
- value_type: bytes
- default_value: "0"
- description: |
- Maximum IO bandwidth limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: io-maxiops
- value_type: uint64
- default_value: "0"
- description: Maximum IOps limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: ip
- value_type: string
- description: IPv4 address (e.g., 172.30.100.104)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ip6
- value_type: string
- description: IPv6 address (e.g., 2001:db8::33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ipc
- value_type: string
- description: IPC mode to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kernel-memory
- value_type: bytes
- default_value: "0"
- description: Kernel memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- shorthand: l
- value_type: list
- description: Set meta data on a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label-file
- value_type: list
- description: Read in a line delimited file of labels
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link
- value_type: list
- description: Add link to another container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link-local-ip
- value_type: list
- description: Container IPv4/IPv6 link-local addresses
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-driver
- value_type: string
- description: Logging driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-opt
- value_type: list
- description: Log driver options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mac-address
- value_type: string
- description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-reservation
- value_type: bytes
- default_value: "0"
- description: Memory soft limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swappiness
- value_type: int64
- default_value: "-1"
- description: Tune container memory swappiness (0 to 100)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mount
- value_type: mount
- description: Attach a filesystem mount to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: name
- value_type: string
- description: Assign a name to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-healthcheck
- value_type: bool
- default_value: "false"
- description: Disable any container-specified HEALTHCHECK
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-kill-disable
- value_type: bool
- default_value: "false"
- description: Disable OOM Killer
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-score-adj
- value_type: int
- default_value: "0"
- description: Tune host's OOM preferences (-1000 to 1000)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pid
- value_type: string
- description: PID namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pids-limit
- value_type: int64
- default_value: "0"
- description: Tune container pids limit (set -1 for unlimited)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.32"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: privileged
- value_type: bool
- default_value: "false"
- description: Give extended privileges to this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish
- shorthand: p
- value_type: list
- description: Publish a container's port(s) to the host
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish-all
- shorthand: P
- value_type: bool
- default_value: "false"
- description: Publish all exposed ports to random ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: string
- default_value: missing
- description: Pull image before creating ("always"|"missing"|"never")
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: read-only
- value_type: bool
- default_value: "false"
- description: Mount the container's root filesystem as read only
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: restart
- value_type: string
- default_value: "no"
- description: Restart policy to apply when a container exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "false"
- description: Automatically remove the container when it exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: runtime
- value_type: string
- description: Runtime to use for this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: list
- description: Security Options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-signal
- value_type: string
- default_value: SIGTERM
- description: Signal to stop a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-timeout
- value_type: int
- default_value: "0"
- description: Timeout (in seconds) to stop a container
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: storage-opt
- value_type: list
- description: Storage driver options for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sysctl
- value_type: map
- default_value: map[]
- description: Sysctl options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tmpfs
- value_type: list
- description: Mount a tmpfs directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tty
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Allocate a pseudo-TTY
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: user
- shorthand: u
- value_type: string
- description: 'Username or UID (format: [:])'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: userns
- value_type: string
- description: User namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: uts
- value_type: string
- description: UTS namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume
- shorthand: v
- value_type: list
- description: Bind mount a volume
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume-driver
- value_type: string
- description: Optional volume driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volumes-from
- value_type: list
- description: Mount volumes from the specified container(s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: workdir
- shorthand: w
- value_type: string
- description: Working directory inside the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (host:ip)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: attach
+ shorthand: a
+ value_type: list
+ description: Attach to STDIN, STDOUT or STDERR
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight
+ value_type: uint16
+ default_value: "0"
+ description: |
+ Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight-device
+ value_type: list
+ default_value: '[]'
+ description: Block IO weight (relative device weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-add
+ value_type: list
+ description: Add Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-drop
+ value_type: list
+ description: Drop Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroupns
+ value_type: string
+ description: |-
+ Cgroup namespace to use (host|private)
+ 'host': Run the container in the Docker host's cgroup namespace
+ 'private': Run the container in its own private cgroup namespace
+ '': Use the cgroup namespace as configured by the
+ default-cgroupns-mode option on the daemon (default)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.41"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cidfile
+ value_type: string
+ description: Write the container ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-count
+ value_type: int64
+ default_value: "0"
+ description: CPU count (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-percent
+ value_type: int64
+ default_value: "0"
+ description: CPU percent (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time period in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-runtime
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time runtime in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpus
+ value_type: decimal
+ description: Number of CPUs
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device
+ value_type: list
+ description: Add a host device to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-cgroup-rule
+ value_type: list
+ description: Add a rule to the cgroup allowed devices list
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (bytes per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (IO per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (bytes per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (IO per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns
+ value_type: list
+ description: Set custom DNS servers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-opt
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-option
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-search
+ value_type: list
+ description: Set custom DNS search domains
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: domainname
+ value_type: string
+ description: Container NIS domain name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: entrypoint
+ value_type: string
+ description: Overwrite the default ENTRYPOINT of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env
+ shorthand: e
+ value_type: list
+ description: Set environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env-file
+ value_type: list
+ description: Read in a file of environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: expose
+ value_type: list
+ description: Expose a port or a range of ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: gpus
+ value_type: gpu-request
+ description: GPU devices to add to the container ('all' to pass all GPUs)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.40"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: group-add
+ value_type: list
+ description: Add additional groups to join
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-cmd
+ value_type: string
+ description: Command to run to check health
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-interval
+ value_type: duration
+ default_value: 0s
+ description: Time between running the check (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-retries
+ value_type: int
+ default_value: "0"
+ description: Consecutive failures needed to report unhealthy
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-start-period
+ value_type: duration
+ default_value: 0s
+ description: |
+ Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.29"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-timeout
+ value_type: duration
+ default_value: 0s
+ description: Maximum time to allow one check to run (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: hostname
+ shorthand: h
+ value_type: string
+ description: Container host name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: init
+ value_type: bool
+ default_value: "false"
+ description: |
+ Run an init inside the container that forwards signals and reaps processes
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Keep STDIN open even if not attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: io-maxbandwidth
+ value_type: bytes
+ default_value: "0"
+ description: Maximum IO bandwidth limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: io-maxiops
+ value_type: uint64
+ default_value: "0"
+ description: Maximum IOps limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: ip
+ value_type: string
+ description: IPv4 address (e.g., 172.30.100.104)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ip6
+ value_type: string
+ description: IPv6 address (e.g., 2001:db8::33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ipc
+ value_type: string
+ description: IPC mode to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kernel-memory
+ value_type: bytes
+ default_value: "0"
+ description: Kernel memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ shorthand: l
+ value_type: list
+ description: Set meta data on a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label-file
+ value_type: list
+ description: Read in a line delimited file of labels
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link
+ value_type: list
+ description: Add link to another container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link-local-ip
+ value_type: list
+ description: Container IPv4/IPv6 link-local addresses
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-driver
+ value_type: string
+ description: Logging driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-opt
+ value_type: list
+ description: Log driver options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mac-address
+ value_type: string
+ description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-reservation
+ value_type: bytes
+ default_value: "0"
+ description: Memory soft limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: |
+ Swap limit equal to memory plus swap: '-1' to enable unlimited swap
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swappiness
+ value_type: int64
+ default_value: "-1"
+ description: Tune container memory swappiness (0 to 100)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mount
+ value_type: mount
+ description: Attach a filesystem mount to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: name
+ value_type: string
+ description: Assign a name to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-healthcheck
+ value_type: bool
+ default_value: "false"
+ description: Disable any container-specified HEALTHCHECK
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-kill-disable
+ value_type: bool
+ default_value: "false"
+ description: Disable OOM Killer
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-score-adj
+ value_type: int
+ default_value: "0"
+ description: Tune host's OOM preferences (-1000 to 1000)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pid
+ value_type: string
+ description: PID namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pids-limit
+ value_type: int64
+ default_value: "0"
+ description: Tune container pids limit (set -1 for unlimited)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.32"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: privileged
+ value_type: bool
+ default_value: "false"
+ description: Give extended privileges to this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish
+ shorthand: p
+ value_type: list
+ description: Publish a container's port(s) to the host
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish-all
+ shorthand: P
+ value_type: bool
+ default_value: "false"
+ description: Publish all exposed ports to random ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: string
+ default_value: missing
+ description: Pull image before creating (`always`, `|missing`, `never`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the pull output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: read-only
+ value_type: bool
+ default_value: "false"
+ description: Mount the container's root filesystem as read only
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: restart
+ value_type: string
+ default_value: "no"
+ description: Restart policy to apply when a container exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "false"
+ description: Automatically remove the container when it exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: runtime
+ value_type: string
+ description: Runtime to use for this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: list
+ description: Security Options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of /dev/shm
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-signal
+ value_type: string
+ description: Signal to stop the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-timeout
+ value_type: int
+ default_value: "0"
+ description: Timeout (in seconds) to stop a container
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: storage-opt
+ value_type: list
+ description: Storage driver options for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sysctl
+ value_type: map
+ default_value: map[]
+ description: Sysctl options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tmpfs
+ value_type: list
+ description: Mount a tmpfs directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tty
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Allocate a pseudo-TTY
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: user
+ shorthand: u
+ value_type: string
+ description: 'Username or UID (format: [:])'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: userns
+ value_type: string
+ description: User namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: uts
+ value_type: string
+ description: UTS namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume
+ shorthand: v
+ value_type: list
+ description: Bind mount a volume
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume-driver
+ value_type: string
+ description: Optional volume driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volumes-from
+ value_type: list
+ description: Mount volumes from the specified container(s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: workdir
+ shorthand: w
+ value_type: string
+ description: Working directory inside the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_diff.yaml b/_data/engine-cli/docker_container_diff.yaml
index 48c1ccf5d3..80d309637a 100644
--- a/_data/engine-cli/docker_container_diff.yaml
+++ b/_data/engine-cli/docker_container_diff.yaml
@@ -1,9 +1,21 @@
command: docker container diff
+aliases: docker container diff, docker diff
short: Inspect changes to files or directories on a container's filesystem
-long: Inspect changes to files or directories on a container's filesystem
+long: See [docker diff](diff.md) for more information.
usage: docker container diff CONTAINER
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_exec.yaml b/_data/engine-cli/docker_container_exec.yaml
index e5d38aee6f..88b049f203 100644
--- a/_data/engine-cli/docker_container_exec.yaml
+++ b/_data/engine-cli/docker_container_exec.yaml
@@ -1,95 +1,116 @@
command: docker container exec
-short: Run a command in a running container
-long: Run a command in a running container
+aliases: docker container exec, docker exec
+short: Execute a command in a running container
+long: See [docker exec](exec.md) for more information.
usage: docker container exec [OPTIONS] CONTAINER COMMAND [ARG...]
pname: docker container
plink: docker_container.yaml
options:
-- option: detach
- shorthand: d
- value_type: bool
- default_value: "false"
- description: 'Detached mode: run command in the background'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env
- shorthand: e
- value_type: list
- description: Set environment variables
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env-file
- value_type: list
- description: Read in a file of environment variables
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Keep STDIN open even if not attached
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: privileged
- value_type: bool
- default_value: "false"
- description: Give extended privileges to the command
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tty
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Allocate a pseudo-TTY
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: user
- shorthand: u
- value_type: string
- description: 'Username or UID (format: [:])'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: workdir
- shorthand: w
- value_type: string
- description: Working directory inside the container
- deprecated: false
- min_api_version: "1.35"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: detach
+ shorthand: d
+ value_type: bool
+ default_value: "false"
+ description: 'Detached mode: run command in the background'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env
+ shorthand: e
+ value_type: list
+ description: Set environment variables
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env-file
+ value_type: list
+ description: Read in a file of environment variables
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Keep STDIN open even if not attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: privileged
+ value_type: bool
+ default_value: "false"
+ description: Give extended privileges to the command
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tty
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Allocate a pseudo-TTY
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: user
+ shorthand: u
+ value_type: string
+ description: 'Username or UID (format: `[:]`)'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: workdir
+ shorthand: w
+ value_type: string
+ description: Working directory inside the container
+ deprecated: false
+ hidden: false
+ min_api_version: "1.35"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_export.yaml b/_data/engine-cli/docker_container_export.yaml
index e45c77d971..c2a7a52e5c 100644
--- a/_data/engine-cli/docker_container_export.yaml
+++ b/_data/engine-cli/docker_container_export.yaml
@@ -1,19 +1,32 @@
command: docker container export
+aliases: docker container export, docker export
short: Export a container's filesystem as a tar archive
-long: Export a container's filesystem as a tar archive
+long: See [docker export](export.md) for more information.
usage: docker container export [OPTIONS] CONTAINER
pname: docker container
plink: docker_container.yaml
options:
-- option: output
- shorthand: o
- value_type: string
- description: Write to a file, instead of STDOUT
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: output
+ shorthand: o
+ value_type: string
+ description: Write to a file, instead of STDOUT
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_inspect.yaml b/_data/engine-cli/docker_container_inspect.yaml
index c27e4a4506..98a556750b 100644
--- a/_data/engine-cli/docker_container_inspect.yaml
+++ b/_data/engine-cli/docker_container_inspect.yaml
@@ -5,25 +5,42 @@ usage: docker container inspect [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: format
- shorthand: f
- value_type: string
- description: Format the output using the given Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: size
- shorthand: s
- value_type: bool
- default_value: "false"
- description: Display total file sizes
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ shorthand: f
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: size
+ shorthand: s
+ value_type: bool
+ default_value: "false"
+ description: Display total file sizes
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_kill.yaml b/_data/engine-cli/docker_container_kill.yaml
index 44c184add6..f069f0227c 100644
--- a/_data/engine-cli/docker_container_kill.yaml
+++ b/_data/engine-cli/docker_container_kill.yaml
@@ -1,20 +1,32 @@
command: docker container kill
+aliases: docker container kill, docker kill
short: Kill one or more running containers
-long: Kill one or more running containers
+long: See [docker kill](kill.md) for more information.
usage: docker container kill [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: signal
- shorthand: s
- value_type: string
- default_value: KILL
- description: Signal to send to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: signal
+ shorthand: s
+ value_type: string
+ description: Signal to send to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_logs.yaml b/_data/engine-cli/docker_container_logs.yaml
index f895b5c6af..b21f45a4ba 100644
--- a/_data/engine-cli/docker_container_logs.yaml
+++ b/_data/engine-cli/docker_container_logs.yaml
@@ -1,68 +1,86 @@
command: docker container logs
+aliases: docker container logs, docker logs
short: Fetch the logs of a container
-long: Fetch the logs of a container
+long: See [docker logs](logs.md) for more information.
usage: docker container logs [OPTIONS] CONTAINER
pname: docker container
plink: docker_container.yaml
options:
-- option: details
- value_type: bool
- default_value: "false"
- description: Show extra details provided to logs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: follow
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Follow log output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: since
- value_type: string
- description: |
- Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tail
- shorthand: "n"
- value_type: string
- default_value: all
- description: Number of lines to show from the end of the logs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: timestamps
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Show timestamps
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: until
- value_type: string
- description: |
- Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
- deprecated: false
- min_api_version: "1.35"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: details
+ value_type: bool
+ default_value: "false"
+ description: Show extra details provided to logs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: follow
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Follow log output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: since
+ value_type: string
+ description: |
+ Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tail
+ shorthand: "n"
+ value_type: string
+ default_value: all
+ description: Number of lines to show from the end of the logs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: timestamps
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Show timestamps
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: until
+ value_type: string
+ description: |
+ Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.35"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_ls.yaml b/_data/engine-cli/docker_container_ls.yaml
index 3c7bd751c6..4a53f4b90e 100644
--- a/_data/engine-cli/docker_container_ls.yaml
+++ b/_data/engine-cli/docker_container_ls.yaml
@@ -1,87 +1,112 @@
command: docker container ls
-aliases: ps, list
+aliases: docker container ls, docker container list, docker container ps, docker ps
short: List containers
-long: List containers
+long: See [docker ps](ps.md) for more information.
usage: docker container ls [OPTIONS]
pname: docker container
plink: docker_container.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Show all containers (default shows just running)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: filter
- shorthand: f
- value_type: filter
- description: Filter output based on conditions provided
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Pretty-print containers using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: last
- shorthand: "n"
- value_type: int
- default_value: "-1"
- description: Show n last created containers (includes all states)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: latest
- shorthand: l
- value_type: bool
- default_value: "false"
- description: Show the latest created container (includes all states)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Don't truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only display container IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: size
- shorthand: s
- value_type: bool
- default_value: "false"
- description: Display total file sizes
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Show all containers (default shows just running)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: filter
+ shorthand: f
+ value_type: filter
+ description: Filter output based on conditions provided
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: last
+ shorthand: "n"
+ value_type: int
+ default_value: "-1"
+ description: Show n last created containers (includes all states)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: latest
+ shorthand: l
+ value_type: bool
+ default_value: "false"
+ description: Show the latest created container (includes all states)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Don't truncate output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only display container IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: size
+ shorthand: s
+ value_type: bool
+ default_value: "false"
+ description: Display total file sizes
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_pause.yaml b/_data/engine-cli/docker_container_pause.yaml
index dd28f672aa..2840a24484 100644
--- a/_data/engine-cli/docker_container_pause.yaml
+++ b/_data/engine-cli/docker_container_pause.yaml
@@ -1,9 +1,21 @@
command: docker container pause
+aliases: docker container pause, docker pause
short: Pause all processes within one or more containers
-long: Pause all processes within one or more containers
+long: See [docker pause](pause.md) for more information.
usage: docker container pause CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_port.yaml b/_data/engine-cli/docker_container_port.yaml
index e211a449a3..03c567fa2e 100644
--- a/_data/engine-cli/docker_container_port.yaml
+++ b/_data/engine-cli/docker_container_port.yaml
@@ -1,9 +1,21 @@
command: docker container port
+aliases: docker container port, docker port
short: List port mappings or a specific mapping for the container
-long: List port mappings or a specific mapping for the container
+long: See [docker port](port.md) for more information.
usage: docker container port CONTAINER [PRIVATE_PORT[/PROTO]]
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_prune.yaml b/_data/engine-cli/docker_container_prune.yaml
index db52af03d1..8819637102 100644
--- a/_data/engine-cli/docker_container_prune.yaml
+++ b/_data/engine-cli/docker_container_prune.yaml
@@ -5,108 +5,122 @@ usage: docker container prune [OPTIONS]
pname: docker container
plink: docker_container.yaml
options:
-- option: filter
- value_type: filter
- description: Provide filter values (e.g. 'until=')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Do not prompt for confirmation
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: filter
+ value_type: filter
+ description: Provide filter values (e.g. `until=`)
+ details_url: '#filter'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Do not prompt for confirmation
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Prune containers
+ ### Prune containers
- ```console
- $ docker container prune
- WARNING! This will remove all stopped containers.
- Are you sure you want to continue? [y/N] y
- Deleted Containers:
- 4a7f7eebae0f63178aff7eb0aa39cd3f0627a203ab2df258c1a00b456cf20063
- f98f9c2aa1eaf727e4ec9c0283bc7d4aa4762fbdba7f26191f26c97f64090360
+ ```console
+ $ docker container prune
+ WARNING! This will remove all stopped containers.
+ Are you sure you want to continue? [y/N] y
+ Deleted Containers:
+ 4a7f7eebae0f63178aff7eb0aa39cd3f0627a203ab2df258c1a00b456cf20063
+ f98f9c2aa1eaf727e4ec9c0283bc7d4aa4762fbdba7f26191f26c97f64090360
- Total reclaimed space: 212 B
- ```
+ Total reclaimed space: 212 B
+ ```
- ### Filtering (--filter)
+ ### Filtering (--filter) {#filter}
- The filtering flag (`--filter`) format is of "key=value". If there is more
- than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
+ The filtering flag (`--filter`) format is of "key=value". If there is more
+ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
- The currently supported filters are:
+ The currently supported filters are:
- * until (``) - only remove containers created before given timestamp
- * label (`label=`, `label==`, `label!=`, or `label!==`) - only remove containers with (or without, in case `label!=...` is used) the specified labels.
+ * until (``) - only remove containers created before given timestamp
+ * label (`label=`, `label==`, `label!=`, or `label!==`) - only remove containers with (or without, in case `label!=...` is used) the specified labels.
- The `until` filter can be Unix timestamps, date formatted
- timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
- relative to the daemon machine’s time. Supported formats for date
- formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
- `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
- timezone on the daemon will be used if you do not provide either a `Z` or a
- `+-00:00` timezone offset at the end of the timestamp. When providing Unix
- timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
- that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
- seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
- fraction of a second no more than nine digits long.
+ The `until` filter can be Unix timestamps, date formatted
+ timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
+ relative to the daemon machine’s time. Supported formats for date
+ formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
+ `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
+ timezone on the daemon will be used if you do not provide either a `Z` or a
+ `+-00:00` timezone offset at the end of the timestamp. When providing Unix
+ timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
+ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
+ seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
+ fraction of a second no more than nine digits long.
- The `label` filter accepts two formats. One is the `label=...` (`label=` or `label==`),
- which removes containers with the specified labels. The other
- format is the `label!=...` (`label!=` or `label!==`), which removes
- containers without the specified labels.
+ The `label` filter accepts two formats. One is the `label=...` (`label=` or `label==`),
+ which removes containers with the specified labels. The other
+ format is the `label!=...` (`label!=` or `label!==`), which removes
+ containers without the specified labels.
- The following removes containers created more than 5 minutes ago:
+ The following removes containers created more than 5 minutes ago:
- ```console
- $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
+ ```console
+ $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
- CONTAINER ID IMAGE COMMAND CREATED AT STATUS
- 61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 41 seconds ago
- 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 12 minutes ago
+ CONTAINER ID IMAGE COMMAND CREATED AT STATUS
+ 61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 41 seconds ago
+ 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 12 minutes ago
- $ docker container prune --force --filter "until=5m"
+ $ docker container prune --force --filter "until=5m"
- Deleted Containers:
- 53a9bc23a5168b6caa2bfbefddf1b30f93c7ad57f3dec271fd32707497cb9369
+ Deleted Containers:
+ 53a9bc23a5168b6caa2bfbefddf1b30f93c7ad57f3dec271fd32707497cb9369
- Total reclaimed space: 25 B
+ Total reclaimed space: 25 B
- $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
+ $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
- CONTAINER ID IMAGE COMMAND CREATED AT STATUS
- 61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 44 seconds ago
- ```
+ CONTAINER ID IMAGE COMMAND CREATED AT STATUS
+ 61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 44 seconds ago
+ ```
- The following removes containers created before `2017-01-04T13:10:00`:
+ The following removes containers created before `2017-01-04T13:10:00`:
- ```console
- $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
+ ```console
+ $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
- CONTAINER ID IMAGE COMMAND CREATED AT STATUS
- 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 7 minutes ago
- 4a75091a6d61 busybox "sh" 2017-01-04 13:09:53 -0800 PST Exited (0) 9 minutes ago
+ CONTAINER ID IMAGE COMMAND CREATED AT STATUS
+ 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 7 minutes ago
+ 4a75091a6d61 busybox "sh" 2017-01-04 13:09:53 -0800 PST Exited (0) 9 minutes ago
- $ docker container prune --force --filter "until=2017-01-04T13:10:00"
+ $ docker container prune --force --filter "until=2017-01-04T13:10:00"
- Deleted Containers:
- 4a75091a6d618526fcd8b33ccd6e5928ca2a64415466f768a6180004b0c72c6c
+ Deleted Containers:
+ 4a75091a6d618526fcd8b33ccd6e5928ca2a64415466f768a6180004b0c72c6c
- Total reclaimed space: 27 B
+ Total reclaimed space: 27 B
- $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
+ $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
- CONTAINER ID IMAGE COMMAND CREATED AT STATUS
- 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 9 minutes ago
- ```
+ CONTAINER ID IMAGE COMMAND CREATED AT STATUS
+ 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 9 minutes ago
+ ```
deprecated: false
min_api_version: "1.25"
experimental: false
diff --git a/_data/engine-cli/docker_container_rename.yaml b/_data/engine-cli/docker_container_rename.yaml
index 088cfe0119..c6a144fdef 100644
--- a/_data/engine-cli/docker_container_rename.yaml
+++ b/_data/engine-cli/docker_container_rename.yaml
@@ -1,9 +1,21 @@
command: docker container rename
+aliases: docker container rename, docker rename
short: Rename a container
-long: Rename a container
+long: See [docker rename](rename.md) for more information.
usage: docker container rename CONTAINER NEW_NAME
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_restart.yaml b/_data/engine-cli/docker_container_restart.yaml
index 74d8bbac86..a63b75b3f5 100644
--- a/_data/engine-cli/docker_container_restart.yaml
+++ b/_data/engine-cli/docker_container_restart.yaml
@@ -1,20 +1,43 @@
command: docker container restart
+aliases: docker container restart, docker restart
short: Restart one or more containers
-long: Restart one or more containers
+long: See [docker restart](restart.md) for more information.
usage: docker container restart [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: time
- shorthand: t
- value_type: int
- default_value: "10"
- description: Seconds to wait for stop before killing the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: signal
+ shorthand: s
+ value_type: string
+ description: Signal to send to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: time
+ shorthand: t
+ value_type: int
+ default_value: "0"
+ description: Seconds to wait before killing the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_rm.yaml b/_data/engine-cli/docker_container_rm.yaml
index cce60569f6..933c3a5802 100644
--- a/_data/engine-cli/docker_container_rm.yaml
+++ b/_data/engine-cli/docker_container_rm.yaml
@@ -1,40 +1,55 @@
command: docker container rm
+aliases: docker container rm, docker container remove, docker rm
short: Remove one or more containers
-long: Remove one or more containers
+long: See [docker rm](rm.md) for more information.
usage: docker container rm [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Force the removal of a running container (uses SIGKILL)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link
- shorthand: l
- value_type: bool
- default_value: "false"
- description: Remove the specified link
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volumes
- shorthand: v
- value_type: bool
- default_value: "false"
- description: Remove anonymous volumes associated with the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Force the removal of a running container (uses SIGKILL)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link
+ shorthand: l
+ value_type: bool
+ default_value: "false"
+ description: Remove the specified link
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volumes
+ shorthand: v
+ value_type: bool
+ default_value: "false"
+ description: Remove anonymous volumes associated with the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_run.yaml b/_data/engine-cli/docker_container_run.yaml
index e98cfeec6d..bebe358087 100644
--- a/_data/engine-cli/docker_container_run.yaml
+++ b/_data/engine-cli/docker_container_run.yaml
@@ -1,918 +1,1030 @@
command: docker container run
-short: Run a command in a new container
-long: Run a command in a new container
+aliases: docker container run, docker run
+short: Create and run a new container from an image
+long: See [docker run](run.md) for more information.
usage: docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]
pname: docker container
plink: docker_container.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: attach
- shorthand: a
- value_type: list
- description: Attach to STDIN, STDOUT or STDERR
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight
- value_type: uint16
- default_value: "0"
- description: |
- Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight-device
- value_type: list
- default_value: '[]'
- description: Block IO weight (relative device weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-add
- value_type: list
- description: Add Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-drop
- value_type: list
- description: Drop Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroupns
- value_type: string
- description: |-
- Cgroup namespace to use (host|private)
- 'host': Run the container in the Docker host's cgroup namespace
- 'private': Run the container in its own private cgroup namespace
- '': Use the cgroup namespace as configured by the
- default-cgroupns-mode option on the daemon (default)
- deprecated: false
- min_api_version: "1.41"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cidfile
- value_type: string
- description: Write the container ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-count
- value_type: int64
- default_value: "0"
- description: CPU count (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-percent
- value_type: int64
- default_value: "0"
- description: CPU percent (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-period
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time period in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-runtime
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time runtime in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpus
- value_type: decimal
- description: Number of CPUs
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: detach
- shorthand: d
- value_type: bool
- default_value: "false"
- description: Run container in background and print container ID
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device
- value_type: list
- description: Add a host device to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-cgroup-rule
- value_type: list
- description: Add a rule to the cgroup allowed devices list
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-bps
- value_type: list
- default_value: '[]'
- description: Limit read rate (bytes per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-iops
- value_type: list
- default_value: '[]'
- description: Limit read rate (IO per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-bps
- value_type: list
- default_value: '[]'
- description: Limit write rate (bytes per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-iops
- value_type: list
- default_value: '[]'
- description: Limit write rate (IO per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns
- value_type: list
- description: Set custom DNS servers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-opt
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-option
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-search
- value_type: list
- description: Set custom DNS search domains
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: domainname
- value_type: string
- description: Container NIS domain name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: entrypoint
- value_type: string
- description: Overwrite the default ENTRYPOINT of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env
- shorthand: e
- value_type: list
- description: Set environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env-file
- value_type: list
- description: Read in a file of environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: expose
- value_type: list
- description: Expose a port or a range of ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: gpus
- value_type: gpu-request
- description: GPU devices to add to the container ('all' to pass all GPUs)
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: group-add
- value_type: list
- description: Add additional groups to join
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-cmd
- value_type: string
- description: Command to run to check health
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-interval
- value_type: duration
- default_value: 0s
- description: Time between running the check (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-retries
- value_type: int
- default_value: "0"
- description: Consecutive failures needed to report unhealthy
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-start-period
- value_type: duration
- default_value: 0s
- description: |
- Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
- deprecated: false
- min_api_version: "1.29"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-timeout
- value_type: duration
- default_value: 0s
- description: |
- Maximum time to allow one check to run (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: help
- value_type: bool
- default_value: "false"
- description: Print usage
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: hostname
- shorthand: h
- value_type: string
- description: Container host name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: init
- value_type: bool
- default_value: "false"
- description: |
- Run an init inside the container that forwards signals and reaps processes
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Keep STDIN open even if not attached
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: io-maxbandwidth
- value_type: bytes
- default_value: "0"
- description: |
- Maximum IO bandwidth limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: io-maxiops
- value_type: uint64
- default_value: "0"
- description: Maximum IOps limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: ip
- value_type: string
- description: IPv4 address (e.g., 172.30.100.104)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ip6
- value_type: string
- description: IPv6 address (e.g., 2001:db8::33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ipc
- value_type: string
- description: IPC mode to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kernel-memory
- value_type: bytes
- default_value: "0"
- description: Kernel memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- shorthand: l
- value_type: list
- description: Set meta data on a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label-file
- value_type: list
- description: Read in a line delimited file of labels
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link
- value_type: list
- description: Add link to another container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link-local-ip
- value_type: list
- description: Container IPv4/IPv6 link-local addresses
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-driver
- value_type: string
- description: Logging driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-opt
- value_type: list
- description: Log driver options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mac-address
- value_type: string
- description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-reservation
- value_type: bytes
- default_value: "0"
- description: Memory soft limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swappiness
- value_type: int64
- default_value: "-1"
- description: Tune container memory swappiness (0 to 100)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mount
- value_type: mount
- description: Attach a filesystem mount to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: name
- value_type: string
- description: Assign a name to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-healthcheck
- value_type: bool
- default_value: "false"
- description: Disable any container-specified HEALTHCHECK
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-kill-disable
- value_type: bool
- default_value: "false"
- description: Disable OOM Killer
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-score-adj
- value_type: int
- default_value: "0"
- description: Tune host's OOM preferences (-1000 to 1000)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pid
- value_type: string
- description: PID namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pids-limit
- value_type: int64
- default_value: "0"
- description: Tune container pids limit (set -1 for unlimited)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.32"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: privileged
- value_type: bool
- default_value: "false"
- description: Give extended privileges to this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish
- shorthand: p
- value_type: list
- description: Publish a container's port(s) to the host
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish-all
- shorthand: P
- value_type: bool
- default_value: "false"
- description: Publish all exposed ports to random ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: string
- default_value: missing
- description: Pull image before running ("always"|"missing"|"never")
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: read-only
- value_type: bool
- default_value: "false"
- description: Mount the container's root filesystem as read only
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: restart
- value_type: string
- default_value: "no"
- description: Restart policy to apply when a container exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "false"
- description: Automatically remove the container when it exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: runtime
- value_type: string
- description: Runtime to use for this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: list
- description: Security Options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sig-proxy
- value_type: bool
- default_value: "true"
- description: Proxy received signals to the process
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-signal
- value_type: string
- default_value: SIGTERM
- description: Signal to stop a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-timeout
- value_type: int
- default_value: "0"
- description: Timeout (in seconds) to stop a container
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: storage-opt
- value_type: list
- description: Storage driver options for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sysctl
- value_type: map
- default_value: map[]
- description: Sysctl options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tmpfs
- value_type: list
- description: Mount a tmpfs directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tty
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Allocate a pseudo-TTY
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: user
- shorthand: u
- value_type: string
- description: 'Username or UID (format: [:])'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: userns
- value_type: string
- description: User namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: uts
- value_type: string
- description: UTS namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume
- shorthand: v
- value_type: list
- description: Bind mount a volume
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume-driver
- value_type: string
- description: Optional volume driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volumes-from
- value_type: list
- description: Mount volumes from the specified container(s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: workdir
- shorthand: w
- value_type: string
- description: Working directory inside the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (host:ip)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: attach
+ shorthand: a
+ value_type: list
+ description: Attach to STDIN, STDOUT or STDERR
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight
+ value_type: uint16
+ default_value: "0"
+ description: |
+ Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight-device
+ value_type: list
+ default_value: '[]'
+ description: Block IO weight (relative device weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-add
+ value_type: list
+ description: Add Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-drop
+ value_type: list
+ description: Drop Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroupns
+ value_type: string
+ description: |-
+ Cgroup namespace to use (host|private)
+ 'host': Run the container in the Docker host's cgroup namespace
+ 'private': Run the container in its own private cgroup namespace
+ '': Use the cgroup namespace as configured by the
+ default-cgroupns-mode option on the daemon (default)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.41"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cidfile
+ value_type: string
+ description: Write the container ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-count
+ value_type: int64
+ default_value: "0"
+ description: CPU count (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-percent
+ value_type: int64
+ default_value: "0"
+ description: CPU percent (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time period in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-runtime
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time runtime in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpus
+ value_type: decimal
+ description: Number of CPUs
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: detach
+ shorthand: d
+ value_type: bool
+ default_value: "false"
+ description: Run container in background and print container ID
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device
+ value_type: list
+ description: Add a host device to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-cgroup-rule
+ value_type: list
+ description: Add a rule to the cgroup allowed devices list
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (bytes per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (IO per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (bytes per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (IO per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns
+ value_type: list
+ description: Set custom DNS servers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-opt
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-option
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-search
+ value_type: list
+ description: Set custom DNS search domains
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: domainname
+ value_type: string
+ description: Container NIS domain name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: entrypoint
+ value_type: string
+ description: Overwrite the default ENTRYPOINT of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env
+ shorthand: e
+ value_type: list
+ description: Set environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env-file
+ value_type: list
+ description: Read in a file of environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: expose
+ value_type: list
+ description: Expose a port or a range of ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: gpus
+ value_type: gpu-request
+ description: GPU devices to add to the container ('all' to pass all GPUs)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.40"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: group-add
+ value_type: list
+ description: Add additional groups to join
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-cmd
+ value_type: string
+ description: Command to run to check health
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-interval
+ value_type: duration
+ default_value: 0s
+ description: Time between running the check (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-retries
+ value_type: int
+ default_value: "0"
+ description: Consecutive failures needed to report unhealthy
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-start-period
+ value_type: duration
+ default_value: 0s
+ description: |
+ Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.29"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-timeout
+ value_type: duration
+ default_value: 0s
+ description: Maximum time to allow one check to run (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: hostname
+ shorthand: h
+ value_type: string
+ description: Container host name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: init
+ value_type: bool
+ default_value: "false"
+ description: |
+ Run an init inside the container that forwards signals and reaps processes
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Keep STDIN open even if not attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: io-maxbandwidth
+ value_type: bytes
+ default_value: "0"
+ description: Maximum IO bandwidth limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: io-maxiops
+ value_type: uint64
+ default_value: "0"
+ description: Maximum IOps limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: ip
+ value_type: string
+ description: IPv4 address (e.g., 172.30.100.104)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ip6
+ value_type: string
+ description: IPv6 address (e.g., 2001:db8::33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ipc
+ value_type: string
+ description: IPC mode to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kernel-memory
+ value_type: bytes
+ default_value: "0"
+ description: Kernel memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ shorthand: l
+ value_type: list
+ description: Set meta data on a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label-file
+ value_type: list
+ description: Read in a line delimited file of labels
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link
+ value_type: list
+ description: Add link to another container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link-local-ip
+ value_type: list
+ description: Container IPv4/IPv6 link-local addresses
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-driver
+ value_type: string
+ description: Logging driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-opt
+ value_type: list
+ description: Log driver options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mac-address
+ value_type: string
+ description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-reservation
+ value_type: bytes
+ default_value: "0"
+ description: Memory soft limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: |
+ Swap limit equal to memory plus swap: '-1' to enable unlimited swap
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swappiness
+ value_type: int64
+ default_value: "-1"
+ description: Tune container memory swappiness (0 to 100)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mount
+ value_type: mount
+ description: Attach a filesystem mount to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: name
+ value_type: string
+ description: Assign a name to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-healthcheck
+ value_type: bool
+ default_value: "false"
+ description: Disable any container-specified HEALTHCHECK
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-kill-disable
+ value_type: bool
+ default_value: "false"
+ description: Disable OOM Killer
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-score-adj
+ value_type: int
+ default_value: "0"
+ description: Tune host's OOM preferences (-1000 to 1000)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pid
+ value_type: string
+ description: PID namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pids-limit
+ value_type: int64
+ default_value: "0"
+ description: Tune container pids limit (set -1 for unlimited)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.32"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: privileged
+ value_type: bool
+ default_value: "false"
+ description: Give extended privileges to this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish
+ shorthand: p
+ value_type: list
+ description: Publish a container's port(s) to the host
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish-all
+ shorthand: P
+ value_type: bool
+ default_value: "false"
+ description: Publish all exposed ports to random ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: string
+ default_value: missing
+ description: Pull image before running (`always`, `missing`, `never`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the pull output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: read-only
+ value_type: bool
+ default_value: "false"
+ description: Mount the container's root filesystem as read only
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: restart
+ value_type: string
+ default_value: "no"
+ description: Restart policy to apply when a container exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "false"
+ description: Automatically remove the container when it exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: runtime
+ value_type: string
+ description: Runtime to use for this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: list
+ description: Security Options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of /dev/shm
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sig-proxy
+ value_type: bool
+ default_value: "true"
+ description: Proxy received signals to the process
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-signal
+ value_type: string
+ description: Signal to stop the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-timeout
+ value_type: int
+ default_value: "0"
+ description: Timeout (in seconds) to stop a container
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: storage-opt
+ value_type: list
+ description: Storage driver options for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sysctl
+ value_type: map
+ default_value: map[]
+ description: Sysctl options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tmpfs
+ value_type: list
+ description: Mount a tmpfs directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tty
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Allocate a pseudo-TTY
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: user
+ shorthand: u
+ value_type: string
+ description: 'Username or UID (format: [:])'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: userns
+ value_type: string
+ description: User namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: uts
+ value_type: string
+ description: UTS namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume
+ shorthand: v
+ value_type: list
+ description: Bind mount a volume
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume-driver
+ value_type: string
+ description: Optional volume driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volumes-from
+ value_type: list
+ description: Mount volumes from the specified container(s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: workdir
+ shorthand: w
+ value_type: string
+ description: Working directory inside the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_start.yaml b/_data/engine-cli/docker_container_start.yaml
index e31d6be262..e01f2b8612 100644
--- a/_data/engine-cli/docker_container_start.yaml
+++ b/_data/engine-cli/docker_container_start.yaml
@@ -1,56 +1,73 @@
command: docker container start
+aliases: docker container start, docker start
short: Start one or more stopped containers
-long: Start one or more stopped containers
+long: See [docker start](start.md) for more information.
usage: docker container start [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: attach
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Attach STDOUT/STDERR and forward signals
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: checkpoint
- value_type: string
- description: Restore from this checkpoint
- deprecated: false
- experimental: true
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: linux
-- option: checkpoint-dir
- value_type: string
- description: Use a custom checkpoint storage directory
- deprecated: false
- experimental: true
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: linux
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Attach container's STDIN
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: attach
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Attach STDOUT/STDERR and forward signals
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: checkpoint
+ value_type: string
+ description: Restore from this checkpoint
+ deprecated: false
+ hidden: false
+ experimental: true
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: linux
+ - option: checkpoint-dir
+ value_type: string
+ description: Use a custom checkpoint storage directory
+ deprecated: false
+ hidden: false
+ experimental: true
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: linux
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Attach container's STDIN
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_stats.yaml b/_data/engine-cli/docker_container_stats.yaml
index d8f081e8b5..c0311eaee0 100644
--- a/_data/engine-cli/docker_container_stats.yaml
+++ b/_data/engine-cli/docker_container_stats.yaml
@@ -1,46 +1,68 @@
command: docker container stats
+aliases: docker container stats, docker stats
short: Display a live stream of container(s) resource usage statistics
-long: Display a live stream of container(s) resource usage statistics
+long: See [docker stats](stats.md) for more information.
usage: docker container stats [OPTIONS] [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Show all containers (default shows just running)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Pretty-print images using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-stream
- value_type: bool
- default_value: "false"
- description: Disable streaming stats and only pull the first result
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Do not truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Show all containers (default shows just running)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-stream
+ value_type: bool
+ default_value: "false"
+ description: Disable streaming stats and only pull the first result
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Do not truncate output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_stop.yaml b/_data/engine-cli/docker_container_stop.yaml
index 80fa23dc99..5310d0df2f 100644
--- a/_data/engine-cli/docker_container_stop.yaml
+++ b/_data/engine-cli/docker_container_stop.yaml
@@ -1,20 +1,43 @@
command: docker container stop
+aliases: docker container stop, docker stop
short: Stop one or more running containers
-long: Stop one or more running containers
+long: See [docker stop](stop.md) for more information.
usage: docker container stop [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: time
- shorthand: t
- value_type: int
- default_value: "10"
- description: Seconds to wait for stop before killing it
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: signal
+ shorthand: s
+ value_type: string
+ description: Signal to send to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: time
+ shorthand: t
+ value_type: int
+ default_value: "0"
+ description: Seconds to wait before killing the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_top.yaml b/_data/engine-cli/docker_container_top.yaml
index c35656326d..59477cc37f 100644
--- a/_data/engine-cli/docker_container_top.yaml
+++ b/_data/engine-cli/docker_container_top.yaml
@@ -1,9 +1,21 @@
command: docker container top
+aliases: docker container top, docker top
short: Display the running processes of a container
-long: Display the running processes of a container
+long: See [docker top](top.md) for more information.
usage: docker container top CONTAINER [ps OPTIONS]
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_unpause.yaml b/_data/engine-cli/docker_container_unpause.yaml
index fcd8612ee6..0c0fdf5dcc 100644
--- a/_data/engine-cli/docker_container_unpause.yaml
+++ b/_data/engine-cli/docker_container_unpause.yaml
@@ -1,9 +1,21 @@
command: docker container unpause
+aliases: docker container unpause, docker unpause
short: Unpause all processes within one or more containers
-long: Unpause all processes within one or more containers
+long: See [docker unpause](unpause.md) for more information.
usage: docker container unpause CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_update.yaml b/_data/engine-cli/docker_container_update.yaml
index 252ce31269..9bf0e67886 100644
--- a/_data/engine-cli/docker_container_update.yaml
+++ b/_data/engine-cli/docker_container_update.yaml
@@ -1,149 +1,175 @@
command: docker container update
+aliases: docker container update, docker update
short: Update configuration of one or more containers
-long: Update configuration of one or more containers
+long: See [docker update](update.md) for more information.
usage: docker container update [OPTIONS] CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
options:
-- option: blkio-weight
- value_type: uint16
- default_value: "0"
- description: |
- Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-period
- value_type: int64
- default_value: "0"
- description: Limit the CPU real-time period in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-runtime
- value_type: int64
- default_value: "0"
- description: Limit the CPU real-time runtime in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpus
- value_type: decimal
- description: Number of CPUs
- deprecated: false
- min_api_version: "1.29"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kernel-memory
- value_type: bytes
- default_value: "0"
- description: Kernel memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-reservation
- value_type: bytes
- default_value: "0"
- description: Memory soft limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pids-limit
- value_type: int64
- default_value: "0"
- description: Tune container pids limit (set -1 for unlimited)
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: restart
- value_type: string
- description: Restart policy to apply when a container exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: blkio-weight
+ value_type: uint16
+ default_value: "0"
+ description: |
+ Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-period
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU real-time period in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-runtime
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU real-time runtime in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpus
+ value_type: decimal
+ description: Number of CPUs
+ deprecated: false
+ hidden: false
+ min_api_version: "1.29"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kernel-memory
+ value_type: bytes
+ default_value: "0"
+ description: Kernel memory limit (deprecated)
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-reservation
+ value_type: bytes
+ default_value: "0"
+ description: Memory soft limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pids-limit
+ value_type: int64
+ default_value: "0"
+ description: Tune container pids limit (set -1 for unlimited)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.40"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: restart
+ value_type: string
+ description: Restart policy to apply when a container exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_container_wait.yaml b/_data/engine-cli/docker_container_wait.yaml
index 9edf8772ba..5ea9ee5a81 100644
--- a/_data/engine-cli/docker_container_wait.yaml
+++ b/_data/engine-cli/docker_container_wait.yaml
@@ -1,9 +1,21 @@
command: docker container wait
+aliases: docker container wait, docker wait
short: Block until one or more containers stop, then print their exit codes
-long: Block until one or more containers stop, then print their exit codes
+long: See [docker wait](wait.md) for more information.
usage: docker container wait CONTAINER [CONTAINER...]
pname: docker container
plink: docker_container.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context.yaml b/_data/engine-cli/docker_context.yaml
index 720419555c..0cf548d585 100644
--- a/_data/engine-cli/docker_context.yaml
+++ b/_data/engine-cli/docker_context.yaml
@@ -5,23 +5,36 @@ usage: docker context
pname: docker
plink: docker.yaml
cname:
-- docker context create
-- docker context export
-- docker context import
-- docker context inspect
-- docker context ls
-- docker context rm
-- docker context update
-- docker context use
+ - docker context create
+ - docker context export
+ - docker context import
+ - docker context inspect
+ - docker context ls
+ - docker context rm
+ - docker context show
+ - docker context update
+ - docker context use
clink:
-- docker_context_create.yaml
-- docker_context_export.yaml
-- docker_context_import.yaml
-- docker_context_inspect.yaml
-- docker_context_ls.yaml
-- docker_context_rm.yaml
-- docker_context_update.yaml
-- docker_context_use.yaml
+ - docker_context_create.yaml
+ - docker_context_export.yaml
+ - docker_context_import.yaml
+ - docker_context_inspect.yaml
+ - docker_context_ls.yaml
+ - docker_context_rm.yaml
+ - docker_context_show.yaml
+ - docker_context_update.yaml
+ - docker_context_use.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_create.yaml b/_data/engine-cli/docker_context_create.yaml
index 562ee3c474..91fa827796 100644
--- a/_data/engine-cli/docker_context_create.yaml
+++ b/_data/engine-cli/docker_context_create.yaml
@@ -1,122 +1,124 @@
command: docker context create
short: Create a context
long: |-
- Creates a new `context`. This allows you to quickly switch the cli
- configuration to connect to different clusters or single nodes.
+ Creates a new `context`. This allows you to quickly switch the cli
+ configuration to connect to different clusters or single nodes.
usage: docker context create [OPTIONS] CONTEXT
pname: docker context
plink: docker_context.yaml
options:
-- option: default-stack-orchestrator
- value_type: string
- description: |
- Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)
- deprecated: true
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: description
- value_type: string
- description: Description of the context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: docker
- value_type: stringToString
- default_value: '[]'
- description: set the docker endpoint
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: from
- value_type: string
- description: create context from a named context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kubernetes
- value_type: stringToString
- default_value: '[]'
- description: set the kubernetes endpoint
- deprecated: true
- experimental: false
- experimentalcli: false
- kubernetes: true
- swarm: false
+ - option: default-stack-orchestrator
+ value_type: string
+ description: |
+ Default orchestrator for stack operations to use with this context (`swarm`, `kubernetes`, `all`)
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: description
+ value_type: string
+ description: Description of the context
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: docker
+ value_type: stringToString
+ default_value: '[]'
+ description: set the docker endpoint
+ details_url: '#docker'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: from
+ value_type: string
+ description: create context from a named context
+ details_url: '#from'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kubernetes
+ value_type: stringToString
+ default_value: '[]'
+ description: set the kubernetes endpoint
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: true
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Create a context with a docker and kubernetes endpoint
+ ### Create a context with a docker endpoint (--docker) {#docker}
- To create a context from scratch provide the docker and, if required,
- kubernetes options. The example below creates the context `my-context`
- with a docker endpoint of `/var/run/docker.sock` and a kubernetes configuration
- sourced from the file `/home/me/my-kube-config`:
+ To create a context from scratch provide the docker and, if required,
+ kubernetes options. The example below creates the context `my-context`
+ with a docker endpoint of `/var/run/docker.sock`:
- ```console
- $ docker context create \
- --docker host=unix:///var/run/docker.sock \
- --kubernetes config-file=/home/me/my-kube-config \
- my-context
- ```
+ ```console
+ $ docker context create \
+ --docker host=unix:///var/run/docker.sock \
+ my-context
+ ```
- ### Create a context based on an existing context (--from)
+ ### Create a context based on an existing context (--from) {#from}
- Use the `--from=` option to create a new context from
- an existing context. The example below creates a new context named `my-context`
- from the existing context `existing-context`:
+ Use the `--from=` option to create a new context from
+ an existing context. The example below creates a new context named `my-context`
+ from the existing context `existing-context`:
- ```console
- $ docker context create --from existing-context my-context
- ```
+ ```console
+ $ docker context create --from existing-context my-context
+ ```
- If the `--from` option is not set, the `context` is created from the current context:
+ If the `--from` option is not set, the `context` is created from the current context:
- ```console
- $ docker context create my-context
- ```
+ ```console
+ $ docker context create my-context
+ ```
- This can be used to create a context out of an existing `DOCKER_HOST` based script:
+ This can be used to create a context out of an existing `DOCKER_HOST` based script:
- ```console
- $ source my-setup-script.sh
- $ docker context create my-context
- ```
+ ```console
+ $ source my-setup-script.sh
+ $ docker context create my-context
+ ```
- To source only the `docker` endpoint configuration from an existing context
- use the `--docker from=` option. The example below creates a
- new context named `my-context` using the docker endpoint configuration from
- the existing context `existing-context` and a kubernetes configuration sourced
- from the file `/home/me/my-kube-config`:
+ To source the `docker` endpoint configuration from an existing context
+ use the `--docker from=` option. The example below creates a
+ new context named `my-context` using the docker endpoint configuration from
+ the existing context `existing-context`:
- ```console
- $ docker context create \
- --docker from=existing-context \
- --kubernetes config-file=/home/me/my-kube-config \
- my-context
- ```
+ ```console
+ $ docker context create \
+ --docker from=existing-context \
+ my-context
+ ```
- To source only the `kubernetes` configuration from an existing context use the
- `--kubernetes from=` option. The example below creates a new
- context named `my-context` using the kuberentes configuration from the existing
- context `existing-context` and a docker endpoint of `/var/run/docker.sock`:
+ Docker endpoints configurations, as well as the description can be modified with
+ `docker context update`.
- ```console
- $ docker context create \
- --docker host=unix:///var/run/docker.sock \
- --kubernetes from=existing-context \
- my-context
- ```
-
- Docker and Kubernetes endpoints configurations, as well as default stack
- orchestrator and description can be modified with `docker context update`.
-
- Refer to the [`docker context update` reference](context_update.md) for details.
+ Refer to the [`docker context update` reference](context_update.md) for details.
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_export.yaml b/_data/engine-cli/docker_context_export.yaml
index 551815559a..4971b08ae7 100644
--- a/_data/engine-cli/docker_context_export.yaml
+++ b/_data/engine-cli/docker_context_export.yaml
@@ -1,23 +1,39 @@
command: docker context export
-short: Export a context to a tar or kubeconfig file
+short: Export a context to a tar archive FILE or a tar stream on STDOUT.
long: |-
- Exports a context in a file that can then be used with `docker context import`
- (or with `kubectl` if `--kubeconfig` is set). Default output filename is
- `.dockercontext`, or `.kubeconfig` if `--kubeconfig` is set.
- To export to `STDOUT`, you can run `docker context export my-context -`.
+ Exports a context to a file that can then be used with `docker context import`.
+
+ The default output filename is `.dockercontext`. To export to `STDOUT`,
+ use `-` as filename, for example:
+
+ ```console
+ $ docker context export my-context -
+ ```
usage: docker context export [OPTIONS] CONTEXT [FILE|-]
pname: docker context
plink: docker_context.yaml
options:
-- option: kubeconfig
- value_type: bool
- default_value: "false"
- description: Export as a kubeconfig file
- deprecated: true
- experimental: false
- experimentalcli: false
- kubernetes: true
- swarm: false
+ - option: kubeconfig
+ value_type: bool
+ default_value: "false"
+ description: Export as a kubeconfig file
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: true
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_import.yaml b/_data/engine-cli/docker_context_import.yaml
index da71caefbe..357cf0566d 100644
--- a/_data/engine-cli/docker_context_import.yaml
+++ b/_data/engine-cli/docker_context_import.yaml
@@ -1,11 +1,22 @@
command: docker context import
short: Import a context from a tar or zip file
long: |-
- Imports a context previously exported with `docker context export`. To import
- from stdin, use a hyphen (`-`) as filename.
+ Imports a context previously exported with `docker context export`. To import
+ from stdin, use a hyphen (`-`) as filename.
usage: docker context import CONTEXT FILE|-
pname: docker context
plink: docker_context.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_inspect.yaml b/_data/engine-cli/docker_context_inspect.yaml
index 6a4ef8809b..d78887930a 100644
--- a/_data/engine-cli/docker_context_inspect.yaml
+++ b/_data/engine-cli/docker_context_inspect.yaml
@@ -5,53 +5,58 @@ usage: docker context inspect [OPTIONS] [CONTEXT] [CONTEXT...]
pname: docker context
plink: docker_context.yaml
options:
-- option: format
- shorthand: f
- value_type: string
- description: Format the output using the given Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ shorthand: f
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Inspect a context by name
+ ### Inspect a context by name
- ```console
- $ docker context inspect "local+aks"
+ ```console
+ $ docker context inspect "local+aks"
- [
- {
- "Name": "local+aks",
- "Metadata": {
- "Description": "Local Docker Engine + Azure AKS endpoint",
- "StackOrchestrator": "kubernetes"
- },
- "Endpoints": {
- "docker": {
- "Host": "npipe:////./pipe/docker_engine",
- "SkipTLSVerify": false
+ [
+ {
+ "Name": "local+aks",
+ "Metadata": {
+ "Description": "Local Docker Engine",
+ "StackOrchestrator": "swarm"
},
- "kubernetes": {
- "Host": "https://simon-aks-***.hcp.uksouth.azmk8s.io:443",
- "SkipTLSVerify": false,
- "DefaultNamespace": "default"
+ "Endpoints": {
+ "docker": {
+ "Host": "npipe:////./pipe/docker_engine",
+ "SkipTLSVerify": false
+ }
+ },
+ "TLSMaterial": {},
+ "Storage": {
+ "MetadataPath": "C:\\Users\\simon\\.docker\\contexts\\meta\\cb6d08c0a1bfa5fe6f012e61a442788c00bed93f509141daff05f620fc54ddee",
+ "TLSPath": "C:\\Users\\simon\\.docker\\contexts\\tls\\cb6d08c0a1bfa5fe6f012e61a442788c00bed93f509141daff05f620fc54ddee"
}
- },
- "TLSMaterial": {
- "kubernetes": [
- "ca.pem",
- "cert.pem",
- "key.pem"
- ]
- },
- "Storage": {
- "MetadataPath": "C:\\Users\\simon\\.docker\\contexts\\meta\\cb6d08c0a1bfa5fe6f012e61a442788c00bed93f509141daff05f620fc54ddee",
- "TLSPath": "C:\\Users\\simon\\.docker\\contexts\\tls\\cb6d08c0a1bfa5fe6f012e61a442788c00bed93f509141daff05f620fc54ddee"
}
- }
- ]
- ```
+ ]
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_ls.yaml b/_data/engine-cli/docker_context_ls.yaml
index 54cce8be03..f5ee106c3b 100644
--- a/_data/engine-cli/docker_context_ls.yaml
+++ b/_data/engine-cli/docker_context_ls.yaml
@@ -1,41 +1,60 @@
command: docker context ls
-aliases: list
+aliases: docker context ls, docker context list
short: List contexts
long: List contexts
usage: docker context ls [OPTIONS]
pname: docker context
plink: docker_context.yaml
options:
-- option: format
- value_type: string
- description: Pretty-print contexts using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only show context names
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only show context names
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- Use `docker context ls` to print all contexts. The currently active context is
- indicated with an `*`:
+ Use `docker context ls` to print all contexts. The currently active context is
+ indicated with an `*`:
- ```console
- $ docker context ls
+ ```console
+ $ docker context ls
- NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
- default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
- production tcp:///prod.corp.example.com:2376
- staging tcp:///stage.corp.example.com:2376
- ```
+ NAME DESCRIPTION DOCKER ENDPOINT ORCHESTRATOR
+ default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
+ production tcp:///prod.corp.example.com:2376
+ staging tcp:///stage.corp.example.com:2376
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_rm.yaml b/_data/engine-cli/docker_context_rm.yaml
index f690a2e5c9..09a0a0b28a 100644
--- a/_data/engine-cli/docker_context_rm.yaml
+++ b/_data/engine-cli/docker_context_rm.yaml
@@ -1,21 +1,33 @@
command: docker context rm
-aliases: remove
+aliases: docker context rm, docker context remove
short: Remove one or more contexts
long: Remove one or more contexts
usage: docker context rm CONTEXT [CONTEXT...]
pname: docker context
plink: docker_context.yaml
options:
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Force the removal of a context in use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Force the removal of a context in use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_show.yaml b/_data/engine-cli/docker_context_show.yaml
new file mode 100644
index 0000000000..40ee887b05
--- /dev/null
+++ b/_data/engine-cli/docker_context_show.yaml
@@ -0,0 +1,66 @@
+command: docker context show
+short: Print the name of the current context
+long: |-
+ Print the name of the current context, possibly set by `DOCKER_CONTEXT` environment
+ variable or `--context` global option.
+usage: docker context show
+pname: docker context
+plink: docker_context.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+examples: |-
+ ### Print the current context
+
+ The following example prints the currently used [`docker context`](context.md):
+
+ ```console
+ $ docker context show'
+ default
+ ```
+
+ As an example, this output can be used to dynamically change your shell prompt
+ to indicate your active context. The example below illustrates how this output
+ could be used when using Bash as your shell.
+
+ Declare a function to obtain the current context in your `~/.bashrc`, and set
+ this command as your `PROMPT_COMMAND`
+
+ ```console
+ function docker_context_prompt() {
+ PS1="context: $(docker context show)> "
+ }
+
+ PROMPT_COMMAND=docker_context_prompt
+ ```
+
+ After reloading the `~/.bashrc`, the prompt now shows the currently selected
+ `docker context`:
+
+ ```console
+ $ source ~/.bashrc
+ context: default> docker context create --docker host=unix:///var/run/docker.sock my-context
+ my-context
+ Successfully created context "my-context"
+ context: default> docker context use my-context
+ my-context
+ Current context is now "my-context"
+ context: my-context> docker context use default
+ default
+ Current context is now "default"
+ context: default>
+ ```
+deprecated: false
+experimental: false
+experimentalcli: false
+kubernetes: false
+swarm: false
+
diff --git a/_data/engine-cli/docker_context_update.yaml b/_data/engine-cli/docker_context_update.yaml
index 1fb7dcdfcd..336257cf15 100644
--- a/_data/engine-cli/docker_context_update.yaml
+++ b/_data/engine-cli/docker_context_update.yaml
@@ -1,56 +1,71 @@
command: docker context update
short: Update a context
long: |-
- Updates an existing `context`.
- See [context create](context_create.md).
+ Updates an existing `context`.
+ See [context create](context_create.md).
usage: docker context update [OPTIONS] CONTEXT
pname: docker context
plink: docker_context.yaml
options:
-- option: default-stack-orchestrator
- value_type: string
- description: |
- Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)
- deprecated: true
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: description
- value_type: string
- description: Description of the context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: docker
- value_type: stringToString
- default_value: '[]'
- description: set the docker endpoint
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kubernetes
- value_type: stringToString
- default_value: '[]'
- description: set the kubernetes endpoint
- deprecated: true
- experimental: false
- experimentalcli: false
- kubernetes: true
- swarm: false
+ - option: default-stack-orchestrator
+ value_type: string
+ description: |
+ Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: description
+ value_type: string
+ description: Description of the context
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: docker
+ value_type: stringToString
+ default_value: '[]'
+ description: set the docker endpoint
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kubernetes
+ value_type: stringToString
+ default_value: '[]'
+ description: set the kubernetes endpoint
+ deprecated: true
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: true
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Update an existing context
+ ### Update an existing context
- ```console
- $ docker context update \
- --description "some description" \
- --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file" \
- my-context
- ```
+ ```console
+ $ docker context update \
+ --description "some description" \
+ --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file" \
+ my-context
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_context_use.yaml b/_data/engine-cli/docker_context_use.yaml
index 3a44c21b2f..f682c92606 100644
--- a/_data/engine-cli/docker_context_use.yaml
+++ b/_data/engine-cli/docker_context_use.yaml
@@ -1,12 +1,23 @@
command: docker context use
short: Set the current docker context
long: |-
- Set the default context to use, when `DOCKER_HOST`, `DOCKER_CONTEXT` environment
- variables and `--host`, `--context` global options are not set.
- To disable usage of contexts, you can use the special `default` context.
+ Set the default context to use, when `DOCKER_HOST`, `DOCKER_CONTEXT` environment
+ variables and `--host`, `--context` global options are not set.
+ To disable usage of contexts, you can use the special `default` context.
usage: docker context use CONTEXT
pname: docker context
plink: docker_context.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_cp.yaml b/_data/engine-cli/docker_cp.yaml
index 12eb2d1201..df0e65b37d 100644
--- a/_data/engine-cli/docker_cp.yaml
+++ b/_data/engine-cli/docker_cp.yaml
@@ -1,133 +1,160 @@
command: docker cp
+aliases: docker container cp, docker cp
short: Copy files/folders between a container and the local filesystem
long: |-
- The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`.
- You can copy from the container's file system to the local machine or the
- reverse, from the local filesystem to the container. If `-` is specified for
- either the `SRC_PATH` or `DEST_PATH`, you can also stream a tar archive from
- `STDIN` or to `STDOUT`. The `CONTAINER` can be a running or stopped container.
- The `SRC_PATH` or `DEST_PATH` can be a file or directory.
+ The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`.
+ You can copy from the container's file system to the local machine or the
+ reverse, from the local filesystem to the container. If `-` is specified for
+ either the `SRC_PATH` or `DEST_PATH`, you can also stream a tar archive from
+ `STDIN` or to `STDOUT`. The `CONTAINER` can be a running or stopped container.
+ The `SRC_PATH` or `DEST_PATH` can be a file or directory.
- The `docker cp` command assumes container paths are relative to the container's
- `/` (root) directory. This means supplying the initial forward slash is optional;
- The command sees `compassionate_darwin:/tmp/foo/myfile.txt` and
- `compassionate_darwin:tmp/foo/myfile.txt` as identical. Local machine paths can
- be an absolute or relative value. The command interprets a local machine's
- relative paths as relative to the current working directory where `docker cp` is
- run.
+ The `docker cp` command assumes container paths are relative to the container's
+ `/` (root) directory. This means supplying the initial forward slash is optional;
+ The command sees `compassionate_darwin:/tmp/foo/myfile.txt` and
+ `compassionate_darwin:tmp/foo/myfile.txt` as identical. Local machine paths can
+ be an absolute or relative value. The command interprets a local machine's
+ relative paths as relative to the current working directory where `docker cp` is
+ run.
- The `cp` command behaves like the Unix `cp -a` command in that directories are
- copied recursively with permissions preserved if possible. Ownership is set to
- the user and primary group at the destination. For example, files copied to a
- container are created with `UID:GID` of the root user. Files copied to the local
- machine are created with the `UID:GID` of the user which invoked the `docker cp`
- command. However, if you specify the `-a` option, `docker cp` sets the ownership
- to the user and primary group at the source.
- If you specify the `-L` option, `docker cp` follows any symbolic link
- in the `SRC_PATH`. `docker cp` does *not* create parent directories for
- `DEST_PATH` if they do not exist.
+ The `cp` command behaves like the Unix `cp -a` command in that directories are
+ copied recursively with permissions preserved if possible. Ownership is set to
+ the user and primary group at the destination. For example, files copied to a
+ container are created with `UID:GID` of the root user. Files copied to the local
+ machine are created with the `UID:GID` of the user which invoked the `docker cp`
+ command. However, if you specify the `-a` option, `docker cp` sets the ownership
+ to the user and primary group at the source.
+ If you specify the `-L` option, `docker cp` follows any symbolic link
+ in the `SRC_PATH`. `docker cp` does *not* create parent directories for
+ `DEST_PATH` if they do not exist.
- Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
- argument of `DEST_PATH`, the behavior is as follows:
+ Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
+ argument of `DEST_PATH`, the behavior is as follows:
- - `SRC_PATH` specifies a file
- - `DEST_PATH` does not exist
- - the file is saved to a file created at `DEST_PATH`
- - `DEST_PATH` does not exist and ends with `/`
- - Error condition: the destination directory must exist.
- - `DEST_PATH` exists and is a file
- - the destination is overwritten with the source file's contents
- - `DEST_PATH` exists and is a directory
- - the file is copied into this directory using the basename from
- `SRC_PATH`
- - `SRC_PATH` specifies a directory
- - `DEST_PATH` does not exist
- - `DEST_PATH` is created as a directory and the *contents* of the source
- directory are copied into this directory
- - `DEST_PATH` exists and is a file
- - Error condition: cannot copy a directory to a file
- - `DEST_PATH` exists and is a directory
- - `SRC_PATH` does not end with `/.` (that is: _slash_ followed by _dot_)
- - the source directory is copied into this directory
- - `SRC_PATH` does end with `/.` (that is: _slash_ followed by _dot_)
- - the *content* of the source directory is copied into this
- directory
+ - `SRC_PATH` specifies a file
+ - `DEST_PATH` does not exist
+ - the file is saved to a file created at `DEST_PATH`
+ - `DEST_PATH` does not exist and ends with `/`
+ - Error condition: the destination directory must exist.
+ - `DEST_PATH` exists and is a file
+ - the destination is overwritten with the source file's contents
+ - `DEST_PATH` exists and is a directory
+ - the file is copied into this directory using the basename from
+ `SRC_PATH`
+ - `SRC_PATH` specifies a directory
+ - `DEST_PATH` does not exist
+ - `DEST_PATH` is created as a directory and the *contents* of the source
+ directory are copied into this directory
+ - `DEST_PATH` exists and is a file
+ - Error condition: cannot copy a directory to a file
+ - `DEST_PATH` exists and is a directory
+ - `SRC_PATH` does not end with `/.` (that is: _slash_ followed by _dot_)
+ - the source directory is copied into this directory
+ - `SRC_PATH` does end with `/.` (that is: _slash_ followed by _dot_)
+ - the *content* of the source directory is copied into this
+ directory
- The command requires `SRC_PATH` and `DEST_PATH` to exist according to the above
- rules. If `SRC_PATH` is local and is a symbolic link, the symbolic link, not
- the target, is copied by default. To copy the link target and not the link, specify
- the `-L` option.
+ The command requires `SRC_PATH` and `DEST_PATH` to exist according to the above
+ rules. If `SRC_PATH` is local and is a symbolic link, the symbolic link, not
+ the target, is copied by default. To copy the link target and not the link, specify
+ the `-L` option.
- A colon (`:`) is used as a delimiter between `CONTAINER` and its path. You can
- also use `:` when specifying paths to a `SRC_PATH` or `DEST_PATH` on a local
- machine, for example `file:name.txt`. If you use a `:` in a local machine path,
- you must be explicit with a relative or absolute path, for example:
+ A colon (`:`) is used as a delimiter between `CONTAINER` and its path. You can
+ also use `:` when specifying paths to a `SRC_PATH` or `DEST_PATH` on a local
+ machine, for example `file:name.txt`. If you use a `:` in a local machine path,
+ you must be explicit with a relative or absolute path, for example:
- `/path/to/file:name.txt` or `./file:name.txt`
-usage: "docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-\n\tdocker cp [OPTIONS]
- SRC_PATH|- CONTAINER:DEST_PATH"
+ `/path/to/file:name.txt` or `./file:name.txt`
+usage: |-
+ docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
+ docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
pname: docker
plink: docker.yaml
options:
-- option: archive
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Archive mode (copy all uid/gid information)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: follow-link
- shorthand: L
- value_type: bool
- default_value: "false"
- description: Always follow symbol link in SRC_PATH
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: archive
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Archive mode (copy all uid/gid information)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: follow-link
+ shorthand: L
+ value_type: bool
+ default_value: "false"
+ description: Always follow symbol link in SRC_PATH
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: |
+ Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- Copy a local file into container
+ Copy a local file into container
- ```console
- $ docker cp ./some_file CONTAINER:/work
- ```
+ ```console
+ $ docker cp ./some_file CONTAINER:/work
+ ```
- Copy files from container to local path
+ Copy files from container to local path
- ```console
- $ docker cp CONTAINER:/var/logs/ /tmp/app_logs
- ```
+ ```console
+ $ docker cp CONTAINER:/var/logs/ /tmp/app_logs
+ ```
- Copy a file from container to stdout. Please note `cp` command produces a tar stream
+ Copy a file from container to stdout. Please note `cp` command produces a tar stream
- ```console
- $ docker cp CONTAINER:/var/logs/app.log - | tar x -O | grep "ERROR"
- ```
+ ```console
+ $ docker cp CONTAINER:/var/logs/app.log - | tar x -O | grep "ERROR"
+ ```
- ### Corner cases
+ ### Corner cases
- It is not possible to copy certain system files such as resources under
- `/proc`, `/sys`, `/dev`, [tmpfs](run.md#tmpfs), and mounts created by
- the user in the container. However, you can still copy such files by manually
- running `tar` in `docker exec`. Both of the following examples do the same thing
- in different ways (consider `SRC_PATH` and `DEST_PATH` are directories):
+ It is not possible to copy certain system files such as resources under
+ `/proc`, `/sys`, `/dev`, [tmpfs](run.md#tmpfs), and mounts created by
+ the user in the container. However, you can still copy such files by manually
+ running `tar` in `docker exec`. Both of the following examples do the same thing
+ in different ways (consider `SRC_PATH` and `DEST_PATH` are directories):
- ```console
- $ docker exec CONTAINER tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
- ```
+ ```console
+ $ docker exec CONTAINER tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
+ ```
- ```console
- $ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i CONTAINER tar Cxf DEST_PATH -
- ```
+ ```console
+ $ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i CONTAINER tar Cxf DEST_PATH -
+ ```
- Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive.
- The command extracts the content of the tar to the `DEST_PATH` in container's
- filesystem. In this case, `DEST_PATH` must specify a directory. Using `-` as
- the `DEST_PATH` streams the contents of the resource as a tar archive to `STDOUT`.
+ Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive.
+ The command extracts the content of the tar to the `DEST_PATH` in container's
+ filesystem. In this case, `DEST_PATH` must specify a directory. Using `-` as
+ the `DEST_PATH` streams the contents of the resource as a tar archive to `STDOUT`.
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_create.yaml b/_data/engine-cli/docker_create.yaml
index cc63bbef9e..ba2e23e39c 100644
--- a/_data/engine-cli/docker_create.yaml
+++ b/_data/engine-cli/docker_create.yaml
@@ -1,970 +1,1079 @@
command: docker create
+aliases: docker container create, docker create
short: Create a new container
long: |-
- The `docker container create` (or shorthand: `docker create`) command creates a
- new container from the specified image, without starting it.
+ The `docker container create` (or shorthand: `docker create`) command creates a
+ new container from the specified image, without starting it.
- When creating a container, the docker daemon creates a writeable container layer
- over the specified image and prepares it for running the specified command. The
- container ID is then printed to `STDOUT`. This is similar to `docker run -d`
- except the container is never started. You can then use the `docker container start`
- (or shorthand: `docker start`) command to start the container at any point.
+ When creating a container, the docker daemon creates a writeable container layer
+ over the specified image and prepares it for running the specified command. The
+ container ID is then printed to `STDOUT`. This is similar to `docker run -d`
+ except the container is never started. You can then use the `docker container start`
+ (or shorthand: `docker start`) command to start the container at any point.
- This is useful when you want to set up a container configuration ahead of time
- so that it is ready to start when you need it. The initial status of the
- new container is `created`.
+ This is useful when you want to set up a container configuration ahead of time
+ so that it is ready to start when you need it. The initial status of the
+ new container is `created`.
- The `docker create` command shares most of its options with the `docker run`
- command (which performs a `docker create` before starting it). Refer to the
- [`docker run` command](run.md) section and the [Docker run reference](../run.md)
- for details on the available flags and options.
+ The `docker create` command shares most of its options with the `docker run`
+ command (which performs a `docker create` before starting it). Refer to the
+ [`docker run` command](run.md) section and the [Docker run reference](../run.md)
+ for details on the available flags and options.
usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
pname: docker
plink: docker.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: attach
- shorthand: a
- value_type: list
- description: Attach to STDIN, STDOUT or STDERR
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight
- value_type: uint16
- default_value: "0"
- description: |
- Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: blkio-weight-device
- value_type: list
- default_value: '[]'
- description: Block IO weight (relative device weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-add
- value_type: list
- description: Add Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cap-drop
- value_type: list
- description: Drop Linux capabilities
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroupns
- value_type: string
- description: |-
- Cgroup namespace to use (host|private)
- 'host': Run the container in the Docker host's cgroup namespace
- 'private': Run the container in its own private cgroup namespace
- '': Use the cgroup namespace as configured by the
- default-cgroupns-mode option on the daemon (default)
- deprecated: false
- min_api_version: "1.41"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cidfile
- value_type: string
- description: Write the container ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-count
- value_type: int64
- default_value: "0"
- description: CPU count (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-percent
- value_type: int64
- default_value: "0"
- description: CPU percent (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-period
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time period in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-rt-runtime
- value_type: int64
- default_value: "0"
- description: Limit CPU real-time runtime in microseconds
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpus
- value_type: decimal
- description: Number of CPUs
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device
- value_type: list
- description: Add a host device to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-cgroup-rule
- value_type: list
- description: Add a rule to the cgroup allowed devices list
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-bps
- value_type: list
- default_value: '[]'
- description: Limit read rate (bytes per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-read-iops
- value_type: list
- default_value: '[]'
- description: Limit read rate (IO per second) from a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-bps
- value_type: list
- default_value: '[]'
- description: Limit write rate (bytes per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: device-write-iops
- value_type: list
- default_value: '[]'
- description: Limit write rate (IO per second) to a device
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns
- value_type: list
- description: Set custom DNS servers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-opt
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-option
- value_type: list
- description: Set DNS options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: dns-search
- value_type: list
- description: Set custom DNS search domains
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: domainname
- value_type: string
- description: Container NIS domain name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: entrypoint
- value_type: string
- description: Overwrite the default ENTRYPOINT of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env
- shorthand: e
- value_type: list
- description: Set environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env-file
- value_type: list
- description: Read in a file of environment variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: expose
- value_type: list
- description: Expose a port or a range of ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: gpus
- value_type: gpu-request
- description: GPU devices to add to the container ('all' to pass all GPUs)
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: group-add
- value_type: list
- description: Add additional groups to join
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-cmd
- value_type: string
- description: Command to run to check health
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-interval
- value_type: duration
- default_value: 0s
- description: Time between running the check (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-retries
- value_type: int
- default_value: "0"
- description: Consecutive failures needed to report unhealthy
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-start-period
- value_type: duration
- default_value: 0s
- description: |
- Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
- deprecated: false
- min_api_version: "1.29"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: health-timeout
- value_type: duration
- default_value: 0s
- description: |
- Maximum time to allow one check to run (ms|s|m|h) (default 0s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: help
- value_type: bool
- default_value: "false"
- description: Print usage
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: hostname
- shorthand: h
- value_type: string
- description: Container host name
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: init
- value_type: bool
- default_value: "false"
- description: |
- Run an init inside the container that forwards signals and reaps processes
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Keep STDIN open even if not attached
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: io-maxbandwidth
- value_type: bytes
- default_value: "0"
- description: |
- Maximum IO bandwidth limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: io-maxiops
- value_type: uint64
- default_value: "0"
- description: Maximum IOps limit for the system drive (Windows only)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
- os_type: windows
-- option: ip
- value_type: string
- description: IPv4 address (e.g., 172.30.100.104)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ip6
- value_type: string
- description: IPv6 address (e.g., 2001:db8::33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ipc
- value_type: string
- description: IPC mode to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: kernel-memory
- value_type: bytes
- default_value: "0"
- description: Kernel memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- shorthand: l
- value_type: list
- description: Set meta data on a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label-file
- value_type: list
- description: Read in a line delimited file of labels
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link
- value_type: list
- description: Add link to another container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: link-local-ip
- value_type: list
- description: Container IPv4/IPv6 link-local addresses
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-driver
- value_type: string
- description: Logging driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: log-opt
- value_type: list
- description: Log driver options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mac-address
- value_type: string
- description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-reservation
- value_type: bytes
- default_value: "0"
- description: Memory soft limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swappiness
- value_type: int64
- default_value: "-1"
- description: Tune container memory swappiness (0 to 100)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: mount
- value_type: mount
- description: Attach a filesystem mount to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: name
- value_type: string
- description: Assign a name to the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: net-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: network
- description: Connect a container to a network
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network-alias
- value_type: list
- description: Add network-scoped alias for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-healthcheck
- value_type: bool
- default_value: "false"
- description: Disable any container-specified HEALTHCHECK
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-kill-disable
- value_type: bool
- default_value: "false"
- description: Disable OOM Killer
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: oom-score-adj
- value_type: int
- default_value: "0"
- description: Tune host's OOM preferences (-1000 to 1000)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pid
- value_type: string
- description: PID namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pids-limit
- value_type: int64
- default_value: "0"
- description: Tune container pids limit (set -1 for unlimited)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.32"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: privileged
- value_type: bool
- default_value: "false"
- description: Give extended privileges to this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish
- shorthand: p
- value_type: list
- description: Publish a container's port(s) to the host
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: publish-all
- shorthand: P
- value_type: bool
- default_value: "false"
- description: Publish all exposed ports to random ports
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: string
- default_value: missing
- description: Pull image before creating ("always"|"missing"|"never")
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: read-only
- value_type: bool
- default_value: "false"
- description: Mount the container's root filesystem as read only
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: restart
- value_type: string
- default_value: "no"
- description: Restart policy to apply when a container exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "false"
- description: Automatically remove the container when it exits
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: runtime
- value_type: string
- description: Runtime to use for this container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: list
- description: Security Options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-signal
- value_type: string
- default_value: SIGTERM
- description: Signal to stop a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stop-timeout
- value_type: int
- default_value: "0"
- description: Timeout (in seconds) to stop a container
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: storage-opt
- value_type: list
- description: Storage driver options for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: sysctl
- value_type: map
- default_value: map[]
- description: Sysctl options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tmpfs
- value_type: list
- description: Mount a tmpfs directory
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tty
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Allocate a pseudo-TTY
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: user
- shorthand: u
- value_type: string
- description: 'Username or UID (format: [:])'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: userns
- value_type: string
- description: User namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: uts
- value_type: string
- description: UTS namespace to use
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume
- shorthand: v
- value_type: list
- description: Bind mount a volume
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volume-driver
- value_type: string
- description: Optional volume driver for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: volumes-from
- value_type: list
- description: Mount volumes from the specified container(s)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: workdir
- shorthand: w
- value_type: string
- description: Working directory inside the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (host:ip)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: attach
+ shorthand: a
+ value_type: list
+ description: Attach to STDIN, STDOUT or STDERR
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight
+ value_type: uint16
+ default_value: "0"
+ description: |
+ Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: blkio-weight-device
+ value_type: list
+ default_value: '[]'
+ description: Block IO weight (relative device weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-add
+ value_type: list
+ description: Add Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cap-drop
+ value_type: list
+ description: Drop Linux capabilities
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroupns
+ value_type: string
+ description: |-
+ Cgroup namespace to use (host|private)
+ 'host': Run the container in the Docker host's cgroup namespace
+ 'private': Run the container in its own private cgroup namespace
+ '': Use the cgroup namespace as configured by the
+ default-cgroupns-mode option on the daemon (default)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.41"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cidfile
+ value_type: string
+ description: Write the container ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-count
+ value_type: int64
+ default_value: "0"
+ description: CPU count (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-percent
+ value_type: int64
+ default_value: "0"
+ description: CPU percent (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-period
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time period in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-rt-runtime
+ value_type: int64
+ default_value: "0"
+ description: Limit CPU real-time runtime in microseconds
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpus
+ value_type: decimal
+ description: Number of CPUs
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device
+ value_type: list
+ description: Add a host device to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-cgroup-rule
+ value_type: list
+ description: Add a rule to the cgroup allowed devices list
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (bytes per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-read-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit read rate (IO per second) from a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-bps
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (bytes per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: device-write-iops
+ value_type: list
+ default_value: '[]'
+ description: Limit write rate (IO per second) to a device
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns
+ value_type: list
+ description: Set custom DNS servers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-opt
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-option
+ value_type: list
+ description: Set DNS options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: dns-search
+ value_type: list
+ description: Set custom DNS search domains
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: domainname
+ value_type: string
+ description: Container NIS domain name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: entrypoint
+ value_type: string
+ description: Overwrite the default ENTRYPOINT of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env
+ shorthand: e
+ value_type: list
+ description: Set environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env-file
+ value_type: list
+ description: Read in a file of environment variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: expose
+ value_type: list
+ description: Expose a port or a range of ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: gpus
+ value_type: gpu-request
+ description: GPU devices to add to the container ('all' to pass all GPUs)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.40"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: group-add
+ value_type: list
+ description: Add additional groups to join
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-cmd
+ value_type: string
+ description: Command to run to check health
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-interval
+ value_type: duration
+ default_value: 0s
+ description: Time between running the check (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-retries
+ value_type: int
+ default_value: "0"
+ description: Consecutive failures needed to report unhealthy
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-start-period
+ value_type: duration
+ default_value: 0s
+ description: |
+ Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ min_api_version: "1.29"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: health-timeout
+ value_type: duration
+ default_value: 0s
+ description: Maximum time to allow one check to run (ms|s|m|h) (default 0s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: hostname
+ shorthand: h
+ value_type: string
+ description: Container host name
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: init
+ value_type: bool
+ default_value: "false"
+ description: |
+ Run an init inside the container that forwards signals and reaps processes
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Keep STDIN open even if not attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: io-maxbandwidth
+ value_type: bytes
+ default_value: "0"
+ description: Maximum IO bandwidth limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: io-maxiops
+ value_type: uint64
+ default_value: "0"
+ description: Maximum IOps limit for the system drive (Windows only)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ os_type: windows
+ - option: ip
+ value_type: string
+ description: IPv4 address (e.g., 172.30.100.104)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ip6
+ value_type: string
+ description: IPv6 address (e.g., 2001:db8::33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ipc
+ value_type: string
+ description: IPC mode to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: kernel-memory
+ value_type: bytes
+ default_value: "0"
+ description: Kernel memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ shorthand: l
+ value_type: list
+ description: Set meta data on a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label-file
+ value_type: list
+ description: Read in a line delimited file of labels
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link
+ value_type: list
+ description: Add link to another container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: link-local-ip
+ value_type: list
+ description: Container IPv4/IPv6 link-local addresses
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-driver
+ value_type: string
+ description: Logging driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: log-opt
+ value_type: list
+ description: Log driver options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mac-address
+ value_type: string
+ description: Container MAC address (e.g., 92:d0:c6:0a:29:33)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-reservation
+ value_type: bytes
+ default_value: "0"
+ description: Memory soft limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: |
+ Swap limit equal to memory plus swap: '-1' to enable unlimited swap
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swappiness
+ value_type: int64
+ default_value: "-1"
+ description: Tune container memory swappiness (0 to 100)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: mount
+ value_type: mount
+ description: Attach a filesystem mount to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: name
+ value_type: string
+ description: Assign a name to the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: net-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: network
+ description: Connect a container to a network
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network-alias
+ value_type: list
+ description: Add network-scoped alias for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-healthcheck
+ value_type: bool
+ default_value: "false"
+ description: Disable any container-specified HEALTHCHECK
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-kill-disable
+ value_type: bool
+ default_value: "false"
+ description: Disable OOM Killer
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: oom-score-adj
+ value_type: int
+ default_value: "0"
+ description: Tune host's OOM preferences (-1000 to 1000)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pid
+ value_type: string
+ description: PID namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pids-limit
+ value_type: int64
+ default_value: "0"
+ description: Tune container pids limit (set -1 for unlimited)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.32"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: privileged
+ value_type: bool
+ default_value: "false"
+ description: Give extended privileges to this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish
+ shorthand: p
+ value_type: list
+ description: Publish a container's port(s) to the host
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: publish-all
+ shorthand: P
+ value_type: bool
+ default_value: "false"
+ description: Publish all exposed ports to random ports
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: string
+ default_value: missing
+ description: Pull image before creating (`always`, `|missing`, `never`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the pull output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: read-only
+ value_type: bool
+ default_value: "false"
+ description: Mount the container's root filesystem as read only
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: restart
+ value_type: string
+ default_value: "no"
+ description: Restart policy to apply when a container exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "false"
+ description: Automatically remove the container when it exits
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: runtime
+ value_type: string
+ description: Runtime to use for this container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: list
+ description: Security Options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of /dev/shm
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-signal
+ value_type: string
+ description: Signal to stop the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: stop-timeout
+ value_type: int
+ default_value: "0"
+ description: Timeout (in seconds) to stop a container
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: storage-opt
+ value_type: list
+ description: Storage driver options for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: sysctl
+ value_type: map
+ default_value: map[]
+ description: Sysctl options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tmpfs
+ value_type: list
+ description: Mount a tmpfs directory
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tty
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Allocate a pseudo-TTY
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: user
+ shorthand: u
+ value_type: string
+ description: 'Username or UID (format: [:])'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: userns
+ value_type: string
+ description: User namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: uts
+ value_type: string
+ description: UTS namespace to use
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume
+ shorthand: v
+ value_type: list
+ description: Bind mount a volume
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volume-driver
+ value_type: string
+ description: Optional volume driver for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: volumes-from
+ value_type: list
+ description: Mount volumes from the specified container(s)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: workdir
+ shorthand: w
+ value_type: string
+ description: Working directory inside the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Create and start a container
+ ### Create and start a container
- The following example creates an interactive container with a pseudo-TTY attached,
- then starts the container and attaches to it:
+ The following example creates an interactive container with a pseudo-TTY attached,
+ then starts the container and attaches to it:
- ```console
- $ docker container create -i -t --name mycontainer alpine
- 6d8af538ec541dd581ebc2a24153a28329acb5268abe5ef868c1f1a261221752
+ ```console
+ $ docker container create -i -t --name mycontainer alpine
+ 6d8af538ec541dd581ebc2a24153a28329acb5268abe5ef868c1f1a261221752
- $ docker container start --attach -i mycontainer
- / # echo hello world
- hello world
- ```
+ $ docker container start --attach -i mycontainer
+ / # echo hello world
+ hello world
+ ```
- The above is the equivalent of a `docker run`:
+ The above is the equivalent of a `docker run`:
- ```console
- $ docker run -it --name mycontainer2 alpine
- / # echo hello world
- hello world
- ```
+ ```console
+ $ docker run -it --name mycontainer2 alpine
+ / # echo hello world
+ hello world
+ ```
- ### Initialize volumes
+ ### Initialize volumes
- Container volumes are initialized during the `docker create` phase
- (i.e., `docker run` too). For example, this allows you to `create` the `data`
- volume container, and then use it from another container:
+ Container volumes are initialized during the `docker create` phase
+ (i.e., `docker run` too). For example, this allows you to `create` the `data`
+ volume container, and then use it from another container:
- ```console
- $ docker create -v /data --name data ubuntu
+ ```console
+ $ docker create -v /data --name data ubuntu
- 240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57
+ 240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57
- $ docker run --rm --volumes-from data ubuntu ls -la /data
+ $ docker run --rm --volumes-from data ubuntu ls -la /data
- total 8
- drwxr-xr-x 2 root root 4096 Dec 5 04:10 .
- drwxr-xr-x 48 root root 4096 Dec 5 04:11 ..
- ```
+ total 8
+ drwxr-xr-x 2 root root 4096 Dec 5 04:10 .
+ drwxr-xr-x 48 root root 4096 Dec 5 04:11 ..
+ ```
- Similarly, `create` a host directory bind mounted volume container, which can
- then be used from the subsequent container:
+ Similarly, `create` a host directory bind mounted volume container, which can
+ then be used from the subsequent container:
- ```console
- $ docker create -v /home/docker:/docker --name docker ubuntu
+ ```console
+ $ docker create -v /home/docker:/docker --name docker ubuntu
- 9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03
+ 9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03
- $ docker run --rm --volumes-from docker ubuntu ls -la /docker
+ $ docker run --rm --volumes-from docker ubuntu ls -la /docker
- total 20
- drwxr-sr-x 5 1000 staff 180 Dec 5 04:00 .
- drwxr-xr-x 48 root root 4096 Dec 5 04:13 ..
- -rw-rw-r-- 1 1000 staff 3833 Dec 5 04:01 .ash_history
- -rw-r--r-- 1 1000 staff 446 Nov 28 11:51 .ashrc
- -rw-r--r-- 1 1000 staff 25 Dec 5 04:00 .gitconfig
- drwxr-sr-x 3 1000 staff 60 Dec 1 03:28 .local
- -rw-r--r-- 1 1000 staff 920 Nov 28 11:51 .profile
- drwx--S--- 2 1000 staff 460 Dec 5 00:51 .ssh
- drwxr-xr-x 32 1000 staff 1140 Dec 5 04:01 docker
- ```
+ total 20
+ drwxr-sr-x 5 1000 staff 180 Dec 5 04:00 .
+ drwxr-xr-x 48 root root 4096 Dec 5 04:13 ..
+ -rw-rw-r-- 1 1000 staff 3833 Dec 5 04:01 .ash_history
+ -rw-r--r-- 1 1000 staff 446 Nov 28 11:51 .ashrc
+ -rw-r--r-- 1 1000 staff 25 Dec 5 04:00 .gitconfig
+ drwxr-sr-x 3 1000 staff 60 Dec 1 03:28 .local
+ -rw-r--r-- 1 1000 staff 920 Nov 28 11:51 .profile
+ drwx--S--- 2 1000 staff 460 Dec 5 00:51 .ssh
+ drwxr-xr-x 32 1000 staff 1140 Dec 5 04:01 docker
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_diff.yaml b/_data/engine-cli/docker_diff.yaml
index be40bf7cb3..1ad5f1c471 100644
--- a/_data/engine-cli/docker_diff.yaml
+++ b/_data/engine-cli/docker_diff.yaml
@@ -1,46 +1,58 @@
command: docker diff
+aliases: docker container diff, docker diff
short: Inspect changes to files or directories on a container's filesystem
long: |-
- List the changed files and directories in a container᾿s filesystem since the
- container was created. Three different types of change are tracked:
+ List the changed files and directories in a container᾿s filesystem since the
+ container was created. Three different types of change are tracked:
- | Symbol | Description |
- |--------|---------------------------------|
- | `A` | A file or directory was added |
- | `D` | A file or directory was deleted |
- | `C` | A file or directory was changed |
+ | Symbol | Description |
+ |--------|---------------------------------|
+ | `A` | A file or directory was added |
+ | `D` | A file or directory was deleted |
+ | `C` | A file or directory was changed |
- You can use the full or shortened container ID or the container name set using
- `docker run --name` option.
+ You can use the full or shortened container ID or the container name set using
+ `docker run --name` option.
usage: docker diff CONTAINER
pname: docker
plink: docker.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- Inspect the changes to an `nginx` container:
+ Inspect the changes to an `nginx` container:
- ```console
- $ docker diff 1fdfd1f54c1b
+ ```console
+ $ docker diff 1fdfd1f54c1b
- C /dev
- C /dev/console
- C /dev/core
- C /dev/stdout
- C /dev/fd
- C /dev/ptmx
- C /dev/stderr
- C /dev/stdin
- C /run
- A /run/nginx.pid
- C /var/lib/nginx/tmp
- A /var/lib/nginx/tmp/client_body
- A /var/lib/nginx/tmp/fastcgi
- A /var/lib/nginx/tmp/proxy
- A /var/lib/nginx/tmp/scgi
- A /var/lib/nginx/tmp/uwsgi
- C /var/log/nginx
- A /var/log/nginx/access.log
- A /var/log/nginx/error.log
- ```
+ C /dev
+ C /dev/console
+ C /dev/core
+ C /dev/stdout
+ C /dev/fd
+ C /dev/ptmx
+ C /dev/stderr
+ C /dev/stdin
+ C /run
+ A /run/nginx.pid
+ C /var/lib/nginx/tmp
+ A /var/lib/nginx/tmp/client_body
+ A /var/lib/nginx/tmp/fastcgi
+ A /var/lib/nginx/tmp/proxy
+ A /var/lib/nginx/tmp/scgi
+ A /var/lib/nginx/tmp/uwsgi
+ C /var/log/nginx
+ A /var/log/nginx/access.log
+ A /var/log/nginx/error.log
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_events.yaml b/_data/engine-cli/docker_events.yaml
index 45b9557f82..0758f841c1 100644
--- a/_data/engine-cli/docker_events.yaml
+++ b/_data/engine-cli/docker_events.yaml
@@ -1,430 +1,446 @@
command: docker events
+aliases: docker system events, docker events
short: Get real time events from the server
long: |-
- Use `docker events` to get real-time events from the server. These events differ
- per Docker object type. Different event types have different scopes. Local
- scoped events are only seen on the node they take place on, and swarm scoped
- events are seen on all managers.
+ Use `docker events` to get real-time events from the server. These events differ
+ per Docker object type. Different event types have different scopes. Local
+ scoped events are only seen on the node they take place on, and swarm scoped
+ events are seen on all managers.
- Only the last 1000 log events are returned. You can use filters to further limit
- the number of events returned.
+ Only the last 1000 log events are returned. You can use filters to further limit
+ the number of events returned.
- ### Object types
+ ### Object types
- #### Containers
+ #### Containers
- Docker containers report the following events:
+ Docker containers report the following events:
- - `attach`
- - `commit`
- - `copy`
- - `create`
- - `destroy`
- - `detach`
- - `die`
- - `exec_create`
- - `exec_detach`
- - `exec_die`
- - `exec_start`
- - `export`
- - `health_status`
- - `kill`
- - `oom`
- - `pause`
- - `rename`
- - `resize`
- - `restart`
- - `start`
- - `stop`
- - `top`
- - `unpause`
- - `update`
+ - `attach`
+ - `commit`
+ - `copy`
+ - `create`
+ - `destroy`
+ - `detach`
+ - `die`
+ - `exec_create`
+ - `exec_detach`
+ - `exec_die`
+ - `exec_start`
+ - `export`
+ - `health_status`
+ - `kill`
+ - `oom`
+ - `pause`
+ - `rename`
+ - `resize`
+ - `restart`
+ - `start`
+ - `stop`
+ - `top`
+ - `unpause`
+ - `update`
- #### Images
+ #### Images
- Docker images report the following events:
+ Docker images report the following events:
- - `delete`
- - `import`
- - `load`
- - `pull`
- - `push`
- - `save`
- - `tag`
- - `untag`
+ - `delete`
+ - `import`
+ - `load`
+ - `pull`
+ - `push`
+ - `save`
+ - `tag`
+ - `untag`
- #### Plugins
+ #### Plugins
- Docker plugins report the following events:
+ Docker plugins report the following events:
- - `enable`
- - `disable`
- - `install`
- - `remove`
+ - `enable`
+ - `disable`
+ - `install`
+ - `remove`
- #### Volumes
+ #### Volumes
- Docker volumes report the following events:
+ Docker volumes report the following events:
- - `create`
- - `destroy`
- - `mount`
- - `unmount`
+ - `create`
+ - `destroy`
+ - `mount`
+ - `unmount`
- #### Networks
+ #### Networks
- Docker networks report the following events:
+ Docker networks report the following events:
- - `create`
- - `connect`
- - `destroy`
- - `disconnect`
- - `remove`
+ - `create`
+ - `connect`
+ - `destroy`
+ - `disconnect`
+ - `remove`
- #### Daemons
+ #### Daemons
- Docker daemons report the following events:
+ Docker daemons report the following events:
- - `reload`
+ - `reload`
- #### Services
+ #### Services
- Docker services report the following events:
+ Docker services report the following events:
- - `create`
- - `remove`
- - `update`
+ - `create`
+ - `remove`
+ - `update`
- #### Nodes
+ #### Nodes
- Docker nodes report the following events:
+ Docker nodes report the following events:
- - `create`
- - `remove`
- - `update`
+ - `create`
+ - `remove`
+ - `update`
- #### Secrets
+ #### Secrets
- Docker secrets report the following events:
+ Docker secrets report the following events:
- - `create`
- - `remove`
- - `update`
+ - `create`
+ - `remove`
+ - `update`
- #### Configs
+ #### Configs
- Docker configs report the following events:
+ Docker configs report the following events:
- - `create`
- - `remove`
- - `update`
+ - `create`
+ - `remove`
+ - `update`
- ### Limiting, filtering, and formatting the output
+ ### Limiting, filtering, and formatting the output
- #### Limit events by time (--since, --until)
+ #### Limit events by time (--since, --until) {#since}
- The `--since` and `--until` parameters can be Unix timestamps, date formatted
- timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
- relative to the client machine’s time. If you do not provide the `--since` option,
- the command returns only new and/or live events. Supported formats for date
- formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
- `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
- timezone on the client will be used if you do not provide either a `Z` or a
- `+-00:00` timezone offset at the end of the timestamp. When providing Unix
- timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
- that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
- seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
- fraction of a second no more than nine digits long.
+ The `--since` and `--until` parameters can be Unix timestamps, date formatted
+ timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
+ relative to the client machine’s time. If you do not provide the `--since` option,
+ the command returns only new and/or live events. Supported formats for date
+ formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
+ `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
+ timezone on the client will be used if you do not provide either a `Z` or a
+ `+-00:00` timezone offset at the end of the timestamp. When providing Unix
+ timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
+ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
+ seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
+ fraction of a second no more than nine digits long.
- Only the last 1000 log events are returned. You can use filters to further limit
- the number of events returned.
+ Only the last 1000 log events are returned. You can use filters to further limit
+ the number of events returned.
- #### Filtering (--filter)
+ #### Filtering (--filter) {#filter}
- The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
- like to use multiple filters, pass multiple flags (e.g.,
- `--filter "foo=bar" --filter "bif=baz"`)
+ The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
+ like to use multiple filters, pass multiple flags (e.g.,
+ `--filter "foo=bar" --filter "bif=baz"`)
- Using the same filter multiple times will be handled as a *OR*; for example
- `--filter container=588a23dac085 --filter container=a8f7720b8c22` will display
- events for container 588a23dac085 *OR* container a8f7720b8c22
+ Using the same filter multiple times will be handled as a *OR*; for example
+ `--filter container=588a23dac085 --filter container=a8f7720b8c22` will display
+ events for container 588a23dac085 *OR* container a8f7720b8c22
- Using multiple filters will be handled as a *AND*; for example
- `--filter container=588a23dac085 --filter event=start` will display events for
- container container 588a23dac085 *AND* the event type is *start*
+ Using multiple filters will be handled as a *AND*; for example
+ `--filter container=588a23dac085 --filter event=start` will display events for
+ container container 588a23dac085 *AND* the event type is *start*
- The currently supported filters are:
+ The currently supported filters are:
- * config (`config=`)
- * container (`container=`)
- * daemon (`daemon=`)
- * event (`event=`)
- * image (`image=`)
- * label (`label=` or `label==`)
- * network (`network=`)
- * node (`node=`)
- * plugin (`plugin=`)
- * scope (`scope=`)
- * secret (`secret=`)
- * service (`service=`)
- * type (`type=`)
- * volume (`volume=`)
+ * config (`config=`)
+ * container (`container=`)
+ * daemon (`daemon=`)
+ * event (`event=`)
+ * image (`image=`)
+ * label (`label=` or `label==`)
+ * network (`network=`)
+ * node (`node=`)
+ * plugin (`plugin=`)
+ * scope (`scope=`)
+ * secret (`secret=`)
+ * service (`service=`)
+ * type (`type=`)
+ * volume (`volume=`)
- #### Format the output (--format)
+ #### Format the output (--format) {#format}
- If a format (`--format`) is specified, the given template will be executed
- instead of the default
- format. Go's [text/template](https://golang.org/pkg/text/template/) package
- describes all the details of the format.
+ If a format (`--format`) is specified, the given template will be executed
+ instead of the default
+ format. Go's [text/template](https://golang.org/pkg/text/template/) package
+ describes all the details of the format.
- If a format is set to `{{json .}}`, the events are streamed as valid JSON
- Lines. For information about JSON Lines, please refer to https://jsonlines.org/.
+ If a format is set to `{{json .}}`, the events are streamed as valid JSON
+ Lines. For information about JSON Lines, please refer to https://jsonlines.org/.
usage: docker events [OPTIONS]
pname: docker
plink: docker.yaml
options:
-- option: filter
- shorthand: f
- value_type: filter
- description: Filter output based on conditions provided
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Format the output using the given Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: since
- value_type: string
- description: Show all events created since timestamp
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: until
- value_type: string
- description: Stream events until this timestamp
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: filter
+ shorthand: f
+ value_type: filter
+ description: Filter output based on conditions provided
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: Format the output using the given Go template
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: since
+ value_type: string
+ description: Show all events created since timestamp
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: until
+ value_type: string
+ description: Stream events until this timestamp
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### Basic example
+ ### Basic example
- You'll need two shells for this example.
+ You'll need two shells for this example.
- **Shell 1: Listening for events:**
+ **Shell 1: Listening for events:**
- ```console
- $ docker events
- ```
+ ```console
+ $ docker events
+ ```
- **Shell 2: Start and Stop containers:**
+ **Shell 2: Start and Stop containers:**
- ```console
- $ docker create --name test alpine:latest top
- $ docker start test
- $ docker stop test
- ```
+ ```console
+ $ docker create --name test alpine:latest top
+ $ docker start test
+ $ docker stop test
+ ```
- **Shell 1: (Again .. now showing events):**
+ **Shell 1: (Again .. now showing events):**
- ```console
- 2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- ```
+ ```console
+ 2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ ```
- To exit the `docker events` command, use `CTRL+C`.
+ To exit the `docker events` command, use `CTRL+C`.
- ### Filter events by time
+ ### Filter events by time
- You can filter the output by an absolute timestamp or relative time on the host
- machine, using the following different time syntaxes:
+ You can filter the output by an absolute timestamp or relative time on the host
+ machine, using the following different time syntaxes:
- ```console
- $ docker events --since 1483283804
- 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
- 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ ```console
+ $ docker events --since 1483283804
+ 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
+ 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --since '2017-01-05'
- 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
- 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ $ docker events --since '2017-01-05'
+ 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
+ 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --since '2013-09-03T15:49:29'
- 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
- 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ $ docker events --since '2013-09-03T15:49:29'
+ 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
+ 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --since '10m'
- 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
- 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ $ docker events --since '10m'
+ 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
+ 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --since '2017-01-05T00:35:30' --until '2017-01-05T00:36:05'
- 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
- 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
- 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
- 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- ```
+ $ docker events --since '2017-01-05T00:35:30' --until '2017-01-05T00:36:05'
+ 2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
+ 2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
+ 2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
+ 2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ ```
- ### Filter events by criteria
+ ### Filter events by criteria
- The following commands show several different ways to filter the `docker event`
- output.
+ The following commands show several different ways to filter the `docker event`
+ output.
- ```console
- $ docker events --filter 'event=stop'
+ ```console
+ $ docker events --filter 'event=stop'
- 2017-01-05T00:40:22.880175420+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:41:17.888104182+08:00 container stop 2a8f...4e78 (image=alpine, name=kickass_brattain)
+ 2017-01-05T00:40:22.880175420+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:41:17.888104182+08:00 container stop 2a8f...4e78 (image=alpine, name=kickass_brattain)
- $ docker events --filter 'image=alpine'
+ $ docker events --filter 'image=alpine'
- 2017-01-05T00:41:55.784240236+08:00 container create d9cd...4d70 (image=alpine, name=happy_meitner)
- 2017-01-05T00:41:55.913156783+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
- 2017-01-05T00:42:01.106875249+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=15)
- 2017-01-05T00:42:11.111934041+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=9)
- 2017-01-05T00:42:11.119578204+08:00 container die d9cd...4d70 (exitCode=137, image=alpine, name=happy_meitner)
- 2017-01-05T00:42:11.173276611+08:00 container stop d9cd...4d70 (image=alpine, name=happy_meitner)
+ 2017-01-05T00:41:55.784240236+08:00 container create d9cd...4d70 (image=alpine, name=happy_meitner)
+ 2017-01-05T00:41:55.913156783+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
+ 2017-01-05T00:42:01.106875249+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=15)
+ 2017-01-05T00:42:11.111934041+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=9)
+ 2017-01-05T00:42:11.119578204+08:00 container die d9cd...4d70 (exitCode=137, image=alpine, name=happy_meitner)
+ 2017-01-05T00:42:11.173276611+08:00 container stop d9cd...4d70 (image=alpine, name=happy_meitner)
- $ docker events --filter 'container=test'
+ $ docker events --filter 'container=test'
- 2017-01-05T00:43:00.139719934+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:43:09.259951086+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
- 2017-01-05T00:43:09.270102715+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
- 2017-01-05T00:43:09.312556440+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:43:00.139719934+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:43:09.259951086+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
+ 2017-01-05T00:43:09.270102715+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
+ 2017-01-05T00:43:09.312556440+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --filter 'container=test' --filter 'container=d9cdb1525ea8'
+ $ docker events --filter 'container=test' --filter 'container=d9cdb1525ea8'
- 2017-01-05T00:44:11.517071981+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
- 2017-01-05T00:44:17.685870901+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
- 2017-01-05T00:44:29.757658470+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=9)
- 2017-01-05T00:44:29.767718510+08:00 container die 0fdb...ff37 (exitCode=137, image=alpine:latest, name=test)
- 2017-01-05T00:44:29.815798344+08:00 container destroy 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:44:11.517071981+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
+ 2017-01-05T00:44:17.685870901+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
+ 2017-01-05T00:44:29.757658470+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=9)
+ 2017-01-05T00:44:29.767718510+08:00 container die 0fdb...ff37 (exitCode=137, image=alpine:latest, name=test)
+ 2017-01-05T00:44:29.815798344+08:00 container destroy 0fdb...ff37 (image=alpine:latest, name=test)
- $ docker events --filter 'container=test' --filter 'event=stop'
+ $ docker events --filter 'container=test' --filter 'event=stop'
- 2017-01-05T00:46:13.664099505+08:00 container stop a9d1...e130 (image=alpine, name=test)
+ 2017-01-05T00:46:13.664099505+08:00 container stop a9d1...e130 (image=alpine, name=test)
- $ docker events --filter 'type=volume'
+ $ docker events --filter 'type=volume'
- 2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
- 2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562f...5025, destination=/foo, driver=local, propagation=rprivate)
- 2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562f...5025, driver=local)
- 2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
+ 2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
+ 2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562f...5025, destination=/foo, driver=local, propagation=rprivate)
+ 2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562f...5025, driver=local)
+ 2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
- $ docker events --filter 'type=network'
+ $ docker events --filter 'type=network'
- 2015-12-23T21:38:24.705709133Z network create 8b11...2c5b (name=test-event-network-local, type=bridge)
- 2015-12-23T21:38:25.119625123Z network connect 8b11...2c5b (name=test-event-network-local, container=b4be...c54e, type=bridge)
+ 2015-12-23T21:38:24.705709133Z network create 8b11...2c5b (name=test-event-network-local, type=bridge)
+ 2015-12-23T21:38:25.119625123Z network connect 8b11...2c5b (name=test-event-network-local, container=b4be...c54e, type=bridge)
- $ docker events --filter 'container=container_1' --filter 'container=container_2'
+ $ docker events --filter 'container=container_1' --filter 'container=container_2'
- 2014-09-03T15:49:29.999999999Z07:00 container die 4386fb97867d (image=ubuntu:22.04)
- 2014-05-10T17:42:14.999999999Z07:00 container stop 4386fb97867d (image=ubuntu:22.04)
- 2014-05-10T17:42:14.999999999Z07:00 container die 7805c1d35632 (imager=redis:2.8)
- 2014-09-03T15:49:29.999999999Z07:00 container stop 7805c1d35632 (image=redis:2.8)
+ 2014-09-03T15:49:29.999999999Z07:00 container die 4386fb97867d (image=ubuntu:22.04)
+ 2014-05-10T17:42:14.999999999Z07:00 container stop 4386fb97867d (image=ubuntu:22.04)
+ 2014-05-10T17:42:14.999999999Z07:00 container die 7805c1d35632 (imager=redis:2.8)
+ 2014-09-03T15:49:29.999999999Z07:00 container stop 7805c1d35632 (image=redis:2.8)
- $ docker events --filter 'type=volume'
+ $ docker events --filter 'type=volume'
- 2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
- 2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, destination=/foo, driver=local, propagation=rprivate)
- 2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, driver=local)
- 2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
+ 2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
+ 2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, destination=/foo, driver=local, propagation=rprivate)
+ 2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, driver=local)
+ 2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
- $ docker events --filter 'type=network'
+ $ docker events --filter 'type=network'
- 2015-12-23T21:38:24.705709133Z network create 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, type=bridge)
- 2015-12-23T21:38:25.119625123Z network connect 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, container=b4be644031a3d90b400f88ab3d4bdf4dc23adb250e696b6328b85441abe2c54e, type=bridge)
+ 2015-12-23T21:38:24.705709133Z network create 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, type=bridge)
+ 2015-12-23T21:38:25.119625123Z network connect 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, container=b4be644031a3d90b400f88ab3d4bdf4dc23adb250e696b6328b85441abe2c54e, type=bridge)
- $ docker events --filter 'type=plugin'
+ $ docker events --filter 'type=plugin'
- 2016-07-25T17:30:14.825557616Z plugin pull ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
- 2016-07-25T17:30:14.888127370Z plugin enable ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
+ 2016-07-25T17:30:14.825557616Z plugin pull ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
+ 2016-07-25T17:30:14.888127370Z plugin enable ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
- $ docker events -f type=service
+ $ docker events -f type=service
- 2017-07-12T06:34:07.999446625Z service create wj64st89fzgchxnhiqpn8p4oj (name=reverent_albattani)
- 2017-07-12T06:34:21.405496207Z service remove wj64st89fzgchxnhiqpn8p4oj (name=reverent_albattani)
+ 2017-07-12T06:34:07.999446625Z service create wj64st89fzgchxnhiqpn8p4oj (name=reverent_albattani)
+ 2017-07-12T06:34:21.405496207Z service remove wj64st89fzgchxnhiqpn8p4oj (name=reverent_albattani)
- $ docker events -f type=node
+ $ docker events -f type=node
- 2017-07-12T06:21:51.951586759Z node update 3xyz5ttp1a253q74z1thwywk9 (name=ip-172-31-23-42, state.new=ready, state.old=unknown)
+ 2017-07-12T06:21:51.951586759Z node update 3xyz5ttp1a253q74z1thwywk9 (name=ip-172-31-23-42, state.new=ready, state.old=unknown)
- $ docker events -f type=secret
+ $ docker events -f type=secret
- 2017-07-12T06:32:13.915704367Z secret create s8o6tmlnndrgzbmdilyy5ymju (name=new_secret)
- 2017-07-12T06:32:37.052647783Z secret remove s8o6tmlnndrgzbmdilyy5ymju (name=new_secret)
+ 2017-07-12T06:32:13.915704367Z secret create s8o6tmlnndrgzbmdilyy5ymju (name=new_secret)
+ 2017-07-12T06:32:37.052647783Z secret remove s8o6tmlnndrgzbmdilyy5ymju (name=new_secret)
- $ docker events -f type=config
- 2017-07-12T06:44:13.349037127Z config create u96zlvzdfsyb9sg4mhyxfh3rl (name=abc)
- 2017-07-12T06:44:36.327694184Z config remove u96zlvzdfsyb9sg4mhyxfh3rl (name=abc)
+ $ docker events -f type=config
+ 2017-07-12T06:44:13.349037127Z config create u96zlvzdfsyb9sg4mhyxfh3rl (name=abc)
+ 2017-07-12T06:44:36.327694184Z config remove u96zlvzdfsyb9sg4mhyxfh3rl (name=abc)
- $ docker events --filter 'scope=swarm'
+ $ docker events --filter 'scope=swarm'
- 2017-07-10T07:46:50.250024503Z service create m8qcxu8081woyof7w3jaax6gk (name=affectionate_wilson)
- 2017-07-10T07:47:31.093797134Z secret create 6g5pufzsv438p9tbvl9j94od4 (name=new_secret)
- ```
+ 2017-07-10T07:46:50.250024503Z service create m8qcxu8081woyof7w3jaax6gk (name=affectionate_wilson)
+ 2017-07-10T07:47:31.093797134Z secret create 6g5pufzsv438p9tbvl9j94od4 (name=new_secret)
+ ```
- ### Format the output
+ ### Format the output
- ```console
- $ docker events --filter 'type=container' --format 'Type={{.Type}} Status={{.Status}} ID={{.ID}}'
+ ```console
+ $ docker events --filter 'type=container' --format 'Type={{.Type}} Status={{.Status}} ID={{.ID}}'
- Type=container Status=create ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- Type=container Status=attach ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- Type=container Status=start ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- Type=container Status=resize ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- Type=container Status=die ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
- ```
+ Type=container Status=create ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ Type=container Status=attach ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ Type=container Status=start ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ Type=container Status=resize ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ Type=container Status=die ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
+ ```
- #### Format as JSON
+ #### Format as JSON
- ```console
- $ docker events --format '{{json .}}'
+ ```console
+ $ docker events --format '{{json .}}'
- {"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
- {"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
- {"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
- {"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
- {"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
- ```
+ {"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
+ {"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
+ {"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
+ {"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
+ {"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_exec.yaml b/_data/engine-cli/docker_exec.yaml
index 7e20a0cf68..f510a65dfd 100644
--- a/_data/engine-cli/docker_exec.yaml
+++ b/_data/engine-cli/docker_exec.yaml
@@ -1,142 +1,226 @@
command: docker exec
-short: Run a command in a running container
+aliases: docker container exec, docker exec
+short: Execute a command in a running container
long: |-
- The `docker exec` command runs a new command in a running container.
+ The `docker exec` command runs a new command in a running container.
- The command started using `docker exec` only runs while the container's primary
- process (`PID 1`) is running, and it is not restarted if the container is
- restarted.
+ The command started using `docker exec` only runs while the container's primary
+ process (`PID 1`) is running, and it is not restarted if the container is
+ restarted.
- COMMAND runs in the default directory of the container. If the underlying image
- has a custom directory specified with the WORKDIR directive in its Dockerfile,
- this directory is used instead.
+ COMMAND runs in the default directory of the container. If the underlying image
+ has a custom directory specified with the WORKDIR directive in its Dockerfile,
+ this directory is used instead.
- COMMAND must be an executable. A chained or a quoted command does not work.
- For example, `docker exec -it my_container sh -c "echo a && echo b"` works,
- work, but `docker exec -it my_container "echo a && echo b"` does not.
+ COMMAND must be an executable. A chained or a quoted command does not work.
+ For example, `docker exec -it my_container sh -c "echo a && echo b"` does
+ work, but `docker exec -it my_container "echo a && echo b"` does not.
usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
pname: docker
plink: docker.yaml
options:
-- option: detach
- shorthand: d
- value_type: bool
- default_value: "false"
- description: 'Detached mode: run command in the background'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: detach-keys
- value_type: string
- description: Override the key sequence for detaching a container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env
- shorthand: e
- value_type: list
- description: Set environment variables
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: env-file
- value_type: list
- description: Read in a file of environment variables
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: interactive
- shorthand: i
- value_type: bool
- default_value: "false"
- description: Keep STDIN open even if not attached
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: privileged
- value_type: bool
- default_value: "false"
- description: Give extended privileges to the command
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tty
- shorthand: t
- value_type: bool
- default_value: "false"
- description: Allocate a pseudo-TTY
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: user
- shorthand: u
- value_type: string
- description: 'Username or UID (format: [:])'
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: workdir
- shorthand: w
- value_type: string
- description: Working directory inside the container
- deprecated: false
- min_api_version: "1.35"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-examples: "### Run `docker exec` on a running container\n\nFirst, start a container.\n\n```console\n$
- docker run --name mycontainer -d -i -t alpine /bin/sh\n```\n\nThis creates and starts
- a container named `mycontainer` from an `alpine` image\nwith an `sh` shell as its
- main process. The `-d` option (shorthand for `--detach`)\nsets the container to
- run in the background, in detached mode, with a pseudo-TTY\nattached (`-t`). The
- `-i` option is set to keep `STDIN` attached (`-i`), which\nprevents the `sh` process
- from exiting immediately.\n\nNext, execute a command on the container.\n\n```console\n$
- docker exec -d mycontainer touch /tmp/execWorks\n```\n\nThis creates a new file
- `/tmp/execWorks` inside the running container\n`mycontainer`, in the background.\n\nNext,
- execute an interactive `sh` shell on the container.\n\n```console\n$ docker exec
- -it mycontainer sh\n```\n\nThis starts a new shell session in the container `mycontainer`.\n\n###
- Set environment variables for the exec process (--env, -e)\n\nNext,
- set environment variables in the current bash session.\n\nBy default, the `docker
- exec` command, inherits the environment variables that\nare set at the time the
- container is created. Use the `--env` (or the `-e` shorthand)\nto override global
- environment variables, or to set additional environment variables\nfor the process
- started by `docker exec`.\n\nThe example below creates a new shell session in the
- container `mycontainer` with\nenvironment variables `$VAR_A` and `$VAR_B` set to
- \"1\" and \"2\" respectively.\nThese environment variables are only valid for the
- `sh` process started by that\n`docker exec` command, and are not available to other
- processes running inside\nthe container.\n\n```console\n$ docker exec -e VAR_A=1
- -e VAR_B=2 mycontainer env\nPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\nHOSTNAME=f64a4851eb71\nVAR_A=1\nVAR_B=2\nHOME=/root\n```\n\n###
- Set the working directory for the exec process (--workdir,
- -w)\n\nBy default `docker exec` command runs in the same working directory set when
- \nthe container was created.\n\n```console\n$ docker exec -it mycontainer pwd\n/\n```\n\nYou
- can specify an alternative working directory for the command to execute \nusing
- the `--workdir` option (or the `-w` shorthand):\n\n```console\n$ docker exec -it
- -w /root mycontainer pwd\n/root\n```\n\n\n### Try to run `docker exec` on a paused
- container\n\nIf the container is paused, then the `docker exec` command fails with
- an error:\n\n```console\n$ docker pause mycontainer\nmycontainer\n\n$ docker ps\n\nCONTAINER
- ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n482efdf39fac
- \ alpine \"/bin/sh\" 17 seconds ago Up 16 seconds (Paused) mycontainer\n\n$
- docker exec mycontainer sh\n\nError response from daemon: Container mycontainer
- is paused, unpause the container before exec\n\n$ echo $?\n1\n```"
+ - option: detach
+ shorthand: d
+ value_type: bool
+ default_value: "false"
+ description: 'Detached mode: run command in the background'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: detach-keys
+ value_type: string
+ description: Override the key sequence for detaching a container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env
+ shorthand: e
+ value_type: list
+ description: Set environment variables
+ details_url: '#env'
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: env-file
+ value_type: list
+ description: Read in a file of environment variables
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: interactive
+ shorthand: i
+ value_type: bool
+ default_value: "false"
+ description: Keep STDIN open even if not attached
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: privileged
+ value_type: bool
+ default_value: "false"
+ description: Give extended privileges to the command
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tty
+ shorthand: t
+ value_type: bool
+ default_value: "false"
+ description: Allocate a pseudo-TTY
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: user
+ shorthand: u
+ value_type: string
+ description: 'Username or UID (format: `[:]`)'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: workdir
+ shorthand: w
+ value_type: string
+ description: Working directory inside the container
+ details_url: '#workdir'
+ deprecated: false
+ hidden: false
+ min_api_version: "1.35"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+examples: |-
+ ### Run `docker exec` on a running container
+
+ First, start a container.
+
+ ```console
+ $ docker run --name mycontainer -d -i -t alpine /bin/sh
+ ```
+
+ This creates and starts a container named `mycontainer` from an `alpine` image
+ with an `sh` shell as its main process. The `-d` option (shorthand for `--detach`)
+ sets the container to run in the background, in detached mode, with a pseudo-TTY
+ attached (`-t`). The `-i` option is set to keep `STDIN` attached (`-i`), which
+ prevents the `sh` process from exiting immediately.
+
+ Next, execute a command on the container.
+
+ ```console
+ $ docker exec -d mycontainer touch /tmp/execWorks
+ ```
+
+ This creates a new file `/tmp/execWorks` inside the running container
+ `mycontainer`, in the background.
+
+ Next, execute an interactive `sh` shell on the container.
+
+ ```console
+ $ docker exec -it mycontainer sh
+ ```
+
+ This starts a new shell session in the container `mycontainer`.
+
+ ### Set environment variables for the exec process (--env, -e) {#env}
+
+ Next, set environment variables in the current bash session.
+
+ By default, the `docker exec` command, inherits the environment variables that
+ are set at the time the container is created. Use the `--env` (or the `-e` shorthand)
+ to override global environment variables, or to set additional environment variables
+ for the process started by `docker exec`.
+
+ The example below creates a new shell session in the container `mycontainer` with
+ environment variables `$VAR_A` and `$VAR_B` set to "1" and "2" respectively.
+ These environment variables are only valid for the `sh` process started by that
+ `docker exec` command, and are not available to other processes running inside
+ the container.
+
+ ```console
+ $ docker exec -e VAR_A=1 -e VAR_B=2 mycontainer env
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ HOSTNAME=f64a4851eb71
+ VAR_A=1
+ VAR_B=2
+ HOME=/root
+ ```
+
+ ### Set the working directory for the exec process (--workdir, -w) {#workdir}
+
+ By default `docker exec` command runs in the same working directory set when
+ the container was created.
+
+ ```console
+ $ docker exec -it mycontainer pwd
+ /
+ ```
+
+ You can specify an alternative working directory for the command to execute
+ using the `--workdir` option (or the `-w` shorthand):
+
+ ```console
+ $ docker exec -it -w /root mycontainer pwd
+ /root
+ ```
+
+
+ ### Try to run `docker exec` on a paused container
+
+ If the container is paused, then the `docker exec` command fails with an error:
+
+ ```console
+ $ docker pause mycontainer
+ mycontainer
+
+ $ docker ps
+
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ 482efdf39fac alpine "/bin/sh" 17 seconds ago Up 16 seconds (Paused) mycontainer
+
+ $ docker exec mycontainer sh
+
+ Error response from daemon: Container mycontainer is paused, unpause the container before exec
+
+ $ echo $?
+ 1
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_export.yaml b/_data/engine-cli/docker_export.yaml
index a5fd064131..1ba1846423 100644
--- a/_data/engine-cli/docker_export.yaml
+++ b/_data/engine-cli/docker_export.yaml
@@ -1,36 +1,49 @@
command: docker export
+aliases: docker container export, docker export
short: Export a container's filesystem as a tar archive
long: |-
- The `docker export` command does not export the contents of volumes associated
- with the container. If a volume is mounted on top of an existing directory in
- the container, `docker export` will export the contents of the *underlying*
- directory, not the contents of the volume.
+ The `docker export` command does not export the contents of volumes associated
+ with the container. If a volume is mounted on top of an existing directory in
+ the container, `docker export` will export the contents of the *underlying*
+ directory, not the contents of the volume.
- Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/storage/volumes/#back-up-restore-or-migrate-data-volumes)
- in the user guide for examples on exporting data in a volume.
+ Refer to [Backup, restore, or migrate data volumes](/storage/volumes/#back-up-restore-or-migrate-data-volumes)
+ in the user guide for examples on exporting data in a volume.
usage: docker export [OPTIONS] CONTAINER
pname: docker
plink: docker.yaml
options:
-- option: output
- shorthand: o
- value_type: string
- description: Write to a file, instead of STDOUT
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: output
+ shorthand: o
+ value_type: string
+ description: Write to a file, instead of STDOUT
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- Each of these commands has the same result.
+ Each of these commands has the same result.
- ```console
- $ docker export red_panda > latest.tar
- ```
+ ```console
+ $ docker export red_panda > latest.tar
+ ```
- ```console
- $ docker export --output="latest.tar" red_panda
- ```
+ ```console
+ $ docker export --output="latest.tar" red_panda
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_history.yaml b/_data/engine-cli/docker_history.yaml
index 9fa0f65fe1..e41d3b2a62 100644
--- a/_data/engine-cli/docker_history.yaml
+++ b/_data/engine-cli/docker_history.yaml
@@ -1,103 +1,126 @@
command: docker history
+aliases: docker image history, docker history
short: Show the history of an image
long: Show the history of an image
usage: docker history [OPTIONS] IMAGE
pname: docker
plink: docker.yaml
options:
-- option: format
- value_type: string
- description: Pretty-print images using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: human
- shorthand: H
- value_type: bool
- default_value: "true"
- description: Print sizes and dates in human readable format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Don't truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only show image IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ details_url: '#format'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: human
+ shorthand: H
+ value_type: bool
+ default_value: "true"
+ description: Print sizes and dates in human readable format
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Don't truncate output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only show image IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- To see how the `docker:latest` image was built:
+ To see how the `docker:latest` image was built:
- ```console
- $ docker history docker
+ ```console
+ $ docker history docker
- IMAGE CREATED CREATED BY SIZE COMMENT
- 3e23a5875458 8 days ago /bin/sh -c #(nop) ENV LC_ALL=C.UTF-8 0 B
- 8578938dd170 8 days ago /bin/sh -c dpkg-reconfigure locales && loc 1.245 MB
- be51b77efb42 8 days ago /bin/sh -c apt-get update && apt-get install 338.3 MB
- 4b137612be55 6 weeks ago /bin/sh -c #(nop) ADD jessie.tar.xz in / 121 MB
- 750d58736b4b 6 weeks ago /bin/sh -c #(nop) MAINTAINER Tianon Gravi Format the output (--format)
+ ### Format the output (--format) {#format}
- The formatting option (`--format`) will pretty-prints history output
- using a Go template.
+ The formatting option (`--format`) will pretty-prints history output
+ using a Go template.
- Valid placeholders for the Go template are listed below:
+ Valid placeholders for the Go template are listed below:
- | Placeholder | Description |
- |-----------------|-----------------------------------------------------------------------------------------------------------|
- | `.ID` | Image ID |
- | `.CreatedSince` | Elapsed time since the image was created if `--human=true`, otherwise timestamp of when image was created |
- | `.CreatedAt` | Timestamp of when image was created |
- | `.CreatedBy` | Command that was used to create the image |
- | `.Size` | Image disk size |
- | `.Comment` | Comment for image |
+ | Placeholder | Description |
+ |-----------------|-----------------------------------------------------------------------------------------------------------|
+ | `.ID` | Image ID |
+ | `.CreatedSince` | Elapsed time since the image was created if `--human=true`, otherwise timestamp of when image was created |
+ | `.CreatedAt` | Timestamp of when image was created |
+ | `.CreatedBy` | Command that was used to create the image |
+ | `.Size` | Image disk size |
+ | `.Comment` | Comment for image |
- When using the `--format` option, the `history` command will either
- output the data exactly as the template declares or, when using the
- `table` directive, will include column headers as well.
+ When using the `--format` option, the `history` command will either
+ output the data exactly as the template declares or, when using the
+ `table` directive, will include column headers as well.
- The following example uses a template without headers and outputs the
- `ID` and `CreatedSince` entries separated by a colon (`:`) for the `busybox`
- image:
+ The following example uses a template without headers and outputs the
+ `ID` and `CreatedSince` entries separated by a colon (`:`) for the `busybox`
+ image:
- ```console
- $ docker history --format "{{.ID}}: {{.CreatedSince}}" busybox
+ ```console
+ $ docker history --format "{{.ID}}: {{.CreatedSince}}" busybox
- f6e427c148a7: 4 weeks ago
- : 4 weeks ago
- ```
+ f6e427c148a7: 4 weeks ago
+ : 4 weeks ago
+ ```
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image.yaml b/_data/engine-cli/docker_image.yaml
index c094b25a6f..6e3069ae7d 100644
--- a/_data/engine-cli/docker_image.yaml
+++ b/_data/engine-cli/docker_image.yaml
@@ -5,31 +5,42 @@ usage: docker image
pname: docker
plink: docker.yaml
cname:
-- docker image build
-- docker image history
-- docker image import
-- docker image inspect
-- docker image load
-- docker image ls
-- docker image prune
-- docker image pull
-- docker image push
-- docker image rm
-- docker image save
-- docker image tag
+ - docker image build
+ - docker image history
+ - docker image import
+ - docker image inspect
+ - docker image load
+ - docker image ls
+ - docker image prune
+ - docker image pull
+ - docker image push
+ - docker image rm
+ - docker image save
+ - docker image tag
clink:
-- docker_image_build.yaml
-- docker_image_history.yaml
-- docker_image_import.yaml
-- docker_image_inspect.yaml
-- docker_image_load.yaml
-- docker_image_ls.yaml
-- docker_image_prune.yaml
-- docker_image_pull.yaml
-- docker_image_push.yaml
-- docker_image_rm.yaml
-- docker_image_save.yaml
-- docker_image_tag.yaml
+ - docker_image_build.yaml
+ - docker_image_history.yaml
+ - docker_image_import.yaml
+ - docker_image_inspect.yaml
+ - docker_image_load.yaml
+ - docker_image_ls.yaml
+ - docker_image_prune.yaml
+ - docker_image_pull.yaml
+ - docker_image_push.yaml
+ - docker_image_rm.yaml
+ - docker_image_save.yaml
+ - docker_image_tag.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_build.yaml b/_data/engine-cli/docker_image_build.yaml
index f203b67f3c..97d5599817 100644
--- a/_data/engine-cli/docker_image_build.yaml
+++ b/_data/engine-cli/docker_image_build.yaml
@@ -1,330 +1,318 @@
command: docker image build
+aliases: docker image build, docker build, docker buildx build, docker builder build
short: Build an image from a Dockerfile
-long: Build an image from a Dockerfile
+long: See [docker build](build.md) for more information.
usage: docker image build [OPTIONS] PATH | URL | -
pname: docker image
plink: docker_image.yaml
options:
-- option: add-host
- value_type: list
- description: Add a custom host-to-IP mapping (host:ip)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: build-arg
- value_type: list
- description: Set build-time variables
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cache-from
- value_type: stringSlice
- default_value: '[]'
- description: Images to consider as cache sources
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cgroup-parent
- value_type: string
- description: Optional parent cgroup for the container
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: compress
- value_type: bool
- default_value: "false"
- description: Compress the build context using gzip
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-period
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) period
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-quota
- value_type: int64
- default_value: "0"
- description: Limit the CPU CFS (Completely Fair Scheduler) quota
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpu-shares
- shorthand: c
- value_type: int64
- default_value: "0"
- description: CPU shares (relative weight)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-cpus
- value_type: string
- description: CPUs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: cpuset-mems
- value_type: string
- description: MEMs in which to allow execution (0-3, 0,1)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: file
- shorthand: f
- value_type: string
- description: Name of the Dockerfile (Default is 'PATH/Dockerfile')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force-rm
- value_type: bool
- default_value: "false"
- description: Always remove intermediate containers
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: iidfile
- value_type: string
- description: Write the image ID to the file
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: isolation
- value_type: string
- description: Container isolation technology
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: label
- value_type: list
- description: Set metadata for an image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory
- shorthand: m
- value_type: bytes
- default_value: "0"
- description: Memory limit
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: memory-swap
- value_type: bytes
- default_value: "0"
- description: |
- Swap limit equal to memory plus swap: '-1' to enable unlimited swap
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: network
- value_type: string
- default_value: default
- description: |
- Set the networking mode for the RUN instructions during build
- deprecated: false
- min_api_version: "1.25"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-cache
- value_type: bool
- default_value: "false"
- description: Do not use cache when building the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: output
- shorthand: o
- value_type: stringArray
- default_value: '[]'
- description: 'Output destination (format: type=local,dest=path)'
- deprecated: false
- min_api_version: "1.40"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.38"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: progress
- value_type: string
- default_value: auto
- description: |
- Set type of progress output (auto, plain, tty). Use plain to show container output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: pull
- value_type: bool
- default_value: "false"
- description: Always attempt to pull a newer version of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress the build output and print image ID on success
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: rm
- value_type: bool
- default_value: "true"
- description: Remove intermediate containers after a successful build
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: secret
- value_type: stringArray
- default_value: '[]'
- description: |
- Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: security-opt
- value_type: stringSlice
- default_value: '[]'
- description: Security options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: shm-size
- value_type: bytes
- default_value: "0"
- description: Size of /dev/shm
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: squash
- value_type: bool
- default_value: "false"
- description: Squash newly built layers into a single new layer
- deprecated: false
- min_api_version: "1.25"
- experimental: true
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ssh
- value_type: stringArray
- default_value: '[]'
- description: |
- SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|[=|[,]])
- deprecated: false
- min_api_version: "1.39"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: stream
- value_type: bool
- default_value: "false"
- description: Stream attaches to server to negotiate build context
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: tag
- shorthand: t
- value_type: list
- description: Name and optionally a tag in the 'name:tag' format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: target
- value_type: string
- description: Set the target build stage to build.
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: ulimit
- value_type: ulimit
- default_value: '[]'
- description: Ulimit options
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: add-host
+ value_type: list
+ description: Add a custom host-to-IP mapping (`host:ip`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: build-arg
+ value_type: list
+ description: Set build-time variables
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cache-from
+ value_type: stringSlice
+ default_value: '[]'
+ description: Images to consider as cache sources
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cgroup-parent
+ value_type: string
+ description: Optional parent cgroup for the container
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: compress
+ value_type: bool
+ default_value: "false"
+ description: Compress the build context using gzip
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-period
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) period
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-quota
+ value_type: int64
+ default_value: "0"
+ description: Limit the CPU CFS (Completely Fair Scheduler) quota
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpu-shares
+ shorthand: c
+ value_type: int64
+ default_value: "0"
+ description: CPU shares (relative weight)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-cpus
+ value_type: string
+ description: CPUs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: cpuset-mems
+ value_type: string
+ description: MEMs in which to allow execution (0-3, 0,1)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: file
+ shorthand: f
+ value_type: string
+ description: Name of the Dockerfile (Default is `PATH/Dockerfile`)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force-rm
+ value_type: bool
+ default_value: "false"
+ description: Always remove intermediate containers
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: iidfile
+ value_type: string
+ description: Write the image ID to the file
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: isolation
+ value_type: string
+ description: Container isolation technology
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: label
+ value_type: list
+ description: Set metadata for an image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory
+ shorthand: m
+ value_type: bytes
+ default_value: "0"
+ description: Memory limit
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: memory-swap
+ value_type: bytes
+ default_value: "0"
+ description: 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: network
+ value_type: string
+ default_value: default
+ description: Set the networking mode for the RUN instructions during build
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-cache
+ value_type: bool
+ default_value: "false"
+ description: Do not use cache when building the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.38"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: pull
+ value_type: bool
+ default_value: "false"
+ description: Always attempt to pull a newer version of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the build output and print image ID on success
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: rm
+ value_type: bool
+ default_value: "true"
+ description: Remove intermediate containers after a successful build
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: security-opt
+ value_type: stringSlice
+ default_value: '[]'
+ description: Security options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: shm-size
+ value_type: bytes
+ default_value: "0"
+ description: Size of `/dev/shm`
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: squash
+ value_type: bool
+ default_value: "false"
+ description: Squash newly built layers into a single new layer
+ deprecated: false
+ hidden: false
+ min_api_version: "1.25"
+ experimental: true
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: tag
+ shorthand: t
+ value_type: list
+ description: Name and optionally a tag in the `name:tag` format
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: target
+ value_type: string
+ description: Set the target build stage to build.
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: ulimit
+ value_type: ulimit
+ default_value: '[]'
+ description: Ulimit options
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_history.yaml b/_data/engine-cli/docker_image_history.yaml
index f27bf2d04d..8296b3a785 100644
--- a/_data/engine-cli/docker_image_history.yaml
+++ b/_data/engine-cli/docker_image_history.yaml
@@ -1,47 +1,69 @@
command: docker image history
+aliases: docker image history, docker history
short: Show the history of an image
-long: Show the history of an image
+long: See [docker history](history.md) for more information.
usage: docker image history [OPTIONS] IMAGE
pname: docker image
plink: docker_image.yaml
options:
-- option: format
- value_type: string
- description: Pretty-print images using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: human
- shorthand: H
- value_type: bool
- default_value: "true"
- description: Print sizes and dates in human readable format
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Don't truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only show image IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: human
+ shorthand: H
+ value_type: bool
+ default_value: "true"
+ description: Print sizes and dates in human readable format
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Don't truncate output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only show image IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_import.yaml b/_data/engine-cli/docker_image_import.yaml
index f57a2cd39a..e394a81acc 100644
--- a/_data/engine-cli/docker_image_import.yaml
+++ b/_data/engine-cli/docker_image_import.yaml
@@ -1,37 +1,52 @@
command: docker image import
+aliases: docker image import, docker import
short: Import the contents from a tarball to create a filesystem image
-long: Import the contents from a tarball to create a filesystem image
+long: See [docker import](import.md) for more information.
usage: docker image import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
pname: docker image
plink: docker_image.yaml
options:
-- option: change
- shorthand: c
- value_type: list
- description: Apply Dockerfile instruction to the created image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: message
- shorthand: m
- value_type: string
- description: Set commit message for imported image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.32"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: change
+ shorthand: c
+ value_type: list
+ description: Apply Dockerfile instruction to the created image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: message
+ shorthand: m
+ value_type: string
+ description: Set commit message for imported image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.32"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_inspect.yaml b/_data/engine-cli/docker_image_inspect.yaml
index e79573128a..04b7b74ae7 100644
--- a/_data/engine-cli/docker_image_inspect.yaml
+++ b/_data/engine-cli/docker_image_inspect.yaml
@@ -5,15 +5,31 @@ usage: docker image inspect [OPTIONS] IMAGE [IMAGE...]
pname: docker image
plink: docker_image.yaml
options:
-- option: format
- shorthand: f
- value_type: string
- description: Format the output using the given Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: format
+ shorthand: f
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_load.yaml b/_data/engine-cli/docker_image_load.yaml
index 61d47dab9b..a279c8d618 100644
--- a/_data/engine-cli/docker_image_load.yaml
+++ b/_data/engine-cli/docker_image_load.yaml
@@ -1,29 +1,43 @@
command: docker image load
+aliases: docker image load, docker load
short: Load an image from a tar archive or STDIN
-long: Load an image from a tar archive or STDIN
+long: See [docker load](load.md) for more information.
usage: docker image load [OPTIONS]
pname: docker image
plink: docker_image.yaml
options:
-- option: input
- shorthand: i
- value_type: string
- description: Read from tar archive file, instead of STDIN
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress the load output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: input
+ shorthand: i
+ value_type: string
+ description: Read from tar archive file, instead of STDIN
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress the load output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_ls.yaml b/_data/engine-cli/docker_image_ls.yaml
index 2cc8703bcc..d9abc72688 100644
--- a/_data/engine-cli/docker_image_ls.yaml
+++ b/_data/engine-cli/docker_image_ls.yaml
@@ -1,66 +1,89 @@
command: docker image ls
-aliases: list
+aliases: docker image ls, docker image list, docker images
short: List images
-long: List images
+long: See [docker images](images.md) for more information.
usage: docker image ls [OPTIONS] [REPOSITORY[:TAG]]
pname: docker image
plink: docker_image.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Show all images (default hides intermediate images)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: digests
- value_type: bool
- default_value: "false"
- description: Show digests
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: filter
- shorthand: f
- value_type: filter
- description: Filter output based on conditions provided
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Pretty-print images using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Don't truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only show image IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Show all images (default hides intermediate images)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: digests
+ value_type: bool
+ default_value: "false"
+ description: Show digests
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: filter
+ shorthand: f
+ value_type: filter
+ description: Filter output based on conditions provided
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Don't truncate output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only show image IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_prune.yaml b/_data/engine-cli/docker_image_prune.yaml
index cea6ab0a76..536c610156 100644
--- a/_data/engine-cli/docker_image_prune.yaml
+++ b/_data/engine-cli/docker_image_prune.yaml
@@ -1,212 +1,227 @@
command: docker image prune
short: Remove unused images
-long: Remove all dangling images. If `-a` is specified, will also remove all images
- not referenced by any container.
+long: |
+ Remove all dangling images. If `-a` is specified, will also remove all images not referenced by any container.
usage: docker image prune [OPTIONS]
pname: docker image
plink: docker_image.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Remove all unused images, not just dangling ones
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: filter
- value_type: filter
- description: Provide filter values (e.g. 'until=')
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Do not prompt for confirmation
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Remove all unused images, not just dangling ones
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: filter
+ value_type: filter
+ description: Provide filter values (e.g. `until=`)
+ details_url: '#filter'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Do not prompt for confirmation
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- Example output:
+ Example output:
- ```console
- $ docker image prune -a
+ ```console
+ $ docker image prune -a
- WARNING! This will remove all images without at least one container associated to them.
- Are you sure you want to continue? [y/N] y
- Deleted Images:
- untagged: alpine:latest
- untagged: alpine@sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
- deleted: sha256:4e38e38c8ce0b8d9041a9c4fefe786631d1416225e13b0bfe8cfa2321aec4bba
- deleted: sha256:4fe15f8d0ae69e169824f25f1d4da3015a48feeeeebb265cd2e328e15c6a869f
- untagged: alpine:3.3
- untagged: alpine@sha256:4fa633f4feff6a8f02acfc7424efd5cb3e76686ed3218abf4ca0fa4a2a358423
- untagged: my-jq:latest
- deleted: sha256:ae67841be6d008a374eff7c2a974cde3934ffe9536a7dc7ce589585eddd83aff
- deleted: sha256:34f6f1261650bc341eb122313372adc4512b4fceddc2a7ecbb84f0958ce5ad65
- deleted: sha256:cf4194e8d8db1cb2d117df33f2c75c0369c3a26d96725efb978cc69e046b87e7
- untagged: my-curl:latest
- deleted: sha256:b2789dd875bf427de7f9f6ae001940073b3201409b14aba7e5db71f408b8569e
- deleted: sha256:96daac0cb203226438989926fc34dd024f365a9a8616b93e168d303cfe4cb5e9
- deleted: sha256:5cbd97a14241c9cd83250d6b6fc0649833c4a3e84099b968dd4ba403e609945e
- deleted: sha256:a0971c4015c1e898c60bf95781c6730a05b5d8a2ae6827f53837e6c9d38efdec
- deleted: sha256:d8359ca3b681cc5396a4e790088441673ed3ce90ebc04de388bfcd31a0716b06
- deleted: sha256:83fc9ba8fb70e1da31dfcc3c88d093831dbd4be38b34af998df37e8ac538260c
- deleted: sha256:ae7041a4cc625a9c8e6955452f7afe602b401f662671cea3613f08f3d9343b35
- deleted: sha256:35e0f43a37755b832f0bbea91a2360b025ee351d7309dae0d9737bc96b6d0809
- deleted: sha256:0af941dd29f00e4510195dd00b19671bc591e29d1495630e7e0f7c44c1e6a8c0
- deleted: sha256:9fc896fc2013da84f84e45b3096053eb084417b42e6b35ea0cce5a3529705eac
- deleted: sha256:47cf20d8c26c46fff71be614d9f54997edacfe8d46d51769706e5aba94b16f2b
- deleted: sha256:2c675ee9ed53425e31a13e3390bf3f539bf8637000e4bcfbb85ee03ef4d910a1
+ WARNING! This will remove all images without at least one container associated to them.
+ Are you sure you want to continue? [y/N] y
+ Deleted Images:
+ untagged: alpine:latest
+ untagged: alpine@sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
+ deleted: sha256:4e38e38c8ce0b8d9041a9c4fefe786631d1416225e13b0bfe8cfa2321aec4bba
+ deleted: sha256:4fe15f8d0ae69e169824f25f1d4da3015a48feeeeebb265cd2e328e15c6a869f
+ untagged: alpine:3.3
+ untagged: alpine@sha256:4fa633f4feff6a8f02acfc7424efd5cb3e76686ed3218abf4ca0fa4a2a358423
+ untagged: my-jq:latest
+ deleted: sha256:ae67841be6d008a374eff7c2a974cde3934ffe9536a7dc7ce589585eddd83aff
+ deleted: sha256:34f6f1261650bc341eb122313372adc4512b4fceddc2a7ecbb84f0958ce5ad65
+ deleted: sha256:cf4194e8d8db1cb2d117df33f2c75c0369c3a26d96725efb978cc69e046b87e7
+ untagged: my-curl:latest
+ deleted: sha256:b2789dd875bf427de7f9f6ae001940073b3201409b14aba7e5db71f408b8569e
+ deleted: sha256:96daac0cb203226438989926fc34dd024f365a9a8616b93e168d303cfe4cb5e9
+ deleted: sha256:5cbd97a14241c9cd83250d6b6fc0649833c4a3e84099b968dd4ba403e609945e
+ deleted: sha256:a0971c4015c1e898c60bf95781c6730a05b5d8a2ae6827f53837e6c9d38efdec
+ deleted: sha256:d8359ca3b681cc5396a4e790088441673ed3ce90ebc04de388bfcd31a0716b06
+ deleted: sha256:83fc9ba8fb70e1da31dfcc3c88d093831dbd4be38b34af998df37e8ac538260c
+ deleted: sha256:ae7041a4cc625a9c8e6955452f7afe602b401f662671cea3613f08f3d9343b35
+ deleted: sha256:35e0f43a37755b832f0bbea91a2360b025ee351d7309dae0d9737bc96b6d0809
+ deleted: sha256:0af941dd29f00e4510195dd00b19671bc591e29d1495630e7e0f7c44c1e6a8c0
+ deleted: sha256:9fc896fc2013da84f84e45b3096053eb084417b42e6b35ea0cce5a3529705eac
+ deleted: sha256:47cf20d8c26c46fff71be614d9f54997edacfe8d46d51769706e5aba94b16f2b
+ deleted: sha256:2c675ee9ed53425e31a13e3390bf3f539bf8637000e4bcfbb85ee03ef4d910a1
- Total reclaimed space: 16.43 MB
- ```
+ Total reclaimed space: 16.43 MB
+ ```
- ### Filtering (--filter)
+ ### Filtering (--filter) {#filter}
- The filtering flag (`--filter`) format is of "key=value". If there is more
- than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
+ The filtering flag (`--filter`) format is of "key=value". If there is more
+ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
- The currently supported filters are:
+ The currently supported filters are:
- * until (``) - only remove images created before given timestamp
- * label (`label=`, `label==`, `label!=`, or `label!==`) - only remove images with (or without, in case `label!=...` is used) the specified labels.
+ * until (``) - only remove images created before given timestamp
+ * label (`label=`, `label==`, `label!=`, or `label!==`) - only remove images with (or without, in case `label!=...` is used) the specified labels.
- The `until` filter can be Unix timestamps, date formatted
- timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
- relative to the daemon machine’s time. Supported formats for date
- formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
- `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
- timezone on the daemon will be used if you do not provide either a `Z` or a
- `+-00:00` timezone offset at the end of the timestamp. When providing Unix
- timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
- that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
- seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
- fraction of a second no more than nine digits long.
+ The `until` filter can be Unix timestamps, date formatted
+ timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
+ relative to the daemon machine’s time. Supported formats for date
+ formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
+ `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
+ timezone on the daemon will be used if you do not provide either a `Z` or a
+ `+-00:00` timezone offset at the end of the timestamp. When providing Unix
+ timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
+ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
+ seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
+ fraction of a second no more than nine digits long.
- The `label` filter accepts two formats. One is the `label=...` (`label=` or `label==`),
- which removes images with the specified labels. The other
- format is the `label!=...` (`label!=` or `label!==`), which removes
- images without the specified labels.
+ The `label` filter accepts two formats. One is the `label=...` (`label=` or `label==`),
+ which removes images with the specified labels. The other
+ format is the `label!=...` (`label!=` or `label!==`), which removes
+ images without the specified labels.
- > **Predicting what will be removed**
- >
- > If you are using positive filtering (testing for the existence of a label or
- > that a label has a specific value), you can use `docker image ls` with the
- > same filtering syntax to see which images match your filter.
- >
- > However, if you are using negative filtering (testing for the absence of a
- > label or that a label does *not* have a specific value), this type of filter
- > does not work with `docker image ls` so you cannot easily predict which images
- > will be removed. In addition, the confirmation prompt for `docker image prune`
- > always warns that *all* dangling images will be removed, even if you are using
- > `--filter`.
+ > **Predicting what will be removed**
+ >
+ > If you are using positive filtering (testing for the existence of a label or
+ > that a label has a specific value), you can use `docker image ls` with the
+ > same filtering syntax to see which images match your filter.
+ >
+ > However, if you are using negative filtering (testing for the absence of a
+ > label or that a label does *not* have a specific value), this type of filter
+ > does not work with `docker image ls` so you cannot easily predict which images
+ > will be removed. In addition, the confirmation prompt for `docker image prune`
+ > always warns that *all* dangling images will be removed, even if you are using
+ > `--filter`.
- The following removes images created before `2017-01-04T00:00:00`:
+ The following removes images created before `2017-01-04T00:00:00`:
- ```console
- $ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
- REPOSITORY TAG IMAGE ID CREATED AT SIZE
- foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
- alpine latest 88e169ea8f46 2016-12-27 10:17:25 -0800 PST 3.98 MB
- busybox latest e02e811dd08f 2016-10-07 14:03:58 -0700 PDT 1.09 MB
+ ```console
+ $ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
+ REPOSITORY TAG IMAGE ID CREATED AT SIZE
+ foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
+ alpine latest 88e169ea8f46 2016-12-27 10:17:25 -0800 PST 3.98 MB
+ busybox latest e02e811dd08f 2016-10-07 14:03:58 -0700 PDT 1.09 MB
- $ docker image prune -a --force --filter "until=2017-01-04T00:00:00"
+ $ docker image prune -a --force --filter "until=2017-01-04T00:00:00"
- Deleted Images:
- untagged: alpine:latest
- untagged: alpine@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
- untagged: busybox:latest
- untagged: busybox@sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912
- deleted: sha256:e02e811dd08fd49e7f6032625495118e63f597eb150403d02e3238af1df240ba
- deleted: sha256:e88b3f82283bc59d5e0df427c824e9f95557e661fcb0ea15fb0fb6f97760f9d9
+ Deleted Images:
+ untagged: alpine:latest
+ untagged: alpine@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
+ untagged: busybox:latest
+ untagged: busybox@sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912
+ deleted: sha256:e02e811dd08fd49e7f6032625495118e63f597eb150403d02e3238af1df240ba
+ deleted: sha256:e88b3f82283bc59d5e0df427c824e9f95557e661fcb0ea15fb0fb6f97760f9d9
- Total reclaimed space: 1.093 MB
+ Total reclaimed space: 1.093 MB
- $ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
+ $ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
- REPOSITORY TAG IMAGE ID CREATED AT SIZE
- foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
- ```
+ REPOSITORY TAG IMAGE ID CREATED AT SIZE
+ foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
+ ```
- The following removes images created more than 10 days (`240h`) ago:
+ The following removes images created more than 10 days (`240h`) ago:
- ```console
- $ docker images
+ ```console
+ $ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- foo latest 2f287ac753da 14 seconds ago 3.98 MB
- alpine latest 88e169ea8f46 8 days ago 3.98 MB
- debian jessie 7b0a06c805e8 2 months ago 123 MB
- busybox latest e02e811dd08f 2 months ago 1.09 MB
- golang 1.7.0 138c2e655421 4 months ago 670 MB
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ foo latest 2f287ac753da 14 seconds ago 3.98 MB
+ alpine latest 88e169ea8f46 8 days ago 3.98 MB
+ debian jessie 7b0a06c805e8 2 months ago 123 MB
+ busybox latest e02e811dd08f 2 months ago 1.09 MB
+ golang 1.7.0 138c2e655421 4 months ago 670 MB
- $ docker image prune -a --force --filter "until=240h"
+ $ docker image prune -a --force --filter "until=240h"
- Deleted Images:
- untagged: golang:1.7.0
- untagged: golang@sha256:6765038c2b8f407fd6e3ecea043b44580c229ccfa2a13f6d85866cf2b4a9628e
- deleted: sha256:138c2e6554219de65614d88c15521bfb2da674cbb0bf840de161f89ff4264b96
- deleted: sha256:ec353c2e1a673f456c4b78906d0d77f9d9456cfb5229b78c6a960bfb7496b76a
- deleted: sha256:fe22765feaf3907526b4921c73ea6643ff9e334497c9b7e177972cf22f68ee93
- deleted: sha256:ff845959c80148421a5c3ae11cc0e6c115f950c89bc949646be55ed18d6a2912
- deleted: sha256:a4320831346648c03db64149eafc83092e2b34ab50ca6e8c13112388f25899a7
- deleted: sha256:4c76020202ee1d9709e703b7c6de367b325139e74eebd6b55b30a63c196abaf3
- deleted: sha256:d7afd92fb07236c8a2045715a86b7d5f0066cef025018cd3ca9a45498c51d1d6
- deleted: sha256:9e63c5bce4585dd7038d830a1f1f4e44cb1a1515b00e620ac718e934b484c938
- untagged: debian:jessie
- untagged: debian@sha256:c1af755d300d0c65bb1194d24bce561d70c98a54fb5ce5b1693beb4f7988272f
- deleted: sha256:7b0a06c805e8f23807fb8856621c60851727e85c7bcb751012c813f122734c8d
- deleted: sha256:f96222d75c5563900bc4dd852179b720a0885de8f7a0619ba0ac76e92542bbc8
+ Deleted Images:
+ untagged: golang:1.7.0
+ untagged: golang@sha256:6765038c2b8f407fd6e3ecea043b44580c229ccfa2a13f6d85866cf2b4a9628e
+ deleted: sha256:138c2e6554219de65614d88c15521bfb2da674cbb0bf840de161f89ff4264b96
+ deleted: sha256:ec353c2e1a673f456c4b78906d0d77f9d9456cfb5229b78c6a960bfb7496b76a
+ deleted: sha256:fe22765feaf3907526b4921c73ea6643ff9e334497c9b7e177972cf22f68ee93
+ deleted: sha256:ff845959c80148421a5c3ae11cc0e6c115f950c89bc949646be55ed18d6a2912
+ deleted: sha256:a4320831346648c03db64149eafc83092e2b34ab50ca6e8c13112388f25899a7
+ deleted: sha256:4c76020202ee1d9709e703b7c6de367b325139e74eebd6b55b30a63c196abaf3
+ deleted: sha256:d7afd92fb07236c8a2045715a86b7d5f0066cef025018cd3ca9a45498c51d1d6
+ deleted: sha256:9e63c5bce4585dd7038d830a1f1f4e44cb1a1515b00e620ac718e934b484c938
+ untagged: debian:jessie
+ untagged: debian@sha256:c1af755d300d0c65bb1194d24bce561d70c98a54fb5ce5b1693beb4f7988272f
+ deleted: sha256:7b0a06c805e8f23807fb8856621c60851727e85c7bcb751012c813f122734c8d
+ deleted: sha256:f96222d75c5563900bc4dd852179b720a0885de8f7a0619ba0ac76e92542bbc8
- Total reclaimed space: 792.6 MB
+ Total reclaimed space: 792.6 MB
- $ docker images
+ $ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- foo latest 2f287ac753da About a minute ago 3.98 MB
- alpine latest 88e169ea8f46 8 days ago 3.98 MB
- busybox latest e02e811dd08f 2 months ago 1.09 MB
- ```
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ foo latest 2f287ac753da About a minute ago 3.98 MB
+ alpine latest 88e169ea8f46 8 days ago 3.98 MB
+ busybox latest e02e811dd08f 2 months ago 1.09 MB
+ ```
- The following example removes images with the label `deprecated`:
+ The following example removes images with the label `deprecated`:
- ```console
- $ docker image prune --filter="label=deprecated"
- ```
+ ```console
+ $ docker image prune --filter="label=deprecated"
+ ```
- The following example removes images with the label `maintainer` set to `john`:
+ The following example removes images with the label `maintainer` set to `john`:
- ```console
- $ docker image prune --filter="label=maintainer=john"
- ```
+ ```console
+ $ docker image prune --filter="label=maintainer=john"
+ ```
- This example removes images which have no `maintainer` label:
+ This example removes images which have no `maintainer` label:
- ```console
- $ docker image prune --filter="label!=maintainer"
- ```
+ ```console
+ $ docker image prune --filter="label!=maintainer"
+ ```
- This example removes images which have a maintainer label not set to `john`:
+ This example removes images which have a maintainer label not set to `john`:
- ```console
- $ docker image prune --filter="label!=maintainer=john"
- ```
+ ```console
+ $ docker image prune --filter="label!=maintainer=john"
+ ```
- > **Note**
- >
- > You are prompted for confirmation before the `prune` removes
- > anything, but you are not shown a list of what will potentially be removed.
- > In addition, `docker image ls` does not support negative filtering, so it
- > difficult to predict what images will actually be removed.
+ > **Note**
+ >
+ > You are prompted for confirmation before the `prune` removes
+ > anything, but you are not shown a list of what will potentially be removed.
+ > In addition, `docker image ls` does not support negative filtering, so it
+ > difficult to predict what images will actually be removed.
deprecated: false
min_api_version: "1.25"
experimental: false
diff --git a/_data/engine-cli/docker_image_pull.yaml b/_data/engine-cli/docker_image_pull.yaml
index 038c6f91b2..a76ef51291 100644
--- a/_data/engine-cli/docker_image_pull.yaml
+++ b/_data/engine-cli/docker_image_pull.yaml
@@ -1,48 +1,64 @@
command: docker image pull
-short: Pull an image or a repository from a registry
-long: Pull an image or a repository from a registry
+aliases: docker image pull, docker pull
+short: Download an image from a registry
+long: See [docker pull](pull.md) for more information.
usage: docker image pull [OPTIONS] NAME[:TAG|@DIGEST]
pname: docker image
plink: docker_image.yaml
options:
-- option: all-tags
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Download all tagged images in the repository
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image verification
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: platform
- value_type: string
- description: Set platform if server is multi-platform capable
- deprecated: false
- min_api_version: "1.32"
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress verbose output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all-tags
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Download all tagged images in the repository
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image verification
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: platform
+ value_type: string
+ description: Set platform if server is multi-platform capable
+ deprecated: false
+ hidden: false
+ min_api_version: "1.32"
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress verbose output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_push.yaml b/_data/engine-cli/docker_image_push.yaml
index cf9e6e77b8..9408c2ec8c 100644
--- a/_data/engine-cli/docker_image_push.yaml
+++ b/_data/engine-cli/docker_image_push.yaml
@@ -1,39 +1,54 @@
command: docker image push
-short: Push an image or a repository to a registry
-long: Push an image or a repository to a registry
+aliases: docker image push, docker push
+short: Upload an image to a registry
+long: See [docker push](push.md) for more information.
usage: docker image push [OPTIONS] NAME[:TAG]
pname: docker image
plink: docker_image.yaml
options:
-- option: all-tags
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Push all tagged images in the repository
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: disable-content-trust
- value_type: bool
- default_value: "true"
- description: Skip image signing
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Suppress verbose output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all-tags
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Push all tags of an image to the repository
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: disable-content-trust
+ value_type: bool
+ default_value: "true"
+ description: Skip image signing
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Suppress verbose output
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_rm.yaml b/_data/engine-cli/docker_image_rm.yaml
index c60a498429..26af7d8e53 100644
--- a/_data/engine-cli/docker_image_rm.yaml
+++ b/_data/engine-cli/docker_image_rm.yaml
@@ -1,30 +1,43 @@
command: docker image rm
-aliases: rmi, remove
+aliases: docker image rm, docker image remove, docker rmi
short: Remove one or more images
-long: Remove one or more images
+long: See [docker rmi](rmi.md) for more information.
usage: docker image rm [OPTIONS] IMAGE [IMAGE...]
pname: docker image
plink: docker_image.yaml
options:
-- option: force
- shorthand: f
- value_type: bool
- default_value: "false"
- description: Force removal of the image
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-prune
- value_type: bool
- default_value: "false"
- description: Do not delete untagged parents
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: force
+ shorthand: f
+ value_type: bool
+ default_value: "false"
+ description: Force removal of the image
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-prune
+ value_type: bool
+ default_value: "false"
+ description: Do not delete untagged parents
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_save.yaml b/_data/engine-cli/docker_image_save.yaml
index 1fbdbb1a05..bfc4988165 100644
--- a/_data/engine-cli/docker_image_save.yaml
+++ b/_data/engine-cli/docker_image_save.yaml
@@ -1,19 +1,32 @@
command: docker image save
+aliases: docker image save, docker save
short: Save one or more images to a tar archive (streamed to STDOUT by default)
-long: Save one or more images to a tar archive (streamed to STDOUT by default)
+long: See [docker save](save.md) for more information.
usage: docker image save [OPTIONS] IMAGE [IMAGE...]
pname: docker image
plink: docker_image.yaml
options:
-- option: output
- shorthand: o
- value_type: string
- description: Write to a file, instead of STDOUT
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: output
+ shorthand: o
+ value_type: string
+ description: Write to a file, instead of STDOUT
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_image_tag.yaml b/_data/engine-cli/docker_image_tag.yaml
index 3830ef1b8d..fa8091a522 100644
--- a/_data/engine-cli/docker_image_tag.yaml
+++ b/_data/engine-cli/docker_image_tag.yaml
@@ -1,9 +1,21 @@
command: docker image tag
+aliases: docker image tag, docker tag
short: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
-long: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
+long: See [docker tag](tag.md) for more information.
usage: docker image tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
pname: docker image
plink: docker_image.yaml
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
deprecated: false
experimental: false
experimentalcli: false
diff --git a/_data/engine-cli/docker_images.yaml b/_data/engine-cli/docker_images.yaml
index 4f1795e259..ecc60e853c 100644
--- a/_data/engine-cli/docker_images.yaml
+++ b/_data/engine-cli/docker_images.yaml
@@ -1,376 +1,412 @@
command: docker images
+aliases: docker image ls, docker image list, docker images
short: List images
long: |-
- The default `docker images` will show all top level
- images, their repository and tags, and their size.
+ The default `docker images` will show all top level
+ images, their repository and tags, and their size.
- Docker images have intermediate layers that increase reusability,
- decrease disk usage, and speed up `docker build` by
- allowing each step to be cached. These intermediate layers are not shown
- by default.
+ Docker images have intermediate layers that increase reusability,
+ decrease disk usage, and speed up `docker build` by
+ allowing each step to be cached. These intermediate layers are not shown
+ by default.
- The `SIZE` is the cumulative space taken up by the image and all
- its parent images. This is also the disk space used by the contents of the
- Tar file created when you `docker save` an image.
+ The `SIZE` is the cumulative space taken up by the image and all
+ its parent images. This is also the disk space used by the contents of the
+ Tar file created when you `docker save` an image.
- An image will be listed more than once if it has multiple repository names
- or tags. This single image (identifiable by its matching `IMAGE ID`)
- uses up the `SIZE` listed only once.
+ An image will be listed more than once if it has multiple repository names
+ or tags. This single image (identifiable by its matching `IMAGE ID`)
+ uses up the `SIZE` listed only once.
usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
pname: docker
plink: docker.yaml
options:
-- option: all
- shorthand: a
- value_type: bool
- default_value: "false"
- description: Show all images (default hides intermediate images)
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: digests
- value_type: bool
- default_value: "false"
- description: Show digests
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: filter
- shorthand: f
- value_type: filter
- description: Filter output based on conditions provided
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: format
- value_type: string
- description: Pretty-print images using a Go template
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: no-trunc
- value_type: bool
- default_value: "false"
- description: Don't truncate output
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
-- option: quiet
- shorthand: q
- value_type: bool
- default_value: "false"
- description: Only show image IDs
- deprecated: false
- experimental: false
- experimentalcli: false
- kubernetes: false
- swarm: false
+ - option: all
+ shorthand: a
+ value_type: bool
+ default_value: "false"
+ description: Show all images (default hides intermediate images)
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: digests
+ value_type: bool
+ default_value: "false"
+ description: Show digests
+ details_url: '#digests'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: filter
+ shorthand: f
+ value_type: filter
+ description: Filter output based on conditions provided
+ details_url: '#filter'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: format
+ value_type: string
+ description: |-
+ Format output using a custom template:
+ 'table': Print output in table format with column headers (default)
+ 'table TEMPLATE': Print output in table format using the given Go template
+ 'json': Print in JSON format
+ 'TEMPLATE': Print output using the given Go template.
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
+ details_url: '#format'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: no-trunc
+ value_type: bool
+ default_value: "false"
+ description: Don't truncate output
+ details_url: '#no-trunc'
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+ - option: quiet
+ shorthand: q
+ value_type: bool
+ default_value: "false"
+ description: Only show image IDs
+ deprecated: false
+ hidden: false
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
+inherited_options:
+ - option: help
+ value_type: bool
+ default_value: "false"
+ description: Print usage
+ deprecated: false
+ hidden: true
+ experimental: false
+ experimentalcli: false
+ kubernetes: false
+ swarm: false
examples: |-
- ### List the most recently created images
+ ### List the most recently created images
- ```console
- $ docker images
+ ```console
+ $ docker images
- REPOSITORY TAG IMAGE ID CREATED SIZE
- 77af4d6b9913 19 hours ago 1.089 GB
- committ latest b6fa739cedf5 19 hours ago 1.089 GB
- 78a85c484f71 19 hours ago 1.089 GB
- docker latest 30557a29d5ab 20 hours ago 1.089 GB
- 5ed6274db6ce 24 hours ago 1.089 GB
- postgres 9 746b819f315e 4 days ago 213.4 MB
- postgres 9.3 746b819f315e 4 days ago 213.4 MB
- postgres 9.3.5 746b819f315e 4 days ago 213.4 MB
- postgres latest 746b819f315e 4 days ago 213.4 MB
- ```
-
- ### List images by name and tag
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ 77af4d6b9913 19 hours ago 1.089 GB
+ committ latest b6fa739cedf5 19 hours ago 1.089 GB
+ 78a85c484f71 19 hours ago 1.089 GB
+ docker latest 30557a29d5ab 20 hours ago 1.089 GB
+ 5ed6274db6ce 24 hours ago 1.089 GB
+ postgres 9 746b819f315e 4 days ago 213.4 MB
+ postgres 9.3 746b819f315e 4 days ago 213.4 MB
+ postgres 9.3.5 746b819f315e 4 days ago 213.4 MB
+ postgres latest 746b819f315e 4 days ago 213.4 MB
+ ```
+
+ ### List images by name and tag
- The `docker images` command takes an optional `[REPOSITORY[:TAG]]` argument
- that restricts the list to images that match the argument. If you specify
- `REPOSITORY`but no `TAG`, the `docker images` command lists all images in the
- given repository.
-
- For example, to list all images in the "java" repository, run this command :
-
- ```console
- $ docker images java
-
- REPOSITORY TAG IMAGE ID CREATED SIZE
- java 8 308e519aac60 6 days ago 824.5 MB
- java 7 493d82594c15 3 months ago 656.3 MB
- java latest 2711b1d6f3aa 5 months ago 603.9 MB
- ```
-
- The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example,
- `docker images jav` does not match the image `java`.
-
- If both `REPOSITORY` and `TAG` are provided, only images matching that
- repository and tag are listed. To find all local images in the "java"
- repository with tag "8" you can use:
+ The `docker images` command takes an optional `[REPOSITORY[:TAG]]` argument
+ that restricts the list to images that match the argument. If you specify
+ `REPOSITORY`but no `TAG`, the `docker images` command lists all images in the
+ given repository.
+
+ For example, to list all images in the "java" repository, run this command :
+
+ ```console
+ $ docker images java
+
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ java 8 308e519aac60 6 days ago 824.5 MB
+ java 7 493d82594c15 3 months ago 656.3 MB
+ java latest 2711b1d6f3aa 5 months ago 603.9 MB
+ ```
+
+ The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example,
+ `docker images jav` does not match the image `java`.
+
+ If both `REPOSITORY` and `TAG` are provided, only images matching that
+ repository and tag are listed. To find all local images in the "java"
+ repository with tag "8" you can use:
- ```console
- $ docker images java:8
+ ```console
+ $ docker images java:8
- REPOSITORY TAG IMAGE ID CREATED SIZE
- java 8 308e519aac60 6 days ago 824.5 MB
- ```
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ java 8 308e519aac60 6 days ago 824.5 MB
+ ```
- If nothing matches `REPOSITORY[:TAG]`, the list is empty.
+ If nothing matches `REPOSITORY[:TAG]`, the list is empty.
- ```console
- $ docker images java:0
+ ```console
+ $ docker images java:0
- REPOSITORY TAG IMAGE ID CREATED SIZE
- ```
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ ```
- ### List the full length image IDs (--no-trunc)
+ ### List the full length image IDs (--no-trunc) {#no-trunc}
- ```console
- $ docker images --no-trunc
+ ```console
+ $ docker images --no-trunc
- REPOSITORY TAG IMAGE ID CREATED SIZE
- sha256:77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB
- committest latest sha256:b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB
- sha256:78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB
- docker latest sha256:30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB
- sha256:0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB
- sha256:18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB
- sha256:f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB
- tryout latest sha256:2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB
- sha256:5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB
- ```
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ sha256:77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB
+ committest latest sha256:b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB
+ sha256:78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB
+ docker latest sha256:30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB
+ sha256:0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB
+ sha256:18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB
+ sha256:f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB
+ tryout latest sha256:2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB
+ sha256:5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB
+ ```
- ### List image digests (--digests)
+ ### List image digests (--digests) {#digests}
- Images that use the v2 or later format have a content-addressable identifier
- called a `digest`. As long as the input used to generate the image is
- unchanged, the digest value is predictable. To list image digest values, use
- the `--digests` flag:
+ Images that use the v2 or later format have a content-addressable identifier
+ called a `digest`. As long as the input used to generate the image is
+ unchanged, the digest value is predictable. To list image digest values, use
+ the `--digests` flag:
- ```console
- $ docker images --digests
- REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
- localhost:5000/test/busybox sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf 4986bf8c1536 9 weeks ago 2.43 MB
- ```
+ ```console
+ $ docker images --digests
+ REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
+ localhost:5000/test/busybox sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf 4986bf8c1536 9 weeks ago 2.43 MB
+ ```
- When pushing or pulling to a 2.0 registry, the `push` or `pull` command
- output includes the image digest. You can `pull` using a digest value. You can
- also reference by digest in `create`, `run`, and `rmi` commands, as well as the
- `FROM` image reference in a Dockerfile.
+ When pushing or pulling to a 2.0 registry, the `push` or `pull` command
+ output includes the image digest. You can `pull` using a digest value. You can
+ also reference by digest in `create`, `run`, and `rmi` commands, as well as the
+ `FROM` image reference in a Dockerfile.
- ### Filtering (--filter)
+ ### Filtering (--filter) {#filter}
- The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
- than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
+ The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
+ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
- The currently supported filters are:
+ The currently supported filters are:
- * dangling (boolean - true or false)
- * label (`label=` or `label==`)
- * before (`[:]`, `` or ``) - filter images created before given id or references
- * since (`[:]`, `` or ``) - filter images created since given id or references
- * reference (pattern of an image reference) - filter images whose reference matches the specified pattern
+ * dangling (boolean - true or false)
+ * label (`label=` or `label==`)
+ * before (`[:]`, `` or ``) - filter images created before given id or references
+ * since (`[:]`, `` or ``) - filter images created since given id or references
+ * reference (pattern of an image reference) - filter images whose reference matches the specified pattern
- #### Show untagged images (dangling)
+ #### Show untagged images (dangling)
- ```console
- $ docker images --filter "dangling=true"
+ ```console
+ $ docker images --filter "dangling=true"
- REPOSITORY TAG IMAGE ID CREATED SIZE
- 8abc22fbb042 4 weeks ago 0 B
- 48e5f45168b9 4 weeks ago 2.489 MB
- bf747efa0e2f 4 weeks ago 0 B
- 980fe10e5736 12 weeks ago 101.4 MB
- dea752e4e117 12 weeks ago 101.4 MB
- 511136ea3c5a 8 months ago 0 B
- ```
+ REPOSITORY TAG IMAGE ID CREATED SIZE
+ 8abc22fbb042 4 weeks ago 0 B
+ 48e5f45168b9 4 weeks ago 2.489 MB
+