mirror of https://github.com/docker/docs.git
Merge branch 'master' into 404-fix
This commit is contained in:
commit
c85c65eaec
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="1; url=https://docs.docker.com" />
|
||||
<title>Docker Documentation</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>We have moved away from the <strong>docker.github.io</strong> domain. If you're not automatically redirected, please visit us at <a href="https://docs.docker.com">docs.docker.com</a>.</p>
|
||||
|
||||
<script>
|
||||
window.location.assign("https://docs.docker.com" + window.location.pathname);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
10
404.md
10
404.md
|
@ -6,11 +6,5 @@ notoc: true
|
|||
tree: false
|
||||
---
|
||||
|
||||
It seems the page you're looking for doesn't exist. Maybe you're on the wrong
|
||||
track, maybe you found a broken link. Who knows?
|
||||
|
||||
Either way, here's a couple of options for you:
|
||||
|
||||
* [Open an issue](https://github.com/docker/docker.github.io/issues/new?title=I%20found%20a%20broken%20link&body=%3CDescribe%20how%20you%20got%20there%3E)
|
||||
* [Go to back](/)
|
||||
* [Tweet us something](https://twitter.com/docker)
|
||||

|
||||
Please file an issue at [https://github.com/docker/docker.github.io](https://github.com/docker/docker.github.io/issues/new).
|
||||
|
|
|
@ -1,25 +1,92 @@
|
|||
wrappedNode(label: 'ubuntu-1604 && x86_64') {
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
deleteDir()
|
||||
stage "checkout"
|
||||
checkout scm
|
||||
sh "git submodule update --init --recursive"
|
||||
stage "test"
|
||||
def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io"
|
||||
def ucpBundle = [file(credentialsId: "ucp-bundle", variable: 'UCP')]
|
||||
def slackString = [string(credentialsId: 'slack-docs-webhook', variable: 'slack')]
|
||||
def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/']
|
||||
|
||||
/* Jekyll creates html files to implement client side redirects.
|
||||
There are absolute links to docs.docker.com in these htmls
|
||||
we don't want them to be parsed by the tests for now.
|
||||
Removing jekyll-redirect-from option will make sure these pages
|
||||
are not generated when building with Jekyll. */
|
||||
sh "awk '/jekyll-redirect-from/{n=1}; n {n--; next}; 1' < _config.yml > _config.yml.tmp"
|
||||
sh "mv _config.yml.tmp _config.yml"
|
||||
|
||||
sh "docker build -t docs:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`"
|
||||
sh "docker build -t tests:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`/tests"
|
||||
sh "docker run -v /usr/src/app/allvbuild --name docs-${JOB_BASE_NAME}-${BUILD_NUMBER} docs:${JOB_BASE_NAME}-${BUILD_NUMBER} /bin/true"
|
||||
sh "docker run --rm --volumes-from docs-${JOB_BASE_NAME}-${BUILD_NUMBER} -v `pwd`:/docs tests:${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||
sh "docker rm -fv docs-${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||
sh "docker rmi docs:${JOB_BASE_NAME}-${BUILD_NUMBER} tests:${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||
deleteDir()
|
||||
pipeline {
|
||||
agent none
|
||||
options {
|
||||
timeout(time: 1, unit: 'HOURS')
|
||||
}
|
||||
stages {
|
||||
stage( 'docker.github.io' ) {
|
||||
agent {
|
||||
label 'ubuntu-1604-aufs-stable'
|
||||
}
|
||||
stages {
|
||||
stage( 'build and push stage image' ) {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
docker image build --tag docs/docker.github.io:stage-${env.BUILD_NUMBER} . && \
|
||||
docker image push docs/docker.github.io:stage-${env.BUILD_NUMBER}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
stage( 'build and push prod image' ) {
|
||||
when {
|
||||
branch 'published'
|
||||
}
|
||||
steps {
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
docker image build --tag docs/docker.github.io:prod-${env.BUILD_NUMBER} . && \
|
||||
docker image push docs/docker.github.io:prod-${env.BUILD_NUMBER}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
stage( 'update docs-stage' ) {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
withVpn(dtrVpnAddress) {
|
||||
withCredentials(ucpBundle) {
|
||||
sh 'unzip -o $UCP'
|
||||
}
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
export DOCKER_TLS_VERIFY=1
|
||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||
export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443
|
||||
docker service update --detach=false --force --image docs/docker.github.io:stage-${env.BUILD_NUMBER} docs-stage-docker-com_docs --with-registry-auth
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage( 'update docs-prod' ) {
|
||||
when {
|
||||
branch 'published'
|
||||
}
|
||||
steps {
|
||||
withVpn(dtrVpnAddress) {
|
||||
withCredentials(ucpBundle) {
|
||||
sh 'unzip -o $UCP'
|
||||
}
|
||||
withCredentials(slackString) {
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
cd ucp-bundle-success_bot
|
||||
export DOCKER_TLS_VERIFY=1
|
||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||
export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443
|
||||
docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth
|
||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $slack
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
32
_config.yml
32
_config.yml
|
@ -14,14 +14,13 @@ lsi: false
|
|||
url: https://docs.docker.com
|
||||
# This needs to have all the directories you expect to be in the archives (delivered by docs-base in the Dockerfile)
|
||||
keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03", "v17.06", "v17.09", "v17.12", "v18.03"]
|
||||
exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks"]
|
||||
exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks", "index.html", "404.html"]
|
||||
|
||||
# Component versions -- address like site.docker_ce_stable_version
|
||||
# Component versions -- address like site.docker_ce_version
|
||||
# You can't have - characters in these for non-YAML reasons
|
||||
|
||||
latest_stable_docker_engine_api_version: "1.39"
|
||||
docker_ce_stable_version: "18.09"
|
||||
docker_ce_edge_version: "18.09"
|
||||
latest_engine_api_version: "1.39"
|
||||
docker_ce_version: "18.09"
|
||||
docker_ee_version: "18.09"
|
||||
compose_version: "1.23.2"
|
||||
machine_version: "0.16.0"
|
||||
|
@ -95,7 +94,7 @@ defaults:
|
|||
- scope:
|
||||
path: "install"
|
||||
values:
|
||||
win_latest_build: "docker-18.09.0"
|
||||
win_latest_build: "docker-18.09.1"
|
||||
- scope:
|
||||
path: "datacenter"
|
||||
values:
|
||||
|
@ -105,34 +104,34 @@ defaults:
|
|||
values:
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.6.0"
|
||||
dtr_version: "2.6.2"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.5"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.5.6"
|
||||
dtr_version: "2.5.8"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.4"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.4.7"
|
||||
dtr_version: "2.4.9"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.3"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.3.9"
|
||||
dtr_version: "2.3.10"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.2"
|
||||
values:
|
||||
ucp_version: "2.1"
|
||||
dtr_version: "2.2"
|
||||
docker_image: "docker/dtr:2.2.12"
|
||||
docker_image: "docker/dtr:2.2.11"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.1"
|
||||
values:
|
||||
|
@ -148,30 +147,29 @@ defaults:
|
|||
values:
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "3.1.1"
|
||||
ucp_version: "3.1.2"
|
||||
- scope: # This is a bit of a hack for the get-support.md topic.
|
||||
path: "ee"
|
||||
values:
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
dtr_repo: "dtr"
|
||||
ucp_version: "3.1.1"
|
||||
dtr_version: "2.6.0"
|
||||
dtr_latest_image: "docker/dtr:2.6.0"
|
||||
ucp_version: "3.1.3"
|
||||
dtr_version: "2.6.2"
|
||||
- scope:
|
||||
path: "datacenter/ucp/3.0"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "3.0.7"
|
||||
ucp_version: "3.0.9"
|
||||
- scope:
|
||||
path: "datacenter/ucp/2.2"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "2.2.14"
|
||||
ucp_version: "2.2.16"
|
||||
- scope:
|
||||
path: "datacenter/ucp/2.1"
|
||||
values:
|
||||
|
|
|
@ -2,36 +2,38 @@ name: Docker Documentation
|
|||
markdown: kramdown
|
||||
kramdown:
|
||||
input: GFM
|
||||
gfm_quirks: [paragraph_end, no_auto_typographic]
|
||||
html_to_native: true
|
||||
hard_wrap: false
|
||||
syntax_highlighter: rouge
|
||||
toc_levels: 2..3
|
||||
incremental: false
|
||||
permalink: pretty
|
||||
safe: false
|
||||
lsi: false
|
||||
url: https://docs.docker.com
|
||||
incremental: false
|
||||
|
||||
# Component versions -- address like site.docker_ce_stable_version
|
||||
# Component versions -- address like site.docker_ce_version
|
||||
# You can't have - characters in these for non-YAML reasons
|
||||
|
||||
# TO USE ME:
|
||||
# jekyll serve --incremental --config _config_authoring.yml
|
||||
|
||||
docker_ce_stable_version: "17.09"
|
||||
latest_stable_docker_engine_api_version: "1.32"
|
||||
docker_ce_edge_version: "17.09"
|
||||
docker_ee_version: "17.06"
|
||||
compose_version: "1.16.1"
|
||||
machine_version: "0.12.2"
|
||||
latest_engine_api_version: "1.39"
|
||||
docker_ce_version: "18.09"
|
||||
docker_ee_version: "18.09"
|
||||
compose_version: "1.23.2"
|
||||
machine_version: "0.16.0"
|
||||
distribution_version: "2.6"
|
||||
dtr_version: "2.5"
|
||||
ucp_version: "3.0"
|
||||
dtr_version: "2.6"
|
||||
ucp_version: "3.1"
|
||||
|
||||
ucp_versions:
|
||||
- version: "3.0"
|
||||
- version: "3.1"
|
||||
path: /ee/ucp/
|
||||
latest: true
|
||||
- version: "3.0"
|
||||
path: /datacenter/ucp/3.0/guides/
|
||||
- version: "2.2"
|
||||
path: /datacenter/ucp/2.2/guides/
|
||||
- version: "2.1"
|
||||
|
@ -42,9 +44,11 @@ ucp_versions:
|
|||
path: /datacenter/ucp/1.1/overview/
|
||||
|
||||
dtr_versions:
|
||||
- version: "2.5"
|
||||
- version: "2.6"
|
||||
path: /ee/dtr/
|
||||
latest: true
|
||||
- version: "2.5"
|
||||
path: /datacenter/dtr/2.5/guides/
|
||||
- version: "2.4"
|
||||
path: /datacenter/dtr/2.4/guides/
|
||||
- version: "2.3"
|
||||
|
@ -57,7 +61,7 @@ dtr_versions:
|
|||
path: /datacenter/dtr/2.0/
|
||||
|
||||
tablabels:
|
||||
dee-2.0: Docker Enterprise Edition 2.0 Beta2
|
||||
dee-2.0: Docker Enterprise Edition 2.0
|
||||
ucp-3.0: Universal Control Plane 3.0
|
||||
ucp-2.2: Universal Control Plane 2.2
|
||||
dtr-2.5: Docker Trusted Registry 2.5
|
||||
|
@ -69,52 +73,65 @@ tablabels:
|
|||
kubectl: Kubernetes CLI
|
||||
cli: CLI
|
||||
|
||||
collections:
|
||||
samples:
|
||||
output: true
|
||||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-relative-links
|
||||
- jekyll-sitemap
|
||||
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
- scope:
|
||||
path: ""
|
||||
type: "pages"
|
||||
values:
|
||||
layout: docs
|
||||
defaultassignee: johndmulhausen
|
||||
toc_min: 2
|
||||
toc_max: 3
|
||||
tree: true
|
||||
- scope:
|
||||
path: "engine"
|
||||
path: "install"
|
||||
values:
|
||||
win_latest_build: "docker-17.06.2-ee-6"
|
||||
win_latest_build: "docker-18.09.1"
|
||||
- scope:
|
||||
path: "datacenter"
|
||||
values:
|
||||
ucp_latest_image: "docker/ucp:3.0.0-beta2"
|
||||
dtr_latest_image: "docker/dtr:2.5.0-beta3"
|
||||
enterprise: true
|
||||
- scope:
|
||||
path: "ee/dtr"
|
||||
values:
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.5.0-beta3"
|
||||
dtr_version: "2.6.1"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.5"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.5.7"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.4"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.4.1"
|
||||
dtr_version: "2.4.8"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.3"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
dtr_org: "docker"
|
||||
dtr_repo: "dtr"
|
||||
dtr_version: "2.3.4"
|
||||
dtr_version: "2.3.10"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.2"
|
||||
values:
|
||||
ucp_version: "2.1"
|
||||
dtr_version: "2.2"
|
||||
docker_image: "docker/dtr:2.2.9"
|
||||
docker_image: "docker/dtr:2.2.11"
|
||||
- scope:
|
||||
path: "datacenter/dtr/2.1"
|
||||
values:
|
||||
|
@ -130,29 +147,47 @@ defaults:
|
|||
values:
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "3.0.0-beta2"
|
||||
ucp_version: "3.1.2"
|
||||
- scope: # This is a bit of a hack for the get-support.md topic.
|
||||
path: "ee"
|
||||
values:
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
dtr_repo: "dtr"
|
||||
ucp_version: "3.1.2"
|
||||
dtr_version: "2.6.1"
|
||||
- scope:
|
||||
path: "datacenter/ucp/3.0"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "3.0.8"
|
||||
- scope:
|
||||
path: "datacenter/ucp/2.2"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_org: "docker"
|
||||
ucp_repo: "ucp"
|
||||
ucp_version: "2.2.3"
|
||||
ucp_version: "2.2.15"
|
||||
- scope:
|
||||
path: "datacenter/ucp/2.1"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_version: "2.1"
|
||||
dtr_version: "2.2"
|
||||
docker_image: "docker/ucp:2.1.5"
|
||||
docker_image: "docker/ucp:2.1.8"
|
||||
- scope:
|
||||
path: "datacenter/ucp/2.0"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_version: "2.0"
|
||||
dtr_version: "2.1"
|
||||
docker_image: "docker/ucp:2.0.3"
|
||||
docker_image: "docker/ucp:2.0.4"
|
||||
- scope:
|
||||
path: "datacenter/ucp/1.1"
|
||||
values:
|
||||
hide_from_sitemap: true
|
||||
ucp_version: "1.1"
|
||||
dtr_version: "2.0"
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
texts:
|
||||
experimental: "The functionality described on this page is marked as Experimental, and as such, may change before it becomes generally available."
|
||||
rc: "The Swarm mode feature included in Docker Engine 1.12 is a release candidate feature and might be subject to non backward-compatible changes. Some functionality may change before the feature becomes generally available."
|
||||
docker4mac-beta: "Docker for Mac is currently in public beta. Some functionality may change before the product becomes generally available."
|
||||
docker4win-beta: "Docker for Windows is currently in public beta. Some functionality may change before the product becomes generally available."
|
||||
toolbox: "**Legacy desktop solution.** Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of [Docker for Mac](/docker-for-mac/) and [Docker for Windows](/docker-for-windows/). We recommend updating to the newer applications, if possible."
|
||||
kitematic: "**Legacy desktop solution.** Kitematic is a legacy solution, bundled with [Docker Toolbox](/toolbox/overview/). We recommend updating to [Docker for Mac](/docker-for-mac/) or [Docker for Windows](/docker-for-windows/) if your system meets the requirements for one of those applications."
|
||||
docker4mac-beta: "Docker Desktop for Mac is currently in public beta. Some functionality may change before the product becomes generally available."
|
||||
docker4win-beta: "Docker Desktop for Windows is currently in public beta. Some functionality may change before the product becomes generally available."
|
||||
toolbox: "**Legacy desktop solution.** Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of [Docker Desktop for Mac](/docker-for-mac/) and [Docker Desktop for Windows](/docker-for-windows/). We recommend updating to the newer applications, if possible."
|
||||
kitematic: "**Legacy desktop solution.** Kitematic is a legacy solution, bundled with [Docker Toolbox](/toolbox/overview/). We recommend updating to [Docker Desktop for Mac](/docker-for-mac/) or [Docker Desktop for Windows](/docker-for-windows/) if your system meets the requirements for one of those applications."
|
||||
swarm: "See [Swarm mode overview](/engine/swarm/) for the orchestration features introduced in Docker Engine 1.12. Only refer to the Docker Swarm documents below for information on the standalone Swarm product."
|
||||
swarm-standalone: "**You are viewing docs for legacy standalone Swarm.** These topics describe standalone Docker Swarm. In Docker 1.12 and higher, [Swarm mode](/engine/swarm/) is integrated with Docker Engine. Most users should use integrated Swarm mode — a good place to start is [Getting started with swarm mode](/engine/swarm/swarm-tutorial/), [Swarm mode CLI commands](/engine/swarm/index.md#swarm-mode-cli-commands), and the [Get started with Docker walkthrough](/get-started/)). Standalone Docker Swarm is not integrated into the Docker Engine API and CLI commands."
|
||||
engine: "This site contains documentation for the v1.12 release candidate version of Docker Engine. For the Docker Engine v1.11 docs, see [https://docs.docker.com/v1.11/](https://docs.docker.com/v1.11/). Docker for Mac and Docker for Windows are currently in Beta."
|
||||
engine: "This site contains documentation for the v1.12 release candidate version of Docker Engine. For the Docker Engine v1.11 docs, see [https://docs.docker.com/v1.11/](https://docs.docker.com/v1.11/). Docker Desktop for Mac and Docker Desktop for Windows are currently in Beta."
|
||||
|
||||
|
||||
# URL based advisories
|
||||
|
|
|
@ -5,7 +5,27 @@
|
|||
# Used by _includes/components/ddc_url_list_2.html
|
||||
- product: "ucp"
|
||||
version: "3.1"
|
||||
tar-files:
|
||||
tar-files:
|
||||
- description: "3.1.3 Windows Server 2019"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2019_3.1.3.tar.gz
|
||||
- description: "3.1.3 Windows Server 1809"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1809_3.1.3.tar.gz
|
||||
- description: "3.1.3 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.1.3.tar.gz
|
||||
- description: "3.1.3 Windows Server 2016 LTSC"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2016_3.1.3.tar.gz
|
||||
- description: "3.1.3 Windows Server 1709"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1709_3.1.3.tar.gz
|
||||
- description: "3.1.3 Windows Server 1803"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1803_3.1.3.tar.gz
|
||||
- description: "3.1.2 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.1.2.tar.gz
|
||||
- description: "3.1.2 Windows Server 2016 LTSC"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2016_3.1.2.tar.gz
|
||||
- description: "3.1.2 Windows Server 1709"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1709_3.1.2.tar.gz
|
||||
- description: "3.1.2 Windows Server 1803"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1803_3.1.2.tar.gz
|
||||
- description: "3.1.1 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.1.1.tar.gz
|
||||
- description: "3.1.1 Windows Server 2016 LTSC"
|
||||
|
@ -25,6 +45,24 @@
|
|||
- product: "ucp"
|
||||
version: "3.0"
|
||||
tar-files:
|
||||
- description: "3.0.9 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.0.9.tar.gz
|
||||
- description: "3.0.9 IBM Z"
|
||||
url: https://packages.docker.com/caas/ucp_images_s390x_3.0.9.tar.gz
|
||||
- description: "3.0.9 Windows Server 2016 LTSC"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2016_3.0.9.tar.gz
|
||||
- description: "3.0.9 Windows Server 1709"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1709_3.0.9.tar.gz
|
||||
- description: "3.0.9 Windows Server 1803"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1803_3.0.9.tar.gz
|
||||
- description: "3.0.8 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.0.8.tar.gz
|
||||
- description: "3.0.8 Windows Server 2016 LTSC"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2016_3.0.8.tar.gz
|
||||
- description: "3.0.8 Windows Server 1709"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1709_3.0.8.tar.gz
|
||||
- description: "3.0.8 Windows Server 1803"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_1803_3.0.8.tar.gz
|
||||
- description: "3.0.7 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_3.0.7.tar.gz
|
||||
- description: "3.0.7 Windows Server 2016 LTSC"
|
||||
|
@ -90,6 +128,18 @@
|
|||
- product: "ucp"
|
||||
version: "2.2"
|
||||
tar-files:
|
||||
- description: "2.2.16 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_2.2.16.tar.gz
|
||||
- description: "2.2.16 IBM Z"
|
||||
url: https://packages.docker.com/caas/ucp_images_s390x_2.2.16.tar.gz
|
||||
- description: "2.2.16 Windows"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2.2.16.tar.gz
|
||||
- description: "2.2.15 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_2.2.15.tar.gz
|
||||
- description: "2.2.15 IBM Z"
|
||||
url: https://packages.docker.com/caas/ucp_images_s390x_2.2.15.tar.gz
|
||||
- description: "2.2.15 Windows"
|
||||
url: https://packages.docker.com/caas/ucp_images_win_2.2.15.tar.gz
|
||||
- description: "2.2.14 Linux"
|
||||
url: https://packages.docker.com/caas/ucp_images_2.2.14.tar.gz
|
||||
- description: "2.2.14 IBM Z"
|
||||
|
@ -171,11 +221,19 @@
|
|||
- product: "dtr"
|
||||
version: "2.6"
|
||||
tar-files:
|
||||
- description: "DTR 2.6.2 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.6.2.tar.gz
|
||||
- description: "DTR 2.6.1 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.6.1.tar.gz
|
||||
- description: "DTR 2.6.0 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.6.0.tar.gz
|
||||
- product: "dtr"
|
||||
version: "2.5"
|
||||
tar-files:
|
||||
- description: "DTR 2.5.8 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.5.8.tar.gz
|
||||
- description: "DTR 2.5.7 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.5.7.tar.gz
|
||||
- description: "DTR 2.5.6 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.5.6.tar.gz
|
||||
- description: "DTR 2.5.5 Linux x86"
|
||||
|
@ -191,6 +249,10 @@
|
|||
- product: "dtr"
|
||||
version: "2.4"
|
||||
tar-files:
|
||||
- description: "DTR 2.4.9 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.4.9.tar.gz
|
||||
- description: "DTR 2.4.8 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.4.8.tar.gz
|
||||
- description: "DTR 2.4.7 Linux x86"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.4.7.tar.gz
|
||||
- description: "DTR 2.4.6 Linux x86"
|
||||
|
@ -224,6 +286,8 @@
|
|||
- product: "dtr"
|
||||
version: "2.3"
|
||||
tar-files:
|
||||
- description: "DTR 2.3.10"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.3.10.tar.gz
|
||||
- description: "DTR 2.3.9"
|
||||
url: https://packages.docker.com/caas/dtr_images_2.3.9.tar.gz
|
||||
- description: "DTR 2.3.8"
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
command: docker
|
||||
cname:
|
||||
- docker attach
|
||||
- docker build
|
||||
- docker checkpoint
|
||||
- docker commit
|
||||
- docker config
|
||||
- docker container
|
||||
- docker cp
|
||||
- docker create
|
||||
- docker deploy
|
||||
- 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_checkpoint.yaml
|
||||
- docker_commit.yaml
|
||||
- docker_config.yaml
|
||||
- docker_container.yaml
|
||||
- docker_cp.yaml
|
||||
- docker_create.yaml
|
||||
- docker_deploy.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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
command: 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.
|
||||
|
||||
> **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.
|
||||
|
||||
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. 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.
|
||||
|
||||
It is forbidden to redirect the standard input of a `docker attach` command
|
||||
while attaching to a tty-enabled container (i.e.: launched with `-t`).
|
||||
|
||||
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. If
|
||||
this buffer is filled, the speed of the API connection will start to have an
|
||||
effect on the process output 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
|
||||
|
||||
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="<sequence>"` flag with the `docker attach` command. The format of
|
||||
the `<sequence>` 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)
|
||||
|
||||
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
|
||||
examples: |-
|
||||
### Attach to and detach from a running container
|
||||
|
||||
```bash
|
||||
$ docker run -d --name topdemo ubuntu /usr/bin/top -b
|
||||
|
||||
$ docker attach topdemo
|
||||
|
||||
top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
|
||||
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
|
||||
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
|
||||
Mem: 373572k total, 355560k used, 18012k free, 27872k buffers
|
||||
Swap: 786428k total, 0k used, 786428k free, 221740k cached
|
||||
|
||||
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
|
||||
1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top
|
||||
|
||||
top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
|
||||
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
|
||||
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
|
||||
Mem: 373572k total, 355244k used, 18328k free, 27872k buffers
|
||||
Swap: 786428k total, 0k used, 786428k free, 221776k cached
|
||||
|
||||
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
|
||||
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
|
||||
|
||||
|
||||
top - 02:05:58 up 3:06, 0 users, load average: 0.01, 0.02, 0.05
|
||||
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
|
||||
Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
|
||||
Mem: 373572k total, 355780k used, 17792k free, 27880k buffers
|
||||
Swap: 786428k total, 0k used, 786428k free, 221776k cached
|
||||
|
||||
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
|
||||
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
|
||||
^C$
|
||||
|
||||
$ echo $?
|
||||
0
|
||||
$ docker ps -a | grep topdemo
|
||||
|
||||
7998ac8581f9 ubuntu:14.04 "/usr/bin/top -b" 38 seconds ago Exited (0) 21 seconds ago topdemo
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```bash
|
||||
$ docker run --name test -d -it debian
|
||||
|
||||
275c44472aebd77c926d4527885bb09f2f6db21d878c75f0a1c212c03d3bcfab
|
||||
|
||||
$ docker attach test
|
||||
|
||||
root@f38c87f2a42d:/# exit 13
|
||||
|
||||
exit
|
||||
|
||||
$ echo $?
|
||||
|
||||
13
|
||||
|
||||
$ docker ps -a | grep test
|
||||
|
||||
275c44472aeb debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,580 +0,0 @@
|
|||
command: docker 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 `URL` parameter can refer to three kinds of resources: Git repositories,
|
||||
pre-packaged tarball contexts and plain text files.
|
||||
|
||||
### 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.
|
||||
|
||||
> **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.
|
||||
|
||||
For example, run this command to use a directory called `docker` in the branch
|
||||
`container`:
|
||||
|
||||
```bash
|
||||
$ docker build https://github.com/docker/rootfs.git#container:docker
|
||||
```
|
||||
|
||||
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`
|
||||
|
||||
|
||||
### Tarball contexts
|
||||
|
||||
If you pass an URL to a remote tarball, the URL itself is sent to the daemon:
|
||||
|
||||
```bash
|
||||
$ 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.
|
||||
|
||||
### 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`:
|
||||
|
||||
```bash
|
||||
$ docker build - < Dockerfile
|
||||
```
|
||||
|
||||
With Powershell on Windows, you can run:
|
||||
|
||||
```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.
|
||||
|
||||
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](../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.
|
||||
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: platform
|
||||
value_type: string
|
||||
description: Set platform if server is multi-platform capable
|
||||
deprecated: false
|
||||
min_api_version: "1.32"
|
||||
experimental: true
|
||||
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: 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: stream
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Stream attaches to server to negotiate build context
|
||||
deprecated: false
|
||||
min_api_version: "1.31"
|
||||
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
|
||||
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
|
||||
examples: "### Build with PATH\n\n```bash\n$ docker build .\n\nUploading context 10240
|
||||
bytes\nStep 1/3 : FROM busybox\nPulling repository busybox\n ---> e9aa60c60128MB/2.284
|
||||
MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/\nStep 2/3 : RUN ls -lh
|
||||
/\n ---> Running in 9c9e81692ae9\ntotal 24\ndrwxr-xr-x 2 root root 4.0K
|
||||
Mar 12 2013 bin\ndrwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev\ndrwxr-xr-x
|
||||
\ 2 root root 4.0K Oct 19 00:19 etc\ndrwxr-xr-x 2 root root
|
||||
\ 4.0K Nov 15 23:34 lib\nlrwxrwxrwx 1 root root 3 Mar 12
|
||||
\ 2013 lib64 -> lib\ndr-xr-xr-x 116 root root 0 Nov 15 23:34 proc\nlrwxrwxrwx
|
||||
\ 1 root root 3 Mar 12 2013 sbin -> bin\ndr-xr-xr-x 13 root root
|
||||
\ 0 Nov 15 23:34 sys\ndrwxr-xr-x 2 root root 4.0K Mar 12
|
||||
\ 2013 tmp\ndrwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr\n ---> b35f4035db3f\nStep
|
||||
3/3 : CMD echo Hello world\n ---> Running in 02071fceb21b\n ---> f52f38b7823e\nSuccessfully
|
||||
built f52f38b7823e\nRemoving intermediate container 9c9e81692ae9\nRemoving intermediate
|
||||
container 02071fceb21b\n```\n\nThis example specifies that the `PATH` is `.`, and
|
||||
so all the files in the\nlocal directory get `tar`d and sent to the Docker daemon.
|
||||
The `PATH` specifies\nwhere to find the files for the \"context\" of the build on
|
||||
the Docker daemon.\nRemember that the daemon could be running on a remote machine
|
||||
and that no\nparsing of the Dockerfile happens at the client side (where you're
|
||||
running\n`docker build`). That means that *all* the files at `PATH` get sent, not
|
||||
just\nthe ones listed to [*ADD*](../builder.md#add) in the Dockerfile.\n\nThe transfer
|
||||
of context from the local machine to the Docker daemon is what the\n`docker` client
|
||||
means when you see the \"Sending build context\" message.\n\nIf you wish to keep
|
||||
the intermediate containers after the build is complete,\nyou must use `--rm=false`.
|
||||
This does not affect the build cache.\n\n### Build with URL\n\n```bash\n$ docker
|
||||
build github.com/creack/docker-firefox\n```\n\nThis will clone the GitHub repository
|
||||
and use the cloned repository as context.\nThe Dockerfile at the root of the repository
|
||||
is used as Dockerfile. You can\nspecify an arbitrary Git repository by using the
|
||||
`git://` or `git@` scheme.\n\n```bash\n$ docker build -f ctx/Dockerfile http://server/ctx.tar.gz\n\nDownloading
|
||||
context: http://server/ctx.tar.gz [===================>] 240 B/240 B\nStep 1/3
|
||||
: FROM busybox\n ---> 8c2e06607696\nStep 2/3 : ADD ctx/container.cfg /\n ---> e7829950cee3\nRemoving
|
||||
intermediate container b35224abf821\nStep 3/3 : CMD /bin/ls\n ---> Running in fbc63d321d73\n
|
||||
---> 3286931702ad\nRemoving intermediate container fbc63d321d73\nSuccessfully built
|
||||
377c409b35e4\n```\n\nThis sends the URL `http://server/ctx.tar.gz` to the Docker
|
||||
daemon, which\ndownloads and extracts the referenced tarball. The `-f ctx/Dockerfile`\nparameter
|
||||
specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used\nto build
|
||||
the image. Any `ADD` commands in that `Dockerfile` that refers to local\npaths must
|
||||
be relative to the root of the contents inside `ctx.tar.gz`. In the\nexample above,
|
||||
the tarball contains a directory `ctx/`, so the `ADD\nctx/container.cfg /` operation
|
||||
works as expected.\n\n### Build with -\n\n```bash\n$ docker build - < Dockerfile\n```\n\nThis
|
||||
will read a Dockerfile from `STDIN` without context. Due to the lack of a\ncontext,
|
||||
no contents of any local directory will be sent to the Docker daemon.\nSince there
|
||||
is no context, a Dockerfile `ADD` only works if it refers to a\nremote URL.\n\n```bash\n$
|
||||
docker build - < context.tar.gz\n```\n\nThis will build an image for a compressed
|
||||
context read from `STDIN`. Supported\nformats are: bzip2, gzip and xz.\n\n### Use
|
||||
a .dockerignore file\n\n```bash\n$ docker build .\n\nUploading context 18.829 MB\nUploading
|
||||
context\nStep 1/2 : FROM busybox\n ---> 769b9341d937\nStep 2/2 : CMD echo Hello
|
||||
world\n ---> Using cache\n ---> 99cc1ad10469\nSuccessfully built 99cc1ad10469\n$
|
||||
echo \".git\" > .dockerignore\n$ docker build .\nUploading context 6.76 MB\nUploading
|
||||
context\nStep 1/2 : FROM busybox\n ---> 769b9341d937\nStep 2/2 : CMD echo Hello
|
||||
world\n ---> Using cache\n ---> 99cc1ad10469\nSuccessfully built 99cc1ad10469\n```\n\nThis
|
||||
example shows the use of the `.dockerignore` file to exclude the `.git`\ndirectory
|
||||
from the context. Its effect can be seen in the changed size of the\nuploaded context.
|
||||
The builder reference contains detailed information on\n[creating a .dockerignore
|
||||
file](../builder.md#dockerignore-file)\n\n### Tag an image (-t)\n\n```bash\n$ docker
|
||||
build -t vieux/apache:2.0 .\n```\n\nThis will build like the previous example, but
|
||||
it will then tag the resulting\nimage. The repository name will be `vieux/apache`
|
||||
and the tag will be `2.0`.\n[Read more about valid tags](tag.md).\n\nYou can apply
|
||||
multiple tags to an image. For example, you can apply the `latest`\ntag to a newly
|
||||
built image and add another tag that references a specific\nversion.\nFor example,
|
||||
to tag an image both as `whenry/fedora-jboss:latest` and\n`whenry/fedora-jboss:v2.1`,
|
||||
use the following:\n\n```bash\n$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1
|
||||
.\n```\n\n### Specify a Dockerfile (-f)\n\n```bash\n$ docker build -f Dockerfile.debug
|
||||
.\n```\n\nThis will use a file called `Dockerfile.debug` for the build instructions\ninstead
|
||||
of `Dockerfile`.\n\n```bash\n$ curl example.com/remote/Dockerfile | docker build
|
||||
-f - .\n```\n\nThe above command will use the current directory as the build context
|
||||
and read\na Dockerfile from stdin.\n\n```bash\n$ docker build -f dockerfiles/Dockerfile.debug
|
||||
-t myapp_debug .\n$ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod .\n```\n\nThe
|
||||
above commands will build the current build context (as specified by the\n`.`) twice,
|
||||
once using a debug version of a `Dockerfile` and once using a\nproduction version.\n\n```bash\n$
|
||||
cd /home/me/myapp/some/dir/really/deep\n$ docker build -f /home/me/myapp/dockerfiles/debug
|
||||
/home/me/myapp\n$ docker build -f ../../../../dockerfiles/debug /home/me/myapp\n```\n\nThese
|
||||
two `docker build` commands do the exact same thing. They both use the\ncontents
|
||||
of the `debug` file instead of looking for a `Dockerfile` and will use\n`/home/me/myapp`
|
||||
as the root of the build context. Note that `debug` is in the\ndirectory structure
|
||||
of the build context, regardless of how you refer to it on\nthe command line.\n\n>
|
||||
**Note:**\n> `docker build` will return a `no such file or directory` error if the\n>
|
||||
file or directory does not exist in the uploaded context. This may\n> happen if
|
||||
there is no context, or if you specify a file that is\n> elsewhere on the Host system.
|
||||
The context is limited to the current\n> directory (and its children) for security
|
||||
reasons, and to ensure\n> repeatable builds on remote Docker hosts. This is also
|
||||
the reason why\n> `ADD ../file` will not work.\n\n### Use a custom parent cgroup
|
||||
(--cgroup-parent)\n\nWhen `docker build` is run with the `--cgroup-parent` option
|
||||
the containers\nused in the build will be run with the [corresponding `docker run`\nflag](../run.md#specifying-custom-cgroups).\n\n###
|
||||
Set ulimits in container (--ulimit)\n\nUsing the `--ulimit` option with `docker
|
||||
build` will cause each build step's\ncontainer to be started using those [`--ulimit`\nflag
|
||||
values](./run.md#set-ulimits-in-container-ulimit).\n\n### Set build-time variables
|
||||
(--build-arg)\n\nYou can use `ENV` instructions in a Dockerfile to define variable\nvalues.
|
||||
These values persist in the built image. However, often\npersistence is not what
|
||||
you want. Users want to specify variables differently\ndepending on which host they
|
||||
build an image on.\n\nA good example is `http_proxy` or source versions for pulling
|
||||
intermediate\nfiles. The `ARG` instruction lets Dockerfile authors define values
|
||||
that users\ncan set at build-time using the `--build-arg` flag:\n\n```bash\n$ docker
|
||||
build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567
|
||||
.\n```\n\nThis flag allows you to pass the build-time variables that are\naccessed
|
||||
like regular environment variables in the `RUN` instruction of the\nDockerfile.
|
||||
Also, these values don't persist in the intermediate or final images\nlike `ENV`
|
||||
values do. You must add `--build-arg` for each build argument. \n\nUsing this
|
||||
flag will not alter the output you see when the `ARG` lines from the\nDockerfile
|
||||
are echoed during the build process.\n\nFor detailed information on using `ARG`
|
||||
and `ENV` instructions, see the\n[Dockerfile reference](../builder.md).\n\nYou may
|
||||
also use the `--build-arg` flag without a value, in which case the value\nfrom the
|
||||
local environment will be propagated into the Docker container being\nbuilt:\n\n```bash\n$
|
||||
export HTTP_PROXY=http://10.20.30.2:1234\n$ docker build --build-arg HTTP_PROXY
|
||||
.\n```\n\nThis is similar to how `docker run -e` works. Refer to the [`docker run`
|
||||
documentation](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)\nfor
|
||||
more information.\n\n### Optional security options (--security-opt)\n\nThis flag
|
||||
is only supported on a daemon running on Windows, and only supports\nthe `credentialspec`
|
||||
option. The `credentialspec` must be in the format\n`file://spec.txt` or `registry://keyname`.\n\n###
|
||||
Specify isolation technology for container (--isolation)\n\nThis option is useful
|
||||
in situations where you are running Docker containers on\nWindows. The `--isolation=<value>`
|
||||
option sets a container's isolation\ntechnology. On Linux, the only supported is
|
||||
the `default` option which uses\nLinux namespaces. On Microsoft Windows, you can
|
||||
specify these values:\n\n\n| Value | Description |\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n|
|
||||
`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. |\n| `process` | Namespace isolation only. |\n|
|
||||
`hyperv` | Hyper-V hypervisor partition-based isolation. |\n\nSpecifying
|
||||
the `--isolation` flag without a value is the same as setting `--isolation=\"default\"`.\n\n###
|
||||
Add entries to container hosts file (--add-host)\n\nYou can add other hosts into
|
||||
a container's `/etc/hosts` file by using one or\nmore `--add-host` flags. This example
|
||||
adds a static address for a host named\n`docker`:\n\n $ docker build --add-host=docker:10.180.0.1
|
||||
.\n\n### Specifying target build stage (--target)\n\nWhen building a Dockerfile
|
||||
with multiple build stages, `--target` can be used to\nspecify an intermediate build
|
||||
stage by name as a final stage for the resulting\nimage. Commands after the target
|
||||
stage will be skipped.\n\n```Dockerfile\nFROM debian AS build-env\n...\n\nFROM alpine
|
||||
AS production-env\n...\n```\n\n```bash\n$ docker build -t mybuildimage --target
|
||||
build-env .\n```\n\n### Squash an image's layers (--squash) (experimental)\n\n####
|
||||
Overview\n\nOnce the image is built, squash the new layers into a new image with
|
||||
a single\nnew layer. Squashing does not destroy any existing image, rather it creates
|
||||
a new\nimage with the content of the squashed layers. This effectively makes it
|
||||
look\nlike all `Dockerfile` commands were created with a single layer. The build\ncache
|
||||
is preserved with this method.\n\nThe `--squash` option is an experimental feature,
|
||||
and should not be considered\nstable.\n\n\nSquashing layers can be beneficial if
|
||||
your Dockerfile produces multiple layers\nmodifying the same files, for example,
|
||||
file that are created in one step, and\nremoved in another step. For other use-cases,
|
||||
squashing images may actually have\na negative impact on performance; when pulling
|
||||
an image consisting of multiple\nlayers, layers can be pulled in parallel, and allows
|
||||
sharing layers between\nimages (saving space).\n\nFor most use cases, multi-stage
|
||||
are a better alternative, as they give more\nfine-grained control over your build,
|
||||
and can take advantage of future\noptimizations in the builder. Refer to the [use
|
||||
multi-stage builds](https://docs.docker.com/engine/userguide/eng-image/multistage-build/)\nsection
|
||||
in the userguide for more information.\n\n\n#### Known limitations\n\nThe `--squash`
|
||||
option has a number of known limitations:\n\n- When squashing layers, the resulting
|
||||
image cannot take advantage of layer\n sharing with other images, and may use significantly
|
||||
more space. Sharing the\n base image is still supported.\n- When using this option
|
||||
you may see significantly more space used due to\n storing two copies of the image,
|
||||
one for the build cache with all the cache\n layers in tact, and one for the squashed
|
||||
version.\n- While squashing layers may produce smaller images, it may have a negative\n
|
||||
\ impact on performance, as a single layer takes longer to extract, and\n downloading
|
||||
a single layer cannot be parallelized.\n- When attempting to squash an image that
|
||||
does not make changes to the\n filesystem (for example, the Dockerfile only contains
|
||||
`ENV` instructions),\n the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)\n\n####
|
||||
Prerequisites\n\nThe example on this page is using experimental mode in Docker 1.13.\n\nExperimental
|
||||
mode can be enabled by using the `--experimental` flag when starting the Docker
|
||||
daemon or setting `experimental: true` in the `daemon.json` configuration file.\n\nBy
|
||||
default, experimental mode is disabled. To see the current configuration, use the
|
||||
`docker version` command.\n\n```none\nServer:\n Version: 1.13.1\n API version:
|
||||
\ 1.26 (minimum version 1.12)\n Go version: go1.7.5\n Git commit: 092cba3\n
|
||||
Built: Wed Feb 8 06:35:24 2017\n OS/Arch: linux/amd64\n Experimental:
|
||||
false\n\n [...]\n```\n\nTo enable experimental mode, users need to restart the docker
|
||||
daemon with the experimental flag enabled.\n\n#### Enable Docker experimental\n\nExperimental
|
||||
features are now included in the standard Docker binaries as of version 1.13.0.
|
||||
For enabling experimental features, you need to start the Docker daemon with `--experimental`
|
||||
flag. You can also enable the daemon flag via /etc/docker/daemon.json. e.g.\n\n```json\n{\n
|
||||
\ \"experimental\": true\n}\n```\n\nThen make sure the experimental flag is enabled:\n\n```bash\n$
|
||||
docker version -f '{{.Server.Experimental}}'\ntrue\n```\n\n#### Build an image with
|
||||
`--squash` argument\n\nThe following is an example of docker build with `--squash`
|
||||
argument\n\n```Dockerfile\nFROM busybox\nRUN echo hello > /hello\nRUN echo world
|
||||
>> /hello\nRUN touch remove_me /remove_me\nENV HELLO world\nRUN rm /remove_me\n```\n\nAn
|
||||
image named `test` is built with `--squash` argument.\n\n```bash\n$ docker build
|
||||
--squash -t test .\n\n[...]\n```\n\nIf everything is right, the history will look
|
||||
like this:\n\n```bash\n$ docker history test\n\nIMAGE CREATED CREATED
|
||||
BY SIZE COMMENT\n4e10cb5b4cac
|
||||
\ 3 seconds ago 12 B
|
||||
\ merge sha256:88a7b0112a41826885df0e7072698006ee8f621c6ab99fca7fe9151d7b599702
|
||||
to sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb\n<missing>
|
||||
\ 5 minutes ago /bin/sh -c rm /remove_me 0
|
||||
B\n<missing> 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0
|
||||
B\n<missing> 5 minutes ago /bin/sh -c touch remove_me /remove_me
|
||||
\ 0 B\n<missing> 5 minutes ago /bin/sh -c echo world >>
|
||||
/hello 0 B\n<missing> 6 minutes ago /bin/sh -c echo
|
||||
hello > /hello 0 B\n<missing> 7 weeks ago /bin/sh
|
||||
-c #(nop) CMD [\"sh\"] 0 B\n<missing> 7 weeks ago /bin/sh
|
||||
-c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB\n```\n\nWe could find that all
|
||||
layer's name is `<missing>`, and there is a new layer with COMMENT `merge`.\n\nTest
|
||||
the image, check for `/remove_me` being gone, make sure `hello\\nworld` is in `/hello`,
|
||||
make sure the `HELLO` envvar's value is `world`."
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
command: docker checkpoint
|
||||
short: Manage checkpoints
|
||||
long: Manage checkpoints
|
||||
usage: docker checkpoint
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker checkpoint create
|
||||
- docker checkpoint ls
|
||||
- docker checkpoint rm
|
||||
clink:
|
||||
- docker_checkpoint_create.yaml
|
||||
- docker_checkpoint_ls.yaml
|
||||
- docker_checkpoint_rm.yaml
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
command: docker checkpoint create
|
||||
short: Create a checkpoint from a running container
|
||||
long: Create a checkpoint from a running container
|
||||
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
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker checkpoint ls
|
||||
aliases: 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
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker checkpoint rm
|
||||
aliases: 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
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
command: 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).
|
||||
|
||||
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.
|
||||
|
||||
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 <hannibal@a-team.com>")
|
||||
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
|
||||
examples: |-
|
||||
### Commit a container
|
||||
|
||||
```bash
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
|
||||
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
|
||||
|
||||
$ docker commit c3f279d17e0a svendowideit/testimage:version3
|
||||
|
||||
f5283438590d
|
||||
|
||||
$ docker images
|
||||
|
||||
REPOSITORY TAG ID CREATED SIZE
|
||||
svendowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
|
||||
```
|
||||
|
||||
### Commit a container with new configurations
|
||||
|
||||
```bash
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
|
||||
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
|
||||
|
||||
$ docker inspect -f "{{ .Config.Env }}" c3f279d17e0a
|
||||
|
||||
[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
|
||||
|
||||
$ docker commit --change "ENV DEBUG true" c3f279d17e0a svendowideit/testimage:version3
|
||||
|
||||
f5283438590d
|
||||
|
||||
$ docker inspect -f "{{ .Config.Env }}" f5283438590d
|
||||
|
||||
[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
|
||||
|
||||
```bash
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
|
||||
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
|
||||
|
||||
$ docker commit --change='CMD ["apachectl", "-DFOREGROUND"]' -c "EXPOSE 80" c3f279d17e0a svendowideit/testimage:version4
|
||||
|
||||
f5283438590d
|
||||
|
||||
$ docker run -d svendowideit/testimage:version4
|
||||
|
||||
89373736e2e7f00bc149bd783073ac43d0507da250e999f3f1036e0db60817c0
|
||||
|
||||
$ 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:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
|
||||
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker config
|
||||
short: Manage Docker configs
|
||||
long: Manage Docker configs
|
||||
usage: docker config
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- 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
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
command: docker config create
|
||||
short: Create a config from a file or STDIN
|
||||
long: Create a config from a file or STDIN
|
||||
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
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker config inspect
|
||||
short: Display detailed information on one or more configs
|
||||
long: Display detailed information on one or more configs
|
||||
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
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
command: docker config ls
|
||||
aliases: list
|
||||
short: List configs
|
||||
long: List configs
|
||||
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
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
command: docker config rm
|
||||
aliases: remove
|
||||
short: Remove one or more configs
|
||||
long: Remove one or more configs
|
||||
usage: docker config rm CONFIG [CONFIG...]
|
||||
pname: docker config
|
||||
plink: docker_config.yaml
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
command: docker container
|
||||
short: Manage containers
|
||||
long: Manage containers.
|
||||
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
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
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
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
command: docker container commit
|
||||
short: Create a new image from a container's changes
|
||||
long: Create a new image from a container's changes
|
||||
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 <hannibal@a-team.com>")
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
command: docker container 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"
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,852 +0,0 @@
|
|||
command: docker container create
|
||||
short: Create a new container
|
||||
long: Create a new container
|
||||
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: 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
|
||||
- option: cpu-percent
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
description: CPU percent (Windows only)
|
||||
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 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: 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: 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
|
||||
- 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
|
||||
- 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: string
|
||||
default_value: default
|
||||
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: string
|
||||
default_value: default
|
||||
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: true
|
||||
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: 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: <name|uid>[:<group|gid>])'
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container 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
|
||||
usage: docker container diff CONTAINER
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
command: docker container exec
|
||||
short: Run a command in a running container
|
||||
long: Run a command in a running container
|
||||
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: 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: <name|uid>[:<group|gid>])'
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
command: docker container export
|
||||
short: Export a container's filesystem as a tar archive
|
||||
long: Export a container's filesystem as a tar archive
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker container inspect
|
||||
short: Display detailed information on one or more containers
|
||||
long: Display detailed information on one or more containers
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker container kill
|
||||
short: Kill one or more running containers
|
||||
long: Kill one or more running containers
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
command: docker container logs
|
||||
short: Fetch the logs of a container
|
||||
long: Fetch the logs of a container
|
||||
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:37) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tail
|
||||
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:37) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
min_api_version: "1.35"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
command: docker container ls
|
||||
aliases: ps, list
|
||||
short: List containers
|
||||
long: List containers
|
||||
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 numeric 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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container pause
|
||||
short: Pause all processes within one or more containers
|
||||
long: Pause all processes within one or more containers
|
||||
usage: docker container pause CONTAINER [CONTAINER...]
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container port
|
||||
short: List port mappings or a specific mapping for the container
|
||||
long: List port mappings or a specific mapping for the container
|
||||
usage: docker container port CONTAINER [PRIVATE_PORT[/PROTO]]
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
command: docker container prune
|
||||
short: Remove all stopped containers
|
||||
long: Removes all stopped containers.
|
||||
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=<timestamp>')
|
||||
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
|
||||
examples: |-
|
||||
### Prune containers
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
### Filtering
|
||||
|
||||
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:
|
||||
|
||||
* until (`<timestamp>`) - only remove containers created before given timestamp
|
||||
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - 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 `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
|
||||
which removes containers with the specified labels. The other
|
||||
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
|
||||
containers without the specified labels.
|
||||
|
||||
The following removes containers created more than 5 minutes ago:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
|
||||
$ docker container prune --force --filter "until=5m"
|
||||
|
||||
Deleted Containers:
|
||||
53a9bc23a5168b6caa2bfbefddf1b30f93c7ad57f3dec271fd32707497cb9369
|
||||
|
||||
Total reclaimed space: 25 B
|
||||
|
||||
$ 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
|
||||
```
|
||||
|
||||
The following removes containers created before `2017-01-04T13:10:00`:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
|
||||
$ docker container prune --force --filter "until=2017-01-04T13:10:00"
|
||||
|
||||
Deleted Containers:
|
||||
4a75091a6d618526fcd8b33ccd6e5928ca2a64415466f768a6180004b0c72c6c
|
||||
|
||||
Total reclaimed space: 27 B
|
||||
|
||||
$ 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
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container rename
|
||||
short: Rename a container
|
||||
long: Rename a container
|
||||
usage: docker container rename CONTAINER NEW_NAME
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker container restart
|
||||
short: Restart one or more containers
|
||||
long: Restart one or more containers
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
command: docker container rm
|
||||
short: Remove one or more containers
|
||||
long: Remove one or more containers
|
||||
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 the volumes associated with the container
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,879 +0,0 @@
|
|||
command: docker container run
|
||||
short: Run a command in a new container
|
||||
long: Run a command in a new container
|
||||
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: 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
|
||||
- option: cpu-percent
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
description: CPU percent (Windows only)
|
||||
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 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: 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: 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
|
||||
- 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
|
||||
- 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: string
|
||||
default_value: default
|
||||
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: string
|
||||
default_value: default
|
||||
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: true
|
||||
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: 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: <name|uid>[:<group|gid>])'
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
command: docker container start
|
||||
short: Start one or more stopped containers
|
||||
long: Start one or more stopped containers
|
||||
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
|
||||
- option: checkpoint-dir
|
||||
value_type: string
|
||||
description: Use a custom checkpoint storage directory
|
||||
deprecated: false
|
||||
experimental: true
|
||||
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: interactive
|
||||
shorthand: i
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Attach container's STDIN
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
command: docker container stats
|
||||
short: Display a live stream of container(s) resource usage statistics
|
||||
long: Display a live stream of container(s) resource usage statistics
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
command: docker container stop
|
||||
short: Stop one or more running containers
|
||||
long: Stop one or more running containers
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container top
|
||||
short: Display the running processes of a container
|
||||
long: Display the running processes of a container
|
||||
usage: docker container top CONTAINER [ps OPTIONS]
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container unpause
|
||||
short: Unpause all processes within one or more containers
|
||||
long: Unpause all processes within one or more containers
|
||||
usage: docker container unpause CONTAINER [CONTAINER...]
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
command: docker container update
|
||||
short: Update configuration of one or more containers
|
||||
long: Update configuration of one or more containers
|
||||
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: restart
|
||||
value_type: string
|
||||
description: Restart policy to apply when a container exits
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker container 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
|
||||
usage: docker container wait CONTAINER [CONTAINER...]
|
||||
pname: docker container
|
||||
plink: docker_container.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
command: 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` 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.
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
`/path/to/file:name.txt` or `./file:name.txt`
|
||||
|
||||
It is not possible to copy certain system files such as resources under
|
||||
`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs-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):
|
||||
|
||||
```bash
|
||||
$ docker exec CONTAINER tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
|
||||
```
|
||||
|
||||
```bash
|
||||
$ 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`.
|
||||
usage: "docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-\n\tdocker 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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,971 +0,0 @@
|
|||
command: docker create
|
||||
short: Create a new container
|
||||
long: |-
|
||||
The `docker create` command 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 start <container_id>` 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`.
|
||||
|
||||
Please see the [run command](run.md) section and the [Docker run reference](../run.md) for more details.
|
||||
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: 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
|
||||
- option: cpu-percent
|
||||
value_type: int64
|
||||
default_value: "0"
|
||||
description: CPU percent (Windows only)
|
||||
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 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: 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: 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
|
||||
- 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
|
||||
- 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: string
|
||||
default_value: default
|
||||
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: string
|
||||
default_value: default
|
||||
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: true
|
||||
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: 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: <name|uid>[:<group|gid>])'
|
||||
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
|
||||
examples: |-
|
||||
### Create and start a container
|
||||
|
||||
```bash
|
||||
$ docker create -t -i fedora bash
|
||||
|
||||
6d8af538ec541dd581ebc2a24153a28329acb5268abe5ef868c1f1a261221752
|
||||
|
||||
$ docker start -a -i 6d8af538ec5
|
||||
|
||||
bash-4.2#
|
||||
```
|
||||
|
||||
### Initialize volumes
|
||||
|
||||
As of v1.4.0 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:
|
||||
|
||||
```bash
|
||||
$ docker create -v /data --name data ubuntu
|
||||
|
||||
240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57
|
||||
|
||||
$ 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 ..
|
||||
```
|
||||
|
||||
Similarly, `create` a host directory bind mounted volume container, which can
|
||||
then be used from the subsequent container:
|
||||
|
||||
```bash
|
||||
$ docker create -v /home/docker:/docker --name docker ubuntu
|
||||
|
||||
9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03
|
||||
|
||||
$ 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
|
||||
```
|
||||
|
||||
|
||||
Set storage driver options per container.
|
||||
|
||||
```bash
|
||||
$ docker create -it --storage-opt size=120G fedora /bin/bash
|
||||
```
|
||||
|
||||
This (size) will allow to set the container rootfs size to 120G at creation time.
|
||||
This option is only available for the `devicemapper`, `btrfs`, `overlay2`,
|
||||
`windowsfilter` and `zfs` graph drivers.
|
||||
For the `devicemapper`, `btrfs`, `windowsfilter` and `zfs` graph drivers,
|
||||
user cannot pass a size less than the Default BaseFS Size.
|
||||
For the `overlay2` storage driver, the size option is only available if the
|
||||
backing fs is `xfs` and mounted with the `pquota` mount option.
|
||||
Under these conditions, user can pass any size less than the backing fs size.
|
||||
|
||||
### Specify isolation technology for container (--isolation)
|
||||
|
||||
This option is useful in situations where you are running Docker containers on
|
||||
Windows. The `--isolation=<value>` 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 if the
|
||||
daemon is running on Windows server, or `hyperv` if running on Windows client. |
|
||||
| `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"`.
|
||||
|
||||
### Dealing with dynamically created devices (--device-cgroup-rule)
|
||||
|
||||
Devices available to a container are assigned at creation time. The
|
||||
assigned devices will both be added to the cgroup.allow file and
|
||||
created into the container once it is run. This poses a problem when
|
||||
a new device needs to be added to running container.
|
||||
|
||||
One of the solution is to add a more permissive rule to a container
|
||||
allowing it access to a wider range of devices. For example, supposing
|
||||
our container needs access to a character device with major `42` and
|
||||
any number of minor number (added as new devices appear), the
|
||||
following rule would be added:
|
||||
|
||||
```
|
||||
docker create --device-cgroup-rule='c 42:* rmw' -name my-container my-image
|
||||
```
|
||||
|
||||
Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 <minor>`
|
||||
the required device when it is added.
|
||||
|
||||
NOTE: initially present devices still need to be explicitely added to
|
||||
the create/run command
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
command: docker deploy
|
||||
short: Deploy a new stack or update an existing stack
|
||||
long: |-
|
||||
Create and update a stack from a `compose` or a `dab` file on the swarm. This command
|
||||
has to be run targeting a manager node.
|
||||
usage: docker deploy [OPTIONS] STACK
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
options:
|
||||
- option: bundle-file
|
||||
value_type: string
|
||||
description: Path to a Distributed Application Bundle file
|
||||
deprecated: false
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
- option: compose-file
|
||||
shorthand: c
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Path to a Compose file
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: prune
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Prune services that are no longer referenced
|
||||
deprecated: false
|
||||
min_api_version: "1.27"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
- option: resolve-image
|
||||
value_type: string
|
||||
default_value: always
|
||||
description: |
|
||||
Query the registry to resolve image digest and supported platforms ("always"|"changed"|"never")
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
- option: with-registry-auth
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Send registry authentication details to Swarm agents
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
examples: |-
|
||||
### Compose file
|
||||
|
||||
The `deploy` command supports compose file version `3.0` and above.
|
||||
|
||||
```bash
|
||||
$ docker stack deploy --compose-file docker-compose.yml vossibility
|
||||
|
||||
Ignoring unsupported options: links
|
||||
|
||||
Creating network vossibility_vossibility
|
||||
Creating network vossibility_default
|
||||
Creating service vossibility_nsqd
|
||||
Creating service vossibility_logstash
|
||||
Creating service vossibility_elasticsearch
|
||||
Creating service vossibility_kibana
|
||||
Creating service vossibility_ghollector
|
||||
Creating service vossibility_lookupd
|
||||
```
|
||||
|
||||
You can verify that the services were correctly created
|
||||
|
||||
```bash
|
||||
$ docker service ls
|
||||
|
||||
ID NAME MODE REPLICAS IMAGE
|
||||
29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
|
||||
4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
|
||||
4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
|
||||
7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
|
||||
9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
|
||||
axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
|
||||
```
|
||||
|
||||
### DAB file
|
||||
|
||||
```bash
|
||||
$ docker stack deploy --bundle-file vossibility-stack.dab vossibility
|
||||
|
||||
Loading bundle from vossibility-stack.dab
|
||||
Creating service vossibility_elasticsearch
|
||||
Creating service vossibility_kibana
|
||||
Creating service vossibility_logstash
|
||||
Creating service vossibility_lookupd
|
||||
Creating service vossibility_nsqd
|
||||
Creating service vossibility_vossibility-collector
|
||||
```
|
||||
|
||||
You can verify that the services were correctly created:
|
||||
|
||||
```bash
|
||||
$ docker service ls
|
||||
|
||||
ID NAME MODE REPLICAS IMAGE
|
||||
29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
|
||||
4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
|
||||
4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
|
||||
7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
|
||||
9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
|
||||
axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
command: 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:
|
||||
|
||||
| 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.
|
||||
usage: docker diff CONTAINER
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
examples: |-
|
||||
Inspect the changes to an `nginx` container:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,424 +0,0 @@
|
|||
command: 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.
|
||||
|
||||
### Object types
|
||||
|
||||
#### Containers
|
||||
|
||||
Docker containers report the following events:
|
||||
|
||||
- `attach`
|
||||
- `commit`
|
||||
- `copy`
|
||||
- `create`
|
||||
- `destroy`
|
||||
- `detach`
|
||||
- `die`
|
||||
- `exec_create`
|
||||
- `exec_detach`
|
||||
- `exec_start`
|
||||
- `export`
|
||||
- `health_status`
|
||||
- `kill`
|
||||
- `oom`
|
||||
- `pause`
|
||||
- `rename`
|
||||
- `resize`
|
||||
- `restart`
|
||||
- `start`
|
||||
- `stop`
|
||||
- `top`
|
||||
- `unpause`
|
||||
- `update`
|
||||
|
||||
#### Images
|
||||
|
||||
Docker images report the following events:
|
||||
|
||||
- `delete`
|
||||
- `import`
|
||||
- `load`
|
||||
- `pull`
|
||||
- `push`
|
||||
- `save`
|
||||
- `tag`
|
||||
- `untag`
|
||||
|
||||
#### Plugins
|
||||
|
||||
Docker plugins report the following events:
|
||||
|
||||
- `enable`
|
||||
- `disable`
|
||||
- `install`
|
||||
- `remove`
|
||||
|
||||
#### Volumes
|
||||
|
||||
Docker volumes report the following events:
|
||||
|
||||
- `create`
|
||||
- `destroy`
|
||||
- `mount`
|
||||
- `unmount`
|
||||
|
||||
#### Networks
|
||||
|
||||
Docker networks report the following events:
|
||||
|
||||
- `create`
|
||||
- `connect`
|
||||
- `destroy`
|
||||
- `disconnect`
|
||||
- `remove`
|
||||
|
||||
#### Daemons
|
||||
|
||||
Docker daemons report the following events:
|
||||
|
||||
- `reload`
|
||||
|
||||
#### Services
|
||||
|
||||
Docker services report the following events:
|
||||
|
||||
- `create`
|
||||
- `remove`
|
||||
- `update`
|
||||
|
||||
#### Nodes
|
||||
|
||||
Docker nodes report the following events:
|
||||
|
||||
- `create`
|
||||
- `remove`
|
||||
- `update`
|
||||
|
||||
#### Secrets
|
||||
|
||||
Docker secrets report the following events:
|
||||
|
||||
- `create`
|
||||
- `remove`
|
||||
- `update`
|
||||
|
||||
#### Configs
|
||||
|
||||
Docker configs report the following events:
|
||||
|
||||
- `create`
|
||||
- `remove`
|
||||
- `update`
|
||||
|
||||
### Limiting, filtering, and formatting the output
|
||||
|
||||
#### Limit events by time
|
||||
|
||||
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.
|
||||
|
||||
#### Filtering
|
||||
|
||||
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 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:
|
||||
|
||||
* config (`config=<name or id>`)
|
||||
* container (`container=<name or id>`)
|
||||
* daemon (`daemon=<name or id>`)
|
||||
* event (`event=<event action>`)
|
||||
* image (`image=<repository or tag>`)
|
||||
* label (`label=<key>` or `label=<key>=<value>`)
|
||||
* network (`network=<name or id>`)
|
||||
* node (`node=<id>`)
|
||||
* plugin (`plugin=<name or id>`)
|
||||
* scope (`scope=<local or swarm>`)
|
||||
* secret (`secret=<name or id>`)
|
||||
* service (`service=<name or id>`)
|
||||
* type (`type=<container or image or volume or network or daemon or plugin or service or node or secret or config>`)
|
||||
* volume (`volume=<name>`)
|
||||
|
||||
#### Format
|
||||
|
||||
If a format (`--format`) is specified, the given template will be executed
|
||||
instead of the default
|
||||
format. Go's [text/template](http://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 http://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
|
||||
examples: |-
|
||||
### Basic example
|
||||
|
||||
You'll need two shells for this example.
|
||||
|
||||
**Shell 1: Listening for events:**
|
||||
|
||||
```bash
|
||||
$ docker events
|
||||
```
|
||||
|
||||
**Shell 2: Start and Stop containers:**
|
||||
|
||||
```bash
|
||||
$ docker create --name test alpine:latest top
|
||||
$ docker start test
|
||||
$ docker stop test
|
||||
```
|
||||
|
||||
**Shell 1: (Again .. now showing events):**
|
||||
|
||||
```none
|
||||
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`.
|
||||
|
||||
### 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:
|
||||
|
||||
```bash
|
||||
$ 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 '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 '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
|
||||
|
||||
The following commands show several different ways to filter the `docker event`
|
||||
output.
|
||||
|
||||
```bash
|
||||
$ 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)
|
||||
|
||||
$ 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)
|
||||
|
||||
$ 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)
|
||||
|
||||
$ 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)
|
||||
|
||||
$ docker events --filter 'container=test' --filter 'event=stop'
|
||||
|
||||
2017-01-05T00:46:13.664099505+08:00 container stop a9d1...e130 (image=alpine, name=test)
|
||||
|
||||
$ 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)
|
||||
|
||||
$ 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)
|
||||
|
||||
$ docker events --filter 'container=container_1' --filter 'container=container_2'
|
||||
|
||||
2014-09-03T15:49:29.999999999Z07:00 container die 4386fb97867d (image=ubuntu-1:14.04)
|
||||
2014-05-10T17:42:14.999999999Z07:00 container stop 4386fb97867d (image=ubuntu-1:14.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'
|
||||
|
||||
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'
|
||||
|
||||
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'
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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 --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)
|
||||
```
|
||||
|
||||
### Format the output
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
#### Format as JSON
|
||||
|
||||
```none
|
||||
$ 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..
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
command: docker exec
|
||||
short: Run a command in a running container
|
||||
long: |-
|
||||
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.
|
||||
|
||||
COMMAND will run in the default directory of the container. If the
|
||||
underlying image has a custom directory specified with the WORKDIR directive
|
||||
in its Dockerfile, this will be used instead.
|
||||
|
||||
COMMAND should be an executable, a chained or a quoted command
|
||||
will not work. Example: `docker exec -ti my_container "echo a && echo b"` will
|
||||
not work, but `docker exec -ti my_container sh -c "echo a && echo b"` will.
|
||||
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: 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: <name|uid>[:<group|gid>])'
|
||||
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```bash\n$
|
||||
docker run --name ubuntu_bash --rm -i -t ubuntu bash\n```\n\nThis will create a
|
||||
container named `ubuntu_bash` and start a Bash session.\n\nNext, execute a command
|
||||
on the container.\n\n```bash\n$ docker exec -d ubuntu_bash touch /tmp/execWorks\n```\n\nThis
|
||||
will create a new file `/tmp/execWorks` inside the running container\n`ubuntu_bash`,
|
||||
in the background.\n\nNext, execute an interactive `bash` shell on the container.\n\n```bash\n$
|
||||
docker exec -it ubuntu_bash bash\n```\n\nThis will create a new Bash session in
|
||||
the container `ubuntu_bash`.\n\nNext, set an environment variable in the current
|
||||
bash session.\n\n```bash\n$ docker exec -it -e VAR=1 ubuntu_bash bash\n```\n\nThis
|
||||
will create a new Bash session in the container `ubuntu_bash` with environment \nvariable
|
||||
`$VAR` set to \"1\". Note that this environment variable will only be valid \non
|
||||
the current Bash session.\n\nBy default `docker exec` command runs in the same working
|
||||
directory set when container was created.\n\n```bash\n$ docker exec -it ubuntu_bash
|
||||
pwd\n/\n```\n\nYou can select working directory for the command to execute into\n\n```bash\n$
|
||||
docker exec -it -w /root ubuntu_bash 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 will fail with an error:\n\n```bash\n$ docker pause test\n\ntest\n\n$ docker
|
||||
ps\n\nCONTAINER ID IMAGE COMMAND CREATED STATUS
|
||||
\ PORTS NAMES\n1ae3b36715d2 ubuntu:latest
|
||||
\ \"bash\" 17 seconds ago Up 16 seconds (Paused) test\n\n$
|
||||
docker exec test ls\n\nFATA[0000] Error response from daemon: Container test is
|
||||
paused, unpause the container before exec\n\n$ echo $?\n1\n```"
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
command: 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.
|
||||
|
||||
Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/#backup-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
|
||||
examples: |-
|
||||
Each of these commands has the same result.
|
||||
|
||||
```bash
|
||||
$ docker export red_panda > latest.tar
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker export --output="latest.tar" red_panda
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
command: 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 numeric IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
To see how the `docker:latest` image was built:
|
||||
|
||||
```bash
|
||||
$ 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 <ad 0 B
|
||||
511136ea3c5a 9 months ago 0 B Imported from -
|
||||
```
|
||||
|
||||
To see how the `docker:apache` image was added to a container's base image:
|
||||
|
||||
```bash
|
||||
$ docker history docker:scm
|
||||
IMAGE CREATED CREATED BY SIZE COMMENT
|
||||
2ac9d1098bf1 3 months ago /bin/bash 241.4 MB Added Apache to Fedora base image
|
||||
88b42ffd1f7c 5 months ago /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7 373.7 MB
|
||||
c69cab00d6ef 5 months ago /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar 0 B
|
||||
511136ea3c5a 19 months ago 0 B Imported from -
|
||||
```
|
||||
|
||||
### Format the output
|
||||
|
||||
The formatting option (`--format`) will pretty-prints history output
|
||||
using a Go template.
|
||||
|
||||
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 |
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
$ docker history --format "{{.ID}}: {{.CreatedAt}}" busybox
|
||||
|
||||
f6e427c148a7: 4 weeks ago
|
||||
<missing>: 4 weeks ago
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
command: docker image
|
||||
short: Manage images
|
||||
long: Manage images.
|
||||
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
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,291 +0,0 @@
|
|||
command: docker image build
|
||||
short: Build an image from a Dockerfile
|
||||
long: Build an image from a Dockerfile
|
||||
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: platform
|
||||
value_type: string
|
||||
description: Set platform if server is multi-platform capable
|
||||
deprecated: false
|
||||
min_api_version: "1.32"
|
||||
experimental: true
|
||||
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: 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: stream
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Stream attaches to server to negotiate build context
|
||||
deprecated: false
|
||||
min_api_version: "1.31"
|
||||
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
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
command: docker image history
|
||||
short: Show the history of an image
|
||||
long: Show the history of an image
|
||||
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 numeric IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
command: docker image 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
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
command: docker image inspect
|
||||
short: Display detailed information on one or more images
|
||||
long: Display detailed information on one or more images
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker image load
|
||||
short: Load an image from a tar archive or STDIN
|
||||
long: Load an image from a tar archive or STDIN
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
command: docker image ls
|
||||
aliases: images, list
|
||||
short: List images
|
||||
long: List images
|
||||
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 numeric IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
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.
|
||||
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=<timestamp>')
|
||||
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
|
||||
examples: |-
|
||||
Example output:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
|
||||
Total reclaimed space: 16.43 MB
|
||||
```
|
||||
|
||||
### Filtering
|
||||
|
||||
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:
|
||||
|
||||
* until (`<timestamp>`) - only remove images created before given timestamp
|
||||
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - 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 `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
|
||||
which removes images with the specified labels. The other
|
||||
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), 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`.
|
||||
|
||||
The following removes images created before `2017-01-04T00:00:00`:
|
||||
|
||||
```bash
|
||||
$ 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"
|
||||
|
||||
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
|
||||
|
||||
$ 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
|
||||
```
|
||||
|
||||
The following removes images created more than 10 days (`240h`) ago:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
|
||||
$ 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
|
||||
|
||||
Total reclaimed space: 792.6 MB
|
||||
|
||||
$ 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
|
||||
```
|
||||
|
||||
The following example removes images with the label `deprecated`:
|
||||
|
||||
```bash
|
||||
$ docker image prune --filter="label=deprecated"
|
||||
```
|
||||
|
||||
The following example removes images with the label `maintainer` set to `john`:
|
||||
|
||||
```bash
|
||||
$ docker image prune --filter="label=maintainer=john"
|
||||
```
|
||||
|
||||
This example removes images which have no `maintainer` label:
|
||||
|
||||
```bash
|
||||
$ docker image prune --filter="label!=maintainer"
|
||||
```
|
||||
|
||||
This example removes images which have a maintainer label not set to `john`:
|
||||
|
||||
```bash
|
||||
$ 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.
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
command: docker image pull
|
||||
short: Pull an image or a repository from a registry
|
||||
long: Pull an image or a repository from a registry
|
||||
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: true
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
command: docker image push
|
||||
short: Push an image or a repository to a registry
|
||||
long: Push an image or a repository to a registry
|
||||
usage: docker image push [OPTIONS] NAME[:TAG]
|
||||
pname: docker image
|
||||
plink: docker_image.yaml
|
||||
options:
|
||||
- option: disable-content-trust
|
||||
value_type: bool
|
||||
default_value: "true"
|
||||
description: Skip image signing
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
command: docker image rm
|
||||
aliases: rmi, remove
|
||||
short: Remove one or more images
|
||||
long: Remove one or more images
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
command: docker image 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)
|
||||
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
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
command: docker image tag
|
||||
short: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
|
||||
long: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
|
||||
usage: docker image tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
|
||||
pname: docker image
|
||||
plink: docker_image.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,370 +0,0 @@
|
|||
command: docker images
|
||||
short: List images
|
||||
long: |-
|
||||
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.
|
||||
|
||||
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.
|
||||
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 numeric IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### List the most recently created images
|
||||
|
||||
```bash
|
||||
$ docker images
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
<none> <none> 77af4d6b9913 19 hours ago 1.089 GB
|
||||
committ latest b6fa739cedf5 19 hours ago 1.089 GB
|
||||
<none> <none> 78a85c484f71 19 hours ago 1.089 GB
|
||||
docker latest 30557a29d5ab 20 hours ago 1.089 GB
|
||||
<none> <none> 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 :
|
||||
|
||||
```bash
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
$ docker images java:8
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
java 8 308e519aac60 6 days ago 824.5 MB
|
||||
```
|
||||
|
||||
If nothing matches `REPOSITORY[:TAG]`, the list is empty.
|
||||
|
||||
```bash
|
||||
$ docker images java:0
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
```
|
||||
|
||||
### List the full length image IDs
|
||||
|
||||
```bash
|
||||
$ docker images --no-trunc
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
<none> <none> sha256:77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB
|
||||
committest latest sha256:b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB
|
||||
<none> <none> sha256:78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB
|
||||
docker latest sha256:30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB
|
||||
<none> <none> sha256:0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB
|
||||
<none> <none> sha256:18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB
|
||||
<none> <none> sha256:f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB
|
||||
tryout latest sha256:2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB
|
||||
<none> <none> sha256:5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB
|
||||
```
|
||||
|
||||
### List image 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:
|
||||
|
||||
```bash
|
||||
$ docker images --digests
|
||||
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
|
||||
localhost:5000/test/busybox <none> 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.
|
||||
|
||||
### Filtering
|
||||
|
||||
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:
|
||||
|
||||
* dangling (boolean - true or false)
|
||||
* label (`label=<key>` or `label=<key>=<value>`)
|
||||
* before (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filter images created before given id or references
|
||||
* since (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - 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)
|
||||
|
||||
```bash
|
||||
$ docker images --filter "dangling=true"
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
<none> <none> 8abc22fbb042 4 weeks ago 0 B
|
||||
<none> <none> 48e5f45168b9 4 weeks ago 2.489 MB
|
||||
<none> <none> bf747efa0e2f 4 weeks ago 0 B
|
||||
<none> <none> 980fe10e5736 12 weeks ago 101.4 MB
|
||||
<none> <none> dea752e4e117 12 weeks ago 101.4 MB
|
||||
<none> <none> 511136ea3c5a 8 months ago 0 B
|
||||
```
|
||||
|
||||
This will display untagged images that are the leaves of the images tree (not
|
||||
intermediary layers). These images occur when a new build of an image takes the
|
||||
`repo:tag` away from the image ID, leaving it as `<none>:<none>` or untagged.
|
||||
A warning will be issued if trying to remove an image when a container is presently
|
||||
using it. By having this flag it allows for batch cleanup.
|
||||
|
||||
You can use this in conjunction with `docker rmi ...`:
|
||||
|
||||
```bash
|
||||
$ docker rmi $(docker images -f "dangling=true" -q)
|
||||
|
||||
8abc22fbb042
|
||||
48e5f45168b9
|
||||
bf747efa0e2f
|
||||
980fe10e5736
|
||||
dea752e4e117
|
||||
511136ea3c5a
|
||||
```
|
||||
|
||||
> **Note**: Docker warns you if any containers exist that are using these
|
||||
> untagged images.
|
||||
|
||||
|
||||
#### Show images with a given label
|
||||
|
||||
The `label` filter matches images based on the presence of a `label` alone or a `label` and a
|
||||
value.
|
||||
|
||||
The following filter matches images with the `com.example.version` label regardless of its value.
|
||||
|
||||
```bash
|
||||
$ docker images --filter "label=com.example.version"
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
match-me-1 latest eeae25ada2aa About a minute ago 188.3 MB
|
||||
match-me-2 latest dea752e4e117 About a minute ago 188.3 MB
|
||||
```
|
||||
|
||||
The following filter matches images with the `com.example.version` label with the `1.0` value.
|
||||
|
||||
```bash
|
||||
$ docker images --filter "label=com.example.version=1.0"
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
match-me latest 511136ea3c5a About a minute ago 188.3 MB
|
||||
```
|
||||
|
||||
In this example, with the `0.1` value, it returns an empty set because no matches were found.
|
||||
|
||||
```bash
|
||||
$ docker images --filter "label=com.example.version=0.1"
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
```
|
||||
|
||||
#### Filter images by time
|
||||
|
||||
The `before` filter shows only images created before the image with
|
||||
given id or reference. For example, having these images:
|
||||
|
||||
```bash
|
||||
$ docker images
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
image1 latest eeae25ada2aa 4 minutes ago 188.3 MB
|
||||
image2 latest dea752e4e117 9 minutes ago 188.3 MB
|
||||
image3 latest 511136ea3c5a 25 minutes ago 188.3 MB
|
||||
```
|
||||
|
||||
Filtering with `before` would give:
|
||||
|
||||
```bash
|
||||
$ docker images --filter "before=image1"
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
image2 latest dea752e4e117 9 minutes ago 188.3 MB
|
||||
image3 latest 511136ea3c5a 25 minutes ago 188.3 MB
|
||||
```
|
||||
|
||||
Filtering with `since` would give:
|
||||
|
||||
```bash
|
||||
$ docker images --filter "since=image3"
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
image1 latest eeae25ada2aa 4 minutes ago 188.3 MB
|
||||
image2 latest dea752e4e117 9 minutes ago 188.3 MB
|
||||
```
|
||||
|
||||
#### Filter images by reference
|
||||
|
||||
The `reference` filter shows only images whose reference matches
|
||||
the specified pattern.
|
||||
|
||||
```bash
|
||||
$ docker images
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
busybox latest e02e811dd08f 5 weeks ago 1.09 MB
|
||||
busybox uclibc e02e811dd08f 5 weeks ago 1.09 MB
|
||||
busybox musl 733eb3059dce 5 weeks ago 1.21 MB
|
||||
busybox glibc 21c16b6787c6 5 weeks ago 4.19 MB
|
||||
```
|
||||
|
||||
Filtering with `reference` would give:
|
||||
|
||||
```bash
|
||||
$ docker images --filter=reference='busy*:*libc'
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
busybox uclibc e02e811dd08f 5 weeks ago 1.09 MB
|
||||
busybox glibc 21c16b6787c6 5 weeks ago 4.19 MB
|
||||
```
|
||||
|
||||
### Format the output
|
||||
|
||||
The formatting option (`--format`) will pretty print container output
|
||||
using a Go template.
|
||||
|
||||
Valid placeholders for the Go template are listed below:
|
||||
|
||||
| Placeholder | Description|
|
||||
| ---- | ---- |
|
||||
| `.ID` | Image ID |
|
||||
| `.Repository` | Image repository |
|
||||
| `.Tag` | Image tag |
|
||||
| `.Digest` | Image digest |
|
||||
| `.CreatedSince` | Elapsed time since the image was created |
|
||||
| `.CreatedAt` | Time when the image was created |
|
||||
| `.Size` | Image disk size |
|
||||
|
||||
When using the `--format` option, the `image` command will either
|
||||
output the data exactly as the template declares or, when using the
|
||||
`table` directive, will include column headers as well.
|
||||
|
||||
The following example uses a template without headers and outputs the
|
||||
`ID` and `Repository` entries separated by a colon for all images:
|
||||
|
||||
```bash
|
||||
$ docker images --format "{{.ID}}: {{.Repository}}"
|
||||
|
||||
77af4d6b9913: <none>
|
||||
b6fa739cedf5: committ
|
||||
78a85c484f71: <none>
|
||||
30557a29d5ab: docker
|
||||
5ed6274db6ce: <none>
|
||||
746b819f315e: postgres
|
||||
746b819f315e: postgres
|
||||
746b819f315e: postgres
|
||||
746b819f315e: postgres
|
||||
```
|
||||
|
||||
To list all images with their repository and tag in a table format you
|
||||
can use:
|
||||
|
||||
```bash
|
||||
$ docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"
|
||||
|
||||
IMAGE ID REPOSITORY TAG
|
||||
77af4d6b9913 <none> <none>
|
||||
b6fa739cedf5 committ latest
|
||||
78a85c484f71 <none> <none>
|
||||
30557a29d5ab docker latest
|
||||
5ed6274db6ce <none> <none>
|
||||
746b819f315e postgres 9
|
||||
746b819f315e postgres 9.3
|
||||
746b819f315e postgres 9.3.5
|
||||
746b819f315e postgres latest
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
command: docker import
|
||||
short: Import the contents from a tarball to create a filesystem image
|
||||
long: |-
|
||||
You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The
|
||||
`URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)
|
||||
containing a filesystem or to an individual file on the Docker host. If you
|
||||
specify an archive, Docker untars it in the container relative to the `/`
|
||||
(root). If you specify an individual file, you must specify the full path within
|
||||
the host. To import from a remote location, specify a `URI` that begins with the
|
||||
`http://` or `https://` protocol.
|
||||
|
||||
The `--change` option will apply `Dockerfile` instructions to the image
|
||||
that is created.
|
||||
Supported `Dockerfile` instructions:
|
||||
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
||||
usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
|
||||
pname: docker
|
||||
plink: docker.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
|
||||
examples: |-
|
||||
### Import from a remote location
|
||||
|
||||
This will create a new untagged image.
|
||||
|
||||
```bash
|
||||
$ docker import http://example.com/exampleimage.tgz
|
||||
```
|
||||
|
||||
### Import from a local file
|
||||
|
||||
- Import to docker via pipe and `STDIN`.
|
||||
|
||||
```bash
|
||||
$ cat exampleimage.tgz | docker import - exampleimagelocal:new
|
||||
```
|
||||
|
||||
- Import with a commit message.
|
||||
|
||||
```bash
|
||||
$ cat exampleimage.tgz | docker import --message "New image imported from tarball" - exampleimagelocal:new
|
||||
```
|
||||
|
||||
- Import to docker from a local archive.
|
||||
|
||||
```bash
|
||||
$ docker import /path/to/exampleimage.tgz
|
||||
```
|
||||
|
||||
### Import from a local directory
|
||||
|
||||
```bash
|
||||
$ sudo tar -c . | docker import - exampleimagedir
|
||||
```
|
||||
|
||||
### Import from a local directory with new configurations
|
||||
|
||||
```bash
|
||||
$ sudo tar -c . | docker import --change "ENV DEBUG true" - exampleimagedir
|
||||
```
|
||||
|
||||
Note the `sudo` in this example – you must preserve
|
||||
the ownership of the files (especially root ownership) during the
|
||||
archiving with tar. If you are not root (or the sudo command) when you
|
||||
tar, then the ownerships might not get preserved.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
command: docker info
|
||||
short: Display system-wide information
|
||||
long: |-
|
||||
This command displays system wide information regarding the Docker installation.
|
||||
Information displayed includes the kernel version, number of containers and images.
|
||||
The number of images shown is the number of unique images. The same image tagged
|
||||
under different names is counted only once.
|
||||
|
||||
If a format is specified, the given template will be executed instead of the
|
||||
default format. Go's [text/template](http://golang.org/pkg/text/template/) package
|
||||
describes all the details of the format.
|
||||
|
||||
Depending on the storage driver in use, additional information can be shown, such
|
||||
as pool name, data file, metadata file, data space used, total data space, metadata
|
||||
space used, and total metadata space.
|
||||
|
||||
The data file is where the images are stored and the metadata file is where the
|
||||
meta data regarding those images are stored. When run for the first time Docker
|
||||
allocates a certain amount of data space and meta data space from the space
|
||||
available on the volume where `/var/lib/docker` is mounted.
|
||||
usage: docker info [OPTIONS]
|
||||
pname: docker
|
||||
plink: docker.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
|
||||
examples: |-
|
||||
### Show output
|
||||
|
||||
The example below shows the output for a daemon running on Red Hat Enterprise Linux,
|
||||
using the `devicemapper` storage driver. As can be seen in the output, additional
|
||||
information about the `devicemapper` storage driver is shown:
|
||||
|
||||
```bash
|
||||
$ docker info
|
||||
|
||||
Containers: 14
|
||||
Running: 3
|
||||
Paused: 1
|
||||
Stopped: 10
|
||||
Images: 52
|
||||
Server Version: 1.10.3
|
||||
Storage Driver: devicemapper
|
||||
Pool Name: docker-202:2-25583803-pool
|
||||
Pool Blocksize: 65.54 kB
|
||||
Base Device Size: 10.74 GB
|
||||
Backing Filesystem: xfs
|
||||
Data file: /dev/loop0
|
||||
Metadata file: /dev/loop1
|
||||
Data Space Used: 1.68 GB
|
||||
Data Space Total: 107.4 GB
|
||||
Data Space Available: 7.548 GB
|
||||
Metadata Space Used: 2.322 MB
|
||||
Metadata Space Total: 2.147 GB
|
||||
Metadata Space Available: 2.145 GB
|
||||
Udev Sync Supported: true
|
||||
Deferred Removal Enabled: false
|
||||
Deferred Deletion Enabled: false
|
||||
Deferred Deleted Device Count: 0
|
||||
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
|
||||
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
|
||||
Library Version: 1.02.107-RHEL7 (2015-12-01)
|
||||
Execution Driver: native-0.2
|
||||
Logging Driver: json-file
|
||||
Plugins:
|
||||
Volume: local
|
||||
Network: null host bridge
|
||||
Kernel Version: 3.10.0-327.el7.x86_64
|
||||
Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
|
||||
OSType: linux
|
||||
Architecture: x86_64
|
||||
CPUs: 1
|
||||
Total Memory: 991.7 MiB
|
||||
Name: ip-172-30-0-91.ec2.internal
|
||||
ID: I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S
|
||||
Docker Root Dir: /var/lib/docker
|
||||
Debug mode (client): false
|
||||
Debug mode (server): false
|
||||
Username: gordontheturtle
|
||||
Registry: https://index.docker.io/v1/
|
||||
Insecure registries:
|
||||
myinsecurehost:5000
|
||||
127.0.0.0/8
|
||||
```
|
||||
|
||||
### Show debugging output
|
||||
|
||||
Here is a sample output for a daemon running on Ubuntu, using the overlay2
|
||||
storage driver and a node that is part of a 2-node swarm:
|
||||
|
||||
```bash
|
||||
$ docker -D info
|
||||
|
||||
Containers: 14
|
||||
Running: 3
|
||||
Paused: 1
|
||||
Stopped: 10
|
||||
Images: 52
|
||||
Server Version: 1.13.0
|
||||
Storage Driver: overlay2
|
||||
Backing Filesystem: extfs
|
||||
Supports d_type: true
|
||||
Native Overlay Diff: false
|
||||
Logging Driver: json-file
|
||||
Cgroup Driver: cgroupfs
|
||||
Plugins:
|
||||
Volume: local
|
||||
Network: bridge host macvlan null overlay
|
||||
Swarm: active
|
||||
NodeID: rdjq45w1op418waxlairloqbm
|
||||
Is Manager: true
|
||||
ClusterID: te8kdyw33n36fqiz74bfjeixd
|
||||
Managers: 1
|
||||
Nodes: 2
|
||||
Orchestration:
|
||||
Task History Retention Limit: 5
|
||||
Raft:
|
||||
Snapshot Interval: 10000
|
||||
Number of Old Snapshots to Retain: 0
|
||||
Heartbeat Tick: 1
|
||||
Election Tick: 3
|
||||
Dispatcher:
|
||||
Heartbeat Period: 5 seconds
|
||||
CA Configuration:
|
||||
Expiry Duration: 3 months
|
||||
Root Rotation In Progress: false
|
||||
Node Address: 172.16.66.128 172.16.66.129
|
||||
Manager Addresses:
|
||||
172.16.66.128:2477
|
||||
Runtimes: runc
|
||||
Default Runtime: runc
|
||||
Init Binary: docker-init
|
||||
containerd version: 8517738ba4b82aff5662c97ca4627e7e4d03b531
|
||||
runc version: ac031b5bf1cc92239461125f4c1ffb760522bbf2
|
||||
init version: N/A (expected: v0.13.0)
|
||||
Security Options:
|
||||
apparmor
|
||||
seccomp
|
||||
Profile: default
|
||||
Kernel Version: 4.4.0-31-generic
|
||||
Operating System: Ubuntu 16.04.1 LTS
|
||||
OSType: linux
|
||||
Architecture: x86_64
|
||||
CPUs: 2
|
||||
Total Memory: 1.937 GiB
|
||||
Name: ubuntu
|
||||
ID: H52R:7ZR6:EIIA:76JG:ORIY:BVKF:GSFU:HNPG:B5MK:APSC:SZ3Q:N326
|
||||
Docker Root Dir: /var/lib/docker
|
||||
Debug Mode (client): true
|
||||
Debug Mode (server): true
|
||||
File Descriptors: 30
|
||||
Goroutines: 123
|
||||
System Time: 2016-11-12T17:24:37.955404361-08:00
|
||||
EventsListeners: 0
|
||||
Http Proxy: http://test:test@proxy.example.com:8080
|
||||
Https Proxy: https://test:test@proxy.example.com:8080
|
||||
No Proxy: localhost,127.0.0.1,docker-registry.somecorporation.com
|
||||
Registry: https://index.docker.io/v1/
|
||||
WARNING: No swap limit support
|
||||
Labels:
|
||||
storage=ssd
|
||||
staging=true
|
||||
Experimental: false
|
||||
Insecure Registries:
|
||||
127.0.0.0/8
|
||||
Registry Mirrors:
|
||||
http://192.168.1.2/
|
||||
http://registry-mirror.example.com:5000/
|
||||
Live Restore Enabled: false
|
||||
```
|
||||
|
||||
The global `-D` option causes all `docker` commands to output debug information.
|
||||
|
||||
### Format the output
|
||||
|
||||
You can also specify the output format:
|
||||
|
||||
```bash
|
||||
$ docker info --format '{{json .}}'
|
||||
|
||||
{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...}
|
||||
```
|
||||
|
||||
### Run `docker info` on Windows
|
||||
|
||||
Here is a sample output for a daemon running on Windows Server 2016:
|
||||
|
||||
```none
|
||||
E:\docker>docker info
|
||||
|
||||
Containers: 1
|
||||
Running: 0
|
||||
Paused: 0
|
||||
Stopped: 1
|
||||
Images: 17
|
||||
Server Version: 1.13.0
|
||||
Storage Driver: windowsfilter
|
||||
Windows:
|
||||
Logging Driver: json-file
|
||||
Plugins:
|
||||
Volume: local
|
||||
Network: nat null overlay
|
||||
Swarm: inactive
|
||||
Default Isolation: process
|
||||
Kernel Version: 10.0 14393 (14393.206.amd64fre.rs1_release.160912-1937)
|
||||
Operating System: Windows Server 2016 Datacenter
|
||||
OSType: windows
|
||||
Architecture: x86_64
|
||||
CPUs: 8
|
||||
Total Memory: 3.999 GiB
|
||||
Name: WIN-V0V70C0LU5P
|
||||
ID: NYMS:B5VK:UMSL:FVDZ:EWB5:FKVK:LPFL:FJMQ:H6FT:BZJ6:L2TD:XH62
|
||||
Docker Root Dir: C:\control
|
||||
Debug Mode (client): false
|
||||
Debug Mode (server): false
|
||||
Registry: https://index.docker.io/v1/
|
||||
Insecure Registries:
|
||||
127.0.0.0/8
|
||||
Registry Mirrors:
|
||||
http://192.168.1.2/
|
||||
http://registry-mirror.example.com:5000/
|
||||
Live Restore Enabled: false
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
command: docker inspect
|
||||
short: Return low-level information on Docker objects
|
||||
long: |-
|
||||
Docker inspect provides detailed information on constructs controlled by Docker.
|
||||
|
||||
By default, `docker inspect` will render results in a JSON array.
|
||||
usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
|
||||
pname: docker
|
||||
plink: docker.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 if the type is container
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: type
|
||||
value_type: string
|
||||
description: Return JSON for specified type
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Get an instance's IP address
|
||||
|
||||
For the most part, you can pick out any field from the JSON in a fairly
|
||||
straightforward manner.
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### Get an instance's MAC address
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### Get an instance's log path
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{.LogPath}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### Get an instance's image name
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{.Config.Image}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### List all port bindings
|
||||
|
||||
You can loop over arrays and maps in the results to produce simple text
|
||||
output:
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### Find a specific port mapping
|
||||
|
||||
The `.Field` syntax doesn't work when the field name begins with a
|
||||
number, but the template language's `index` function does. The
|
||||
`.NetworkSettings.Ports` section contains a map of the internal port
|
||||
mappings to a list of external address/port objects. To grab just the
|
||||
numeric public port, you use `index` to find the specific port map, and
|
||||
then `index` 0 contains the first object inside of that. Then we ask for
|
||||
the `HostPort` field to get the public address.
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
|
||||
```
|
||||
|
||||
### Get a subsection in JSON format
|
||||
|
||||
If you request a field which is itself a structure containing other
|
||||
fields, by default you get a Go-style dump of the inner values.
|
||||
Docker adds a template function, `json`, which can be applied to get
|
||||
results in JSON format.
|
||||
|
||||
```bash
|
||||
$ docker inspect --format='{{json .Config}}' $INSTANCE_ID
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
command: docker kill
|
||||
short: Kill one or more running containers
|
||||
long: |-
|
||||
The `docker kill` subcommand kills one or more containers. The main process
|
||||
inside the container is sent `SIGKILL` signal (default), or the signal that is
|
||||
specified with the `--signal` option. You can kill a container using the
|
||||
container's ID, ID-prefix, or name.
|
||||
|
||||
> **Note**: `ENTRYPOINT` and `CMD` in the *shell* form run as a subcommand of
|
||||
> `/bin/sh -c`, which does not pass signals. This means that the executable is
|
||||
> not the container’s PID 1 and does not receive Unix signals.
|
||||
usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
|
||||
pname: docker
|
||||
plink: docker.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
|
||||
examples: |-
|
||||
### Send a KILL signal to a container
|
||||
|
||||
The following example sends the default `KILL` signal to the container named
|
||||
`my_container`:
|
||||
|
||||
```bash
|
||||
$ docker kill my_container
|
||||
```
|
||||
|
||||
### Send a custom signal to a container
|
||||
|
||||
The following example sends a `SIGHUP` signal to the container named
|
||||
`my_container`:
|
||||
|
||||
```bash
|
||||
$ docker kill --signal=SIGHUP my_container
|
||||
```
|
||||
|
||||
|
||||
You can specify a custom signal either by _name_, or _number_. The `SIG` prefix
|
||||
is optional, so the following examples are equivalent:
|
||||
|
||||
```bash
|
||||
$ docker kill --signal=SIGHUP my_container
|
||||
$ docker kill --signal=HUP my_container
|
||||
$ docker kill --signal=1 my_container
|
||||
```
|
||||
|
||||
Refer to the [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html)
|
||||
man-page for a list of standard Linux signals.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
command: docker load
|
||||
short: Load an image from a tar archive or STDIN
|
||||
long: |-
|
||||
Load an image or repository from a tar archive (even if compressed with gzip,
|
||||
bzip2, or xz) from a file or STDIN. It restores both images and tags.
|
||||
usage: docker load [OPTIONS]
|
||||
pname: docker
|
||||
plink: docker.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
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker image ls
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
|
||||
$ docker load < busybox.tar.gz
|
||||
|
||||
Loaded image: busybox:latest
|
||||
$ docker images
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
busybox latest 769b9341d937 7 weeks ago 2.489 MB
|
||||
|
||||
$ docker load --input fedora.tar
|
||||
|
||||
Loaded image: fedora:rawhide
|
||||
|
||||
Loaded image: fedora:20
|
||||
|
||||
$ docker images
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
busybox latest 769b9341d937 7 weeks ago 2.489 MB
|
||||
fedora rawhide 0d20aec6529d 7 weeks ago 387 MB
|
||||
fedora 20 58394af37342 7 weeks ago 385.5 MB
|
||||
fedora heisenbug 58394af37342 7 weeks ago 385.5 MB
|
||||
fedora latest 58394af37342 7 weeks ago 385.5 MB
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
command: docker login
|
||||
short: Log in to a Docker registry
|
||||
long: "Login to a registry.\n\n### Login to a self-hosted registry\n\nIf you want
|
||||
to login to a self-hosted registry you can specify this by\nadding the server name.\n\n```bash\n$
|
||||
docker login localhost:8080\n```\n\n### Provide a password using STDIN\n\nTo run
|
||||
the `docker login` command non-interactively, you can set the\n`--password-stdin`
|
||||
flag to provide a password through `STDIN`. Using\n`STDIN` prevents the password
|
||||
from ending up in the shell's history,\nor log-files.\n\nThe following example reads
|
||||
a password from a file, and passes it to the\n`docker login` command using `STDIN`:\n\n```bash\n$
|
||||
cat ~/my_password.txt | docker login --username foo --password-stdin\n```\n\n###
|
||||
Privileged user requirement\n\n`docker login` requires user to use `sudo` or be
|
||||
`root`, except when:\n\n1. connecting to a remote daemon, such as a `docker-machine`
|
||||
provisioned `docker engine`.\n2. user is added to the `docker` group. This will
|
||||
impact the security of your system; the `docker` group is `root` equivalent. See
|
||||
[Docker Daemon Attack Surface](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface)
|
||||
for details.\n\nYou can log into any public or private repository for which you
|
||||
have\ncredentials. When you log in, the command stores credentials in\n`$HOME/.docker/config.json`
|
||||
on Linux or `%USERPROFILE%/.docker/config.json` on\nWindows, via the procedure described
|
||||
below.\n\n### Credentials store\n\nThe Docker Engine can keep user credentials in
|
||||
an external credentials store,\nsuch as the native keychain of the operating system.
|
||||
Using an external store\nis more secure than storing credentials in the Docker configuration
|
||||
file.\n\nTo use a credentials store, you need an external helper program to interact\nwith
|
||||
a specific keychain or external store. Docker requires the helper\nprogram to be
|
||||
in the client's host `$PATH`.\n\nThis is the list of currently available credentials
|
||||
helpers and where\nyou can download them from:\n\n- D-Bus Secret Service: https://github.com/docker/docker-credential-helpers/releases\n-
|
||||
Apple macOS keychain: https://github.com/docker/docker-credential-helpers/releases\n-
|
||||
Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases\n-
|
||||
[pass](https://www.passwordstore.org/): https://github.com/docker/docker-credential-helpers/releases\n\nYou
|
||||
need to specify the credentials store in `$HOME/.docker/config.json`\nto tell the
|
||||
docker engine to use it. The value of the config property should be\nthe suffix
|
||||
of the program to use (i.e. everything after `docker-credential-`).\nFor example,
|
||||
to use `docker-credential-osxkeychain`:\n\n```json\n{\n\t\"credsStore\": \"osxkeychain\"\n}\n```\n\nIf
|
||||
you are currently logged in, run `docker logout` to remove\nthe credentials from
|
||||
the file and run `docker login` again.\n\n### Default behavior\n\nBy default, Docker
|
||||
looks for the native binary on each of the platforms, i.e.\n\"osxkeychain\" on macOS,
|
||||
\"wincred\" on windows, and \"pass\" on Linux. A special\ncase is that on Linux,
|
||||
Docker will fall back to the \"secretservice\" binary if\nit cannot find the \"pass\"
|
||||
binary. If none of these binaries are present, it\nstores the credentials (i.e.
|
||||
password) in base64 encoding in the config files\ndescribed above.\n\n### Credential
|
||||
helper protocol\n\nCredential helpers can be any program or script that follows
|
||||
a very simple protocol.\nThis protocol is heavily inspired by Git, but it differs
|
||||
in the information shared.\n\nThe helpers always use the first argument in the command
|
||||
to identify the action.\nThere are only three possible values for that argument:
|
||||
`store`, `get`, and `erase`.\n\nThe `store` command takes a JSON payload from the
|
||||
standard input. That payload carries\nthe server address, to identify the credential,
|
||||
the user name, and either a password\nor an identity token.\n\n```json\n{\n\t\"ServerURL\":
|
||||
\"https://index.docker.io/v1\",\n\t\"Username\": \"david\",\n\t\"Secret\": \"passw0rd1\"\n}\n```\n\nIf
|
||||
the secret being stored is an identity token, the Username should be set to\n`<token>`.\n\nThe
|
||||
`store` command can write error messages to `STDOUT` that the docker engine\nwill
|
||||
show if there was an issue.\n\nThe `get` command takes a string payload from the
|
||||
standard input. That payload carries\nthe server address that the docker engine
|
||||
needs credentials for. This is\nan example of that payload: `https://index.docker.io/v1`.\n\nThe
|
||||
`get` command writes a JSON payload to `STDOUT`. Docker reads the user name\nand
|
||||
password from this payload:\n\n```json\n{\n\t\"Username\": \"david\",\n\t\"Secret\":
|
||||
\"passw0rd1\"\n}\n```\n\nThe `erase` command takes a string payload from `STDIN`.
|
||||
That payload carries\nthe server address that the docker engine wants to remove
|
||||
credentials for. This is\nan example of that payload: `https://index.docker.io/v1`.\n\nThe
|
||||
`erase` command can write error messages to `STDOUT` that the docker engine\nwill
|
||||
show if there was an issue.\n\n### Credential helpers\n\nCredential helpers are
|
||||
similar to the credential store above, but act as the\ndesignated programs to handle
|
||||
credentials for *specific registries*. The default\ncredential store (`credsStore`
|
||||
or the config file itself) will not be used for\noperations concerning credentials
|
||||
of the specified registries.\n\n### Logging out\n\nIf you are currently logged in,
|
||||
run `docker logout` to remove\nthe credentials from the default store.\n\nCredential
|
||||
helpers are specified in a similar way to `credsStore`, but\nallow for multiple
|
||||
helpers to be configured at a time. Keys specify the\nregistry domain, and values
|
||||
specify the suffix of the program to use\n(i.e. everything after `docker-credential-`).\nFor
|
||||
example:\n\n```json\n{\n \"credHelpers\": {\n \"registry.example.com\": \"registryhelper\",\n
|
||||
\ \"awesomereg.example.org\": \"hip-star\",\n \"unicorn.example.io\": \"vcbait\"\n
|
||||
\ }\n}\n```"
|
||||
usage: docker login [OPTIONS] [SERVER]
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
options:
|
||||
- option: password
|
||||
shorthand: p
|
||||
value_type: string
|
||||
description: Password
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: password-stdin
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Take the password from stdin
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: username
|
||||
shorthand: u
|
||||
value_type: string
|
||||
description: Username
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
command: docker logout
|
||||
short: Log out from a Docker registry
|
||||
long: Log out from a Docker registry
|
||||
usage: docker logout [SERVER]
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker logout localhost:8080
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
command: docker logs
|
||||
short: Fetch the logs of a container
|
||||
long: |-
|
||||
The `docker logs` command batch-retrieves logs present at the time of execution.
|
||||
|
||||
> **Note**: this command is only functional for containers that are started with
|
||||
> the `json-file` or `journald` logging driver.
|
||||
|
||||
For more information about selecting and configuring logging drivers, refer to
|
||||
[Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/).
|
||||
|
||||
The `docker logs --follow` command will continue streaming the new output from
|
||||
the container's `STDOUT` and `STDERR`.
|
||||
|
||||
Passing a negative number or a non-integer to `--tail` is invalid and the
|
||||
value is set to `all` in that case.
|
||||
|
||||
The `docker logs --timestamps` command will add an [RFC3339Nano timestamp](https://golang.org/pkg/time/#pkg-constants)
|
||||
, for example `2014-09-16T06:17:46.000000000Z`, to each
|
||||
log entry. To ensure that the timestamps are aligned the
|
||||
nano-second part of the timestamp will be padded with zero when necessary.
|
||||
|
||||
The `docker logs --details` command will add on extra attributes, such as
|
||||
environment variables and labels, provided to `--log-opt` when creating the
|
||||
container.
|
||||
|
||||
The `--since` option shows only the container logs generated after
|
||||
a given date. You can specify the date as an RFC 3339 date, a UNIX
|
||||
timestamp, or a Go duration string (e.g. `1m30s`, `3h`). Besides RFC3339 date
|
||||
format you may also use RFC3339Nano, `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. You can combine the
|
||||
`--since` option with either or both of the `--follow` or `--tail` options.
|
||||
usage: docker logs [OPTIONS] CONTAINER
|
||||
pname: docker
|
||||
plink: docker.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:37) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: tail
|
||||
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:37) or relative (e.g. 42m for 42 minutes)
|
||||
deprecated: false
|
||||
min_api_version: "1.35"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Retrieve logs until a specific point in time
|
||||
|
||||
In order to retrieve logs before a specific point in time, run:
|
||||
|
||||
```bash
|
||||
$ docker run --name test -d busybox sh -c "while true; do $(echo date); sleep 1; done"
|
||||
$ date
|
||||
Tue 14 Nov 2017 16:40:00 CET
|
||||
$ docker logs -f --until=2s
|
||||
Tue 14 Nov 2017 16:40:00 CET
|
||||
Tue 14 Nov 2017 16:40:01 CET
|
||||
Tue 14 Nov 2017 16:40:02 CET
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
command: docker manifest
|
||||
short: Manage Docker image manifests and manifest lists
|
||||
long: "The `docker manifest` command by itself performs no action. In order to operate\non
|
||||
a manifest or manifest list, one of the subcommands must be used.\n\nA single manifest
|
||||
is information about an image, such as layers, size, and digest.\nThe docker manifest
|
||||
command also gives users additional information such as the os\nand architecture
|
||||
an image was built for.\n\nA manifest list is a list of image layers that is created
|
||||
by specifying one or\nmore (ideally more than one) image names. It can then be used
|
||||
in the same way as\nan image name in `docker pull` and `docker run` commands, for
|
||||
example.\n\nIdeally a manifest list is created from images that are identical in
|
||||
function for\ndifferent os/arch combinations. For this reason, manifest lists are
|
||||
often referred to as\n\"multi-arch images\". However, a user could create a manifest
|
||||
list that points\nto two images -- one for windows on amd64, and one for darwin
|
||||
on amd64.\n\n### manifest inspect\n\n```\nmanifest inspect --help\n\nUsage: docker
|
||||
manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST\n\nDisplay an image manifest,
|
||||
or manifest list\n\nOptions:\n --help Print usage\n --insecure Allow
|
||||
communication with an insecure registry\n -v, --verbose Output additional info
|
||||
including layers and platform\n```\n\n### manifest create \n\n```bash\nUsage: docker
|
||||
manifest create MANIFEST_LIST MANIFEST [MANIFEST...]\n\nCreate a local manifest
|
||||
list for annotating and pushing to a registry\n\nOptions:\n -a, --amend Amend
|
||||
an existing manifest list\n --insecure Allow communication with an insecure
|
||||
registry\n --help Print usage\n```\n\n### manifest annotate\n```bash\nUsage:
|
||||
\ docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST\n\nAdd additional information
|
||||
to a local image manifest\n\nOptions:\n --arch string Set architecture\n
|
||||
\ --help Print usage\n --os string Set
|
||||
operating system\n --os-features stringSlice Set operating system feature\n
|
||||
\ --variant string Set architecture variant\n\n```\n\n### manifest
|
||||
push\n```bash\nUsage: docker manifest push [OPTIONS] MANIFEST_LIST\n\nPush a manifest
|
||||
list to a repository\n\nOptions:\n --help Print usage\n --insecure
|
||||
\ Allow push to an insecure registry\n -p, --purge Remove the local manifest
|
||||
list after push\n```\n\n### Working with insecure registries\n\nThe manifest command
|
||||
interacts solely with a Docker registry. Because of this, it has no way to query
|
||||
the engine for the list of allowed insecure registries. To allow the CLI to interact
|
||||
with an insecure registry, some `docker manifest` commands have an `--insecure`
|
||||
flag. For each transaction, such as a `create`, which queries a registry, the `--insecure`
|
||||
flag must be specified. This flag tells the CLI that this registry call may ignore
|
||||
security concerns like missing or self-signed certificates. Likewise, on a `manifest
|
||||
push` to an insecure registry, the `--insecure` flag must be specified. If this
|
||||
is not used with an insecure registry, the manifest command fails to find a registry
|
||||
that meets the default requirements."
|
||||
usage: docker manifest COMMAND
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker manifest annotate
|
||||
- docker manifest create
|
||||
- docker manifest inspect
|
||||
- docker manifest push
|
||||
clink:
|
||||
- docker_manifest_annotate.yaml
|
||||
- docker_manifest_create.yaml
|
||||
- docker_manifest_inspect.yaml
|
||||
- docker_manifest_push.yaml
|
||||
examples: "### Inspect an image's manifest object\n \n```bash\n$ docker manifest inspect
|
||||
hello-world\n{\n \"schemaVersion\": 2,\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n
|
||||
\ \"config\": {\n \"mediaType\": \"application/vnd.docker.container.image.v1+json\",\n
|
||||
\ \"size\": 1520,\n \"digest\": \"sha256:1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57\"\n
|
||||
\ },\n \"layers\": [\n {\n \"mediaType\":
|
||||
\"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n \"size\":
|
||||
972,\n \"digest\": \"sha256:b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28\"\n
|
||||
\ }\n ]\n}\n```\n\n### Inspect an image's manifest and get
|
||||
the os/arch info\n\nThe `docker manifest inspect` command takes an optional `--verbose`
|
||||
flag\nthat gives you the image's name (Ref), and architecture and os (Platform).\n\nJust
|
||||
as with other docker commands that take image names, you can refer to an image with
|
||||
or\nwithout a tag, or by digest (e.g. hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f).\n\nHere
|
||||
is an example of inspecting an image's manifest with the `--verbose` flag:\n\n```bash\n$
|
||||
docker manifest inspect --verbose hello-world\n{\n \"Ref\": \"docker.io/library/hello-world:latest\",\n
|
||||
\ \"Digest\": \"sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f\",\n
|
||||
\ \"SchemaV2Manifest\": {\n \"schemaVersion\": 2,\n \"mediaType\":
|
||||
\"application/vnd.docker.distribution.manifest.v2+json\",\n \"config\":
|
||||
{\n \"mediaType\": \"application/vnd.docker.container.image.v1+json\",\n
|
||||
\ \"size\": 1520,\n \"digest\": \"sha256:1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57\"\n
|
||||
\ },\n \"layers\": [\n {\n \"mediaType\":
|
||||
\"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n \"size\":
|
||||
972,\n \"digest\": \"sha256:b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28\"\n
|
||||
\ }\n ]\n },\n \"Platform\":
|
||||
{\n \"architecture\": \"amd64\",\n \"os\": \"linux\"\n
|
||||
\ }\n}\n```\n\n### Create and push a manifest list\n\nTo create a manifest
|
||||
list, you first `create` the manifest list locally by specifying the constituent
|
||||
images you would\nlike to have included in your manifest list. Keep in mind that
|
||||
this is pushed to a registry, so if you want to push\nto a registry other than the
|
||||
docker registry, you need to create your manifest list with the registry name or
|
||||
IP and port.\nThis is similar to tagging an image and pushing it to a foreign registry.\n\nAfter
|
||||
you have created your local copy of the manifest list, you may optionally\n`annotate`
|
||||
it. Annotations allowed are the architecture and operating system (overriding the
|
||||
image's current values),\nos features, and an archictecure variant. \n\nFinally,
|
||||
you need to `push` your manifest list to the desired registry. Below are descriptions
|
||||
of these three commands,\nand an example putting them all together.\n\n```bash\n$
|
||||
docker manifest create 45.55.81.106:5000/coolapp:v1 \\\n 45.55.81.106:5000/coolapp-ppc64le-linux:v1
|
||||
\\\n 45.55.81.106:5000/coolapp-arm-linux:v1 \\\n 45.55.81.106:5000/coolapp-amd64-linux:v1
|
||||
\\\n 45.55.81.106:5000/coolapp-amd64-windows:v1\nCreated manifest list 45.55.81.106:5000/coolapp:v1\n```\n\n```bash\n$
|
||||
docker manifest annotate 45.55.81.106:5000/coolapp:v1 45.55.81.106:5000/coolapp-arm-linux
|
||||
--arch arm\n```\n\n```bash\n$ docker manifest push 45.55.81.106:5000/coolapp:v1\nPushed
|
||||
manifest 45.55.81.106:5000/coolapp@sha256:9701edc932223a66e49dd6c894a11db8c2cf4eccd1414f1ec105a623bf16b426
|
||||
with digest: sha256:f67dcc5fc786f04f0743abfe0ee5dae9bd8caf8efa6c8144f7f2a43889dc513b\nPushed
|
||||
manifest 45.55.81.106:5000/coolapp@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
|
||||
with digest: sha256:b64ca0b60356a30971f098c92200b1271257f100a55b351e6bbe985638352f3a\nPushed
|
||||
manifest 45.55.81.106:5000/coolapp@sha256:39dc41c658cf25f33681a41310372f02728925a54aac3598310bfb1770615fc9
|
||||
with digest: sha256:df436846483aff62bad830b730a0d3b77731bcf98ba5e470a8bbb8e9e346e4e8\nPushed
|
||||
manifest 45.55.81.106:5000/coolapp@sha256:f91b1145cd4ac800b28122313ae9e88ac340bb3f1e3a4cd3e59a3648650f3275
|
||||
with digest: sha256:5bb8e50aa2edd408bdf3ddf61efb7338ff34a07b762992c9432f1c02fc0e5e62\nsha256:050b213d49d7673ba35014f21454c573dcbec75254a08f4a7c34f66a47c06aba\n\n```\n\n###
|
||||
Inspect a manifest list\n\n```bash\n$ docker manifest inspect coolapp:v1\n{\n \"schemaVersion\":
|
||||
2,\n \"mediaType\": \"application/vnd.docker.distribution.manifest.list.v2+json\",\n
|
||||
\ \"manifests\": [\n {\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n
|
||||
\ \"size\": 424,\n \"digest\": \"sha256:f67dcc5fc786f04f0743abfe0ee5dae9bd8caf8efa6c8144f7f2a43889dc513b\",\n
|
||||
\ \"platform\": {\n \"architecture\": \"arm\",\n \"os\":
|
||||
\"linux\"\n }\n },\n {\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n
|
||||
\ \"size\": 424,\n \"digest\": \"sha256:b64ca0b60356a30971f098c92200b1271257f100a55b351e6bbe985638352f3a\",\n
|
||||
\ \"platform\": {\n \"architecture\": \"amd64\",\n \"os\":
|
||||
\"linux\"\n }\n },\n {\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n
|
||||
\ \"size\": 425,\n \"digest\": \"sha256:df436846483aff62bad830b730a0d3b77731bcf98ba5e470a8bbb8e9e346e4e8\",\n
|
||||
\ \"platform\": {\n \"architecture\": \"ppc64le\",\n \"os\":
|
||||
\"linux\"\n }\n },\n {\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n
|
||||
\ \"size\": 425,\n \"digest\": \"sha256:5bb8e50aa2edd408bdf3ddf61efb7338ff34a07b762992c9432f1c02fc0e5e62\",\n
|
||||
\ \"platform\": {\n \"architecture\": \"s390x\",\n \"os\":
|
||||
\"linux\"\n }\n }\n ]\n}\n```\n\n### Push to an insecure registry\n\nHere
|
||||
is an example of creating and pushing a manifest list using a known insecure registry.\n\n```\n$
|
||||
docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1.0
|
||||
\\\n myprivateregistry.mycompany.com/repo/image-linux-ppc64le:1.0 \\\n myprivateregistry.mycompany.com/repo/image-linux-s390x:1.0
|
||||
\\\n myprivateregistry.mycompany.com/repo/image-linux-arm:1.0 \\\n myprivateregistry.mycompany.com/repo/image-linux-armhf:1.0
|
||||
\\\n myprivateregistry.mycompany.com/repo/image-windows-amd64:1.0 \\\n myprivateregistry.mycompany.com/repo/image-linux-amd64:1.0\n```\n```\n$
|
||||
docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag\n```\n\nNote
|
||||
that the `--insecure` flag is not required to annotate a manifest list, since annotations
|
||||
are to a locally-stored copy of a manifest list. You may also skip the `--insecure`
|
||||
flag if you are performaing a `docker manifest inspect` on a locally-stored manifest
|
||||
list. Be sure to keep in mind that locally-stored manifest lists are never used
|
||||
by the engine on a `docker pull`."
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: true
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
command: docker manifest annotate
|
||||
short: Add additional information to a local image manifest
|
||||
long: Add additional information to a local image manifest
|
||||
usage: docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST
|
||||
pname: docker manifest
|
||||
plink: docker_manifest.yaml
|
||||
options:
|
||||
- option: arch
|
||||
value_type: string
|
||||
description: Set architecture
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: os
|
||||
value_type: string
|
||||
description: Set operating system
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: os-features
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Set operating system feature
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: variant
|
||||
value_type: string
|
||||
description: Set architecture variant
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: true
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker manifest create
|
||||
short: Create a local manifest list for annotating and pushing to a registry
|
||||
long: Create a local manifest list for annotating and pushing to a registry
|
||||
usage: docker manifest create MANIFEST_LIST MANIFEST [MANIFEST...]
|
||||
pname: docker manifest
|
||||
plink: docker_manifest.yaml
|
||||
options:
|
||||
- option: amend
|
||||
shorthand: a
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Amend an existing manifest list
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: insecure
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Allow communication with an insecure registry
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: true
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker manifest inspect
|
||||
short: Display an image manifest, or manifest list
|
||||
long: Display an image manifest, or manifest list
|
||||
usage: docker manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST
|
||||
pname: docker manifest
|
||||
plink: docker_manifest.yaml
|
||||
options:
|
||||
- option: insecure
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Allow communication with an insecure registry
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: verbose
|
||||
shorthand: v
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Output additional info including layers and platform
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: true
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
command: docker manifest push
|
||||
short: Push a manifest list to a repository
|
||||
long: Push a manifest list to a repository
|
||||
usage: docker manifest push [OPTIONS] MANIFEST_LIST
|
||||
pname: docker manifest
|
||||
plink: docker_manifest.yaml
|
||||
options:
|
||||
- option: insecure
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Allow push to an insecure registry
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: purge
|
||||
shorthand: p
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Remove the local manifest list after push
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: true
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
command: docker network
|
||||
short: Manage networks
|
||||
long: |-
|
||||
Manage networks. You can use subcommands to create, inspect, list, remove,
|
||||
prune, connect, and disconnect networks.
|
||||
usage: docker network
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker network connect
|
||||
- docker network create
|
||||
- docker network disconnect
|
||||
- docker network inspect
|
||||
- docker network ls
|
||||
- docker network prune
|
||||
- docker network rm
|
||||
clink:
|
||||
- docker_network_connect.yaml
|
||||
- docker_network_create.yaml
|
||||
- docker_network_disconnect.yaml
|
||||
- docker_network_inspect.yaml
|
||||
- docker_network_ls.yaml
|
||||
- docker_network_prune.yaml
|
||||
- docker_network_rm.yaml
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
command: docker network connect
|
||||
short: Connect a container to a network
|
||||
long: |-
|
||||
Connects a container to a network. You can connect a container by name
|
||||
or by ID. Once connected, the container can communicate with other containers in
|
||||
the same network.
|
||||
usage: docker network connect [OPTIONS] NETWORK CONTAINER
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
options:
|
||||
- option: alias
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Add network-scoped alias for the container
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- 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: 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: stringSlice
|
||||
default_value: '[]'
|
||||
description: Add a link-local address for the container
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Connect a running container to a network
|
||||
|
||||
```bash
|
||||
$ docker network connect multi-host-network container1
|
||||
```
|
||||
|
||||
### Connect a container to a network when it starts
|
||||
|
||||
You can also use the `docker run --network=<network-name>` option to start a container and immediately connect it to a network.
|
||||
|
||||
```bash
|
||||
$ docker run -itd --network=multi-host-network busybox
|
||||
```
|
||||
|
||||
### Specify the IP address a container will use on a given network
|
||||
|
||||
You can specify the IP address you want to be assigned to the container's interface.
|
||||
|
||||
```bash
|
||||
$ docker network connect --ip 10.10.36.122 multi-host-network container2
|
||||
```
|
||||
|
||||
### Use the legacy `--link` option
|
||||
|
||||
You can use `--link` option to link another container with a preferred alias
|
||||
|
||||
```bash
|
||||
$ docker network connect --link container1:c1 multi-host-network container2
|
||||
```
|
||||
|
||||
### Create a network alias for a container
|
||||
|
||||
`--alias` option can be used to resolve the container by another name in the network
|
||||
being connected to.
|
||||
|
||||
```bash
|
||||
$ docker network connect --alias db --alias mysql multi-host-network container2
|
||||
```
|
||||
|
||||
### Network implications of stopping, pausing, or restarting containers
|
||||
|
||||
You can pause, restart, and stop containers that are connected to a network.
|
||||
A container connects to its configured networks when it runs.
|
||||
|
||||
If specified, the container's IP address(es) is reapplied when a stopped
|
||||
container is restarted. If the IP address is no longer available, the container
|
||||
fails to start. One way to guarantee that the IP address is available is
|
||||
to specify an `--ip-range` when creating the network, and choose the static IP
|
||||
address(es) from outside that range. This ensures that the IP address is not
|
||||
given to another container while this container is not on the network.
|
||||
|
||||
```bash
|
||||
$ docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 multi-host-network
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker network connect --ip 172.20.128.2 multi-host-network container2
|
||||
```
|
||||
|
||||
To verify the container is connected, use the `docker network inspect` command. Use `docker network disconnect` to remove a container from the network.
|
||||
|
||||
Once connected in network, containers can communicate using only another
|
||||
container's IP address or name. For `overlay` networks or custom plugins that
|
||||
support multi-host connectivity, containers connected to the same multi-host
|
||||
network but launched from different Engines can also communicate in this way.
|
||||
|
||||
You can connect a container to one or more networks. The networks need not be the same type. For example, you can connect a single container bridge and overlay networks.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,343 +0,0 @@
|
|||
command: docker network create
|
||||
short: Create a network
|
||||
long: |-
|
||||
Creates a new network. The `DRIVER` accepts `bridge` or `overlay` which are the
|
||||
built-in network drivers. If you have installed a third party or your own custom
|
||||
network driver you can specify that `DRIVER` here also. If you don't specify the
|
||||
`--driver` option, the command automatically creates a `bridge` network for you.
|
||||
When you install Docker Engine it creates a `bridge` network automatically. This
|
||||
network corresponds to the `docker0` bridge that Engine has traditionally relied
|
||||
on. When you launch a new container with `docker run` it automatically connects to
|
||||
this bridge network. You cannot remove this default bridge network, but you can
|
||||
create new ones using the `network create` command.
|
||||
|
||||
```bash
|
||||
$ docker network create -d bridge my-bridge-network
|
||||
```
|
||||
|
||||
Bridge networks are isolated networks on a single Engine installation. If you
|
||||
want to create a network that spans multiple Docker hosts each running an
|
||||
Engine, you must create an `overlay` network. Unlike `bridge` networks, overlay
|
||||
networks require some pre-existing conditions before you can create one. These
|
||||
conditions are:
|
||||
|
||||
* Access to a key-value store. Engine supports Consul, Etcd, and ZooKeeper (Distributed store) key-value stores.
|
||||
* A cluster of hosts with connectivity to the key-value store.
|
||||
* A properly configured Engine `daemon` on each host in the cluster.
|
||||
|
||||
The `dockerd` options that support the `overlay` network are:
|
||||
|
||||
* `--cluster-store`
|
||||
* `--cluster-store-opt`
|
||||
* `--cluster-advertise`
|
||||
|
||||
To read more about these options and how to configure them, see ["*Get started
|
||||
with multi-host network*"](https://docs.docker.com/engine/userguide/networking/get-started-overlay).
|
||||
|
||||
While not required, it is a good idea to install Docker Swarm to
|
||||
manage the cluster that makes up your network. Swarm provides sophisticated
|
||||
discovery and server management tools that can assist your implementation.
|
||||
|
||||
Once you have prepared the `overlay` network prerequisites you simply choose a
|
||||
Docker host in the cluster and issue the following to create the network:
|
||||
|
||||
```bash
|
||||
$ docker network create -d overlay my-multihost-network
|
||||
```
|
||||
|
||||
Network names must be unique. The Docker daemon attempts to identify naming
|
||||
conflicts but this is not guaranteed. It is the user's responsibility to avoid
|
||||
name conflicts.
|
||||
|
||||
### Overlay network limitations
|
||||
|
||||
You should create overlay networks with `/24` blocks (the default), which limits
|
||||
you to 256 IP addresses, when you create networks using the default VIP-based
|
||||
endpoint-mode. This recommendation addresses
|
||||
[limitations with swarm mode](https://github.com/moby/moby/issues/30820). If you
|
||||
need more than 256 IP addresses, do not increase the IP block size. You can
|
||||
either use `dnsrr` endpoint mode with an external load balancer, or use multiple
|
||||
smaller overlay networks. See
|
||||
[Configure service discovery](https://docs.docker.com/engine/swarm/networking/#configure-service-discovery)
|
||||
for more information about different endpoint modes.
|
||||
usage: docker network create [OPTIONS] NETWORK
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
options:
|
||||
- option: attachable
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Enable manual container attachment
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: aux-address
|
||||
value_type: map
|
||||
default_value: map[]
|
||||
description: Auxiliary IPv4 or IPv6 addresses used by Network driver
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: config-from
|
||||
value_type: string
|
||||
description: The network from which copying the configuration
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: config-only
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Create a configuration only network
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: driver
|
||||
shorthand: d
|
||||
value_type: string
|
||||
default_value: bridge
|
||||
description: Driver to manage the Network
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: gateway
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: IPv4 or IPv6 Gateway for the master subnet
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ingress
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Create swarm routing-mesh network
|
||||
deprecated: false
|
||||
min_api_version: "1.29"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: internal
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Restrict external access to the network
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ip-range
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Allocate container ip from a sub-range
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ipam-driver
|
||||
value_type: string
|
||||
default_value: default
|
||||
description: IP Address Management Driver
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ipam-opt
|
||||
value_type: map
|
||||
default_value: map[]
|
||||
description: Set IPAM driver specific options
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: ipv6
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Enable IPv6 networking
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label
|
||||
value_type: list
|
||||
description: Set metadata on a network
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: opt
|
||||
shorthand: o
|
||||
value_type: map
|
||||
default_value: map[]
|
||||
description: Set driver specific options
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: scope
|
||||
value_type: string
|
||||
description: Control the network's scope
|
||||
deprecated: false
|
||||
min_api_version: "1.30"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: subnet
|
||||
value_type: stringSlice
|
||||
default_value: '[]'
|
||||
description: Subnet in CIDR format that represents a network segment
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Connect containers
|
||||
|
||||
When you start a container, use the `--network` flag to connect it to a network.
|
||||
This example adds the `busybox` container to the `mynet` network:
|
||||
|
||||
```bash
|
||||
$ docker run -itd --network=mynet busybox
|
||||
```
|
||||
|
||||
If you want to add a container to a network after the container is already
|
||||
running, use the `docker network connect` subcommand.
|
||||
|
||||
You can connect multiple containers to the same network. Once connected, the
|
||||
containers can communicate using only another container's IP address or name.
|
||||
For `overlay` networks or custom plugins that support multi-host connectivity,
|
||||
containers connected to the same multi-host network but launched from different
|
||||
Engines can also communicate in this way.
|
||||
|
||||
You can disconnect a container from a network using the `docker network
|
||||
disconnect` command.
|
||||
|
||||
### Specify advanced options
|
||||
|
||||
When you create a network, Engine creates a non-overlapping subnetwork for the
|
||||
network by default. This subnetwork is not a subdivision of an existing
|
||||
network. It is purely for ip-addressing purposes. You can override this default
|
||||
and specify subnetwork values directly using the `--subnet` option. On a
|
||||
`bridge` network you can only create a single subnet:
|
||||
|
||||
```bash
|
||||
$ docker network create --driver=bridge --subnet=192.168.0.0/16 br0
|
||||
```
|
||||
|
||||
Additionally, you also specify the `--gateway` `--ip-range` and `--aux-address`
|
||||
options.
|
||||
|
||||
```bash
|
||||
$ docker network create \
|
||||
--driver=bridge \
|
||||
--subnet=172.28.0.0/16 \
|
||||
--ip-range=172.28.5.0/24 \
|
||||
--gateway=172.28.5.254 \
|
||||
br0
|
||||
```
|
||||
|
||||
If you omit the `--gateway` flag the Engine selects one for you from inside a
|
||||
preferred pool. For `overlay` networks and for network driver plugins that
|
||||
support it you can create multiple subnetworks. This example uses two `/25`
|
||||
subnet mask to adhere to the current guidance of not having more than 256 IPs in
|
||||
a single overlay network. Each of the subnetworks has 126 usable addresses.
|
||||
|
||||
```bash
|
||||
$ docker network create -d overlay \
|
||||
--subnet=192.168.1.0/25 \
|
||||
--subnet=192.170.2.0/25 \
|
||||
--gateway=192.168.1.100 \
|
||||
--gateway=192.170.2.100 \
|
||||
--aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \
|
||||
--aux-address="my-printer=192.170.1.5" --aux-address="my-nas=192.170.1.6" \
|
||||
my-multihost-network
|
||||
```
|
||||
|
||||
Be sure that your subnetworks do not overlap. If they do, the network create
|
||||
fails and Engine returns an error.
|
||||
|
||||
### Bridge driver options
|
||||
|
||||
When creating a custom network, the default network driver (i.e. `bridge`) has
|
||||
additional options that can be passed. The following are those options and the
|
||||
equivalent docker daemon flags used for docker0 bridge:
|
||||
|
||||
| Option | Equivalent | Description |
|
||||
|--------------------------------------------------|-------------|-------------------------------------------------------|
|
||||
| `com.docker.network.bridge.name` | - | bridge name to be used when creating the Linux bridge |
|
||||
| `com.docker.network.bridge.enable_ip_masquerade` | `--ip-masq` | Enable IP masquerading |
|
||||
| `com.docker.network.bridge.enable_icc` | `--icc` | Enable or Disable Inter Container Connectivity |
|
||||
| `com.docker.network.bridge.host_binding_ipv4` | `--ip` | Default IP when binding container ports |
|
||||
| `com.docker.network.driver.mtu` | `--mtu` | Set the containers network MTU |
|
||||
|
||||
The following arguments can be passed to `docker network create` for any
|
||||
network driver, again with their approximate equivalents to `docker daemon`.
|
||||
|
||||
| Argument | Equivalent | Description |
|
||||
|--------------|----------------|--------------------------------------------|
|
||||
| `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet |
|
||||
| `--ip-range` | `--fixed-cidr` | Allocate IPs from a range |
|
||||
| `--internal` | - | Restrict external access to the network |
|
||||
| `--ipv6` | `--ipv6` | Enable IPv6 networking |
|
||||
| `--subnet` | `--bip` | Subnet for network |
|
||||
|
||||
For example, let's use `-o` or `--opt` options to specify an IP address binding
|
||||
when publishing ports:
|
||||
|
||||
```bash
|
||||
$ docker network create \
|
||||
-o "com.docker.network.bridge.host_binding_ipv4"="172.19.0.1" \
|
||||
simple-network
|
||||
```
|
||||
|
||||
### Network internal mode
|
||||
|
||||
By default, when you connect a container to an `overlay` network, Docker also
|
||||
connects a bridge network to it to provide external connectivity. If you want
|
||||
to create an externally isolated `overlay` network, you can specify the
|
||||
`--internal` option.
|
||||
|
||||
### Network ingress mode
|
||||
|
||||
You can create the network which will be used to provide the routing-mesh in the
|
||||
swarm cluster. You do so by specifying `--ingress` when creating the network. Only
|
||||
one ingress network can be created at the time. The network can be removed only
|
||||
if no services depend on it. Any option available when creating an overlay network
|
||||
is also available when creating the ingress network, besides the `--attachable` option.
|
||||
|
||||
```bash
|
||||
$ docker network create -d overlay \
|
||||
--subnet=10.11.0.0/16 \
|
||||
--ingress \
|
||||
--opt com.docker.network.driver.mtu=9216 \
|
||||
--opt encrypted=true \
|
||||
my-ingress-network
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
command: docker network disconnect
|
||||
short: Disconnect a container from a network
|
||||
long: |-
|
||||
Disconnects a container from a network. The container must be running to
|
||||
disconnect it from the network.
|
||||
usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
options:
|
||||
- option: force
|
||||
shorthand: f
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Force the container to disconnect from a network
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker network disconnect multi-host-network container1
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
command: docker network inspect
|
||||
short: Display detailed information on one or more networks
|
||||
long: |-
|
||||
Returns information about one or more networks. By default, this command renders
|
||||
all results in a JSON object.
|
||||
usage: docker network inspect [OPTIONS] NETWORK [NETWORK...]
|
||||
pname: docker network
|
||||
plink: docker_network.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: verbose
|
||||
shorthand: v
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Verbose output for diagnostics
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
command: docker network ls
|
||||
aliases: list
|
||||
short: List networks
|
||||
long: |-
|
||||
Lists all the networks the Engine `daemon` knows about. This includes the
|
||||
networks that span across multiple hosts in a cluster.
|
||||
usage: docker network ls [OPTIONS]
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
options:
|
||||
- option: filter
|
||||
shorthand: f
|
||||
value_type: filter
|
||||
description: Provide filter values (e.g. 'driver=bridge')
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: format
|
||||
value_type: string
|
||||
description: Pretty-print networks using a Go template
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-trunc
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Do not truncate the output
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: quiet
|
||||
shorthand: q
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Only display network IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: "### List all networks\n\n```bash\n$ sudo docker network ls\nNETWORK ID
|
||||
\ NAME DRIVER SCOPE\n7fca4eb8c647 bridge
|
||||
\ bridge local\n9f904ee27bf5 none null
|
||||
\ local\ncf03ee007fb4 host host local\n78b03ee04fc4
|
||||
\ multi-host overlay swarm\n```\n\nUse the `--no-trunc` option
|
||||
to display the full network id:\n\n```bash\n$ docker network ls --no-trunc\nNETWORK
|
||||
ID NAME DRIVER
|
||||
\ SCOPE\n18a2866682b85619a026c81b98a5e375bd33e1b0936a26cc497c283d27bae9b3
|
||||
\ none null local\nc288470c46f6c8949c5f7e5099b5b7947b07eabe8d9a27d79a9cbf111adcbf47
|
||||
\ host host local\n7b369448dccbf865d397c8d2be0cda7cf7edc6b0945f77d2529912ae917a0185
|
||||
\ bridge bridge local\n95e74588f40db048e86320c6526440c504650a1ff3e9f7d60a497c4d2163e5bd
|
||||
\ foo bridge local\n63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161
|
||||
\ dev bridge local\n```\n\n### Filtering\n\nThe filtering
|
||||
flag (`-f` or `--filter`) format is a `key=value` pair. If there\nis more than one
|
||||
filter, then pass multiple flags (e.g. `--filter \"foo=bar\" --filter \"bif=baz\"`).\nMultiple
|
||||
filter flags are combined as an `OR` filter. For example,\n`-f type=custom -f type=builtin`
|
||||
returns both `custom` and `builtin` networks.\n\nThe currently supported filters
|
||||
are:\n\n* driver\n* id (network's id)\n* label (`label=<key>` or `label=<key>=<value>`)\n*
|
||||
name (network's name)\n* scope (`swarm|global|local`)\n* type (`custom|builtin`)\n\n####
|
||||
Driver\n\nThe `driver` filter matches networks based on their driver.\n\nThe following
|
||||
example matches networks with the `bridge` driver:\n\n```bash\n$ docker network
|
||||
ls --filter driver=bridge\nNETWORK ID NAME DRIVER SCOPE\ndb9db329f835
|
||||
\ test1 bridge local\nf6e212da9dfd test2 bridge
|
||||
\ local\n```\n\n#### ID\n\nThe `id` filter matches on all or part of a
|
||||
network's ID.\n\nThe following filter matches all networks with an ID containing
|
||||
the\n`63d1ff1f77b0...` string.\n\n```bash\n$ docker network ls --filter id=63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161\nNETWORK
|
||||
ID NAME DRIVER SCOPE\n63d1ff1f77b0 dev
|
||||
\ bridge local\n```\n\nYou can also filter for a substring
|
||||
in an ID as this shows:\n\n```bash\n$ docker network ls --filter id=95e74588f40d\nNETWORK
|
||||
ID NAME DRIVER SCOPE\n95e74588f40d foo bridge
|
||||
\ local\n\n$ docker network ls --filter id=95e\nNETWORK ID NAME
|
||||
\ DRIVER SCOPE\n95e74588f40d foo bridge
|
||||
\ local\n```\n\n#### Label\n\nThe `label` filter matches networks based
|
||||
on the presence of a `label` alone or a `label` and a\nvalue.\n\nThe following filter
|
||||
matches networks with the `usage` label regardless of its value.\n\n```bash\n$ docker
|
||||
network ls -f \"label=usage\"\nNETWORK ID NAME DRIVER SCOPE\ndb9db329f835
|
||||
\ test1 bridge local\nf6e212da9dfd test2 bridge
|
||||
\ local\n```\n\nThe following filter matches networks with the `usage` label
|
||||
with the `prod` value.\n\n```bash\n$ docker network ls -f \"label=usage=prod\"\nNETWORK
|
||||
ID NAME DRIVER SCOPE\nf6e212da9dfd test2 bridge
|
||||
\ local\n```\n\n#### Name\n\nThe `name` filter matches on all or part of a
|
||||
network's name.\n\nThe following filter matches all networks with a name containing
|
||||
the `foobar` string.\n\n```bash\n$ docker network ls --filter name=foobar\nNETWORK
|
||||
ID NAME DRIVER SCOPE\n06e7eef0a170 foobar bridge
|
||||
\ local\n```\n\nYou can also filter for a substring in a name as this shows:\n\n```bash\n$
|
||||
docker network ls --filter name=foo\nNETWORK ID NAME DRIVER
|
||||
\ SCOPE\n95e74588f40d foo bridge local\n06e7eef0a170
|
||||
\ foobar bridge local\n```\n\n#### Scope\n\nThe `scope`
|
||||
filter matches networks based on their scope.\n\nThe following example matches networks
|
||||
with the `swarm` scope:\n\n```bash\n$ docker network ls --filter scope=swarm\nNETWORK
|
||||
ID NAME DRIVER SCOPE\nxbtm0v4f1lfh ingress
|
||||
\ overlay swarm\nic6r88twuu92 swarmnet overlay
|
||||
\ swarm\n```\n\nThe following example matches networks with the `local`
|
||||
scope:\n\n```bash\n$ docker network ls --filter scope=local\nNETWORK ID NAME
|
||||
\ DRIVER SCOPE\ne85227439ac7 bridge bridge
|
||||
\ local\n0ca0e19443ed host host local\nca13cc149a36
|
||||
\ localnet bridge local\nf9e115d2de35 none
|
||||
\ null local\n```\n\n#### Type\n\nThe `type` filter
|
||||
supports two values; `builtin` displays predefined networks\n(`bridge`, `none`,
|
||||
`host`), whereas `custom` displays user defined networks.\n\nThe following filter
|
||||
matches all user defined networks:\n\n```bash\n$ docker network ls --filter type=custom\nNETWORK
|
||||
ID NAME DRIVER SCOPE\n95e74588f40d foo bridge
|
||||
\ local \n63d1ff1f77b0 dev bridge local\n```\n\nBy
|
||||
having this flag it allows for batch cleanup. For example, use this filter\nto delete
|
||||
all user defined networks:\n\n```bash\n$ docker network rm `docker network ls --filter
|
||||
type=custom -q`\n```\n\nA warning will be issued when trying to remove a network
|
||||
that has containers\nattached.\n\n### Formatting\n\nThe formatting options (`--format`)
|
||||
pretty-prints networks output\nusing a Go template.\n\nValid placeholders for the
|
||||
Go template are listed below:\n\nPlaceholder | Description\n-------------|------------------------------------------------------------------------------------------\n`.ID`
|
||||
\ | Network ID\n`.Name` | Network name\n`.Driver` | Network driver\n`.Scope`
|
||||
\ | Network scope (local, global)\n`.IPv6` | Whether IPv6 is enabled on
|
||||
the network or not.\n`.Internal` | Whether the network is internal or not.\n`.Labels`
|
||||
\ | All labels assigned to the network.\n`.Label` | Value of a specific label
|
||||
for this network. For example `{{.Label \"project.version\"}}`\n`.CreatedAt` | Time
|
||||
when the network was created\n\nWhen using the `--format` option, the `network ls`
|
||||
command will either\noutput the data exactly as the template declares or, when using
|
||||
the\n`table` directive, includes column headers as well.\n\nThe following example
|
||||
uses a template without headers and outputs the\n`ID` and `Driver` entries separated
|
||||
by a colon for all networks:\n\n```bash\n$ docker network ls --format \"{{.ID}}:
|
||||
{{.Driver}}\"\nafaaab448eb2: bridge\nd1584f8dc718: host\n391df270dc66: null\n```"
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
command: docker network prune
|
||||
short: Remove all unused networks
|
||||
long: |-
|
||||
Remove all unused networks. Unused networks are those which are not referenced
|
||||
by any containers.
|
||||
usage: docker network prune [OPTIONS]
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
options:
|
||||
- option: filter
|
||||
value_type: filter
|
||||
description: Provide filter values (e.g. 'until=<timestamp>')
|
||||
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
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker network prune
|
||||
|
||||
WARNING! This will remove all networks not used by at least one container.
|
||||
Are you sure you want to continue? [y/N] y
|
||||
Deleted Networks:
|
||||
n1
|
||||
n2
|
||||
```
|
||||
|
||||
### Filtering
|
||||
|
||||
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:
|
||||
|
||||
* until (`<timestamp>`) - only remove networks created before given timestamp
|
||||
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove networks 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 `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
|
||||
which removes networks with the specified labels. The other
|
||||
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
|
||||
networks without the specified labels.
|
||||
|
||||
The following removes networks created more than 5 minutes ago. Note that
|
||||
system networks such as `bridge`, `host`, and `none` will never be pruned:
|
||||
|
||||
```none
|
||||
$ docker network ls
|
||||
|
||||
NETWORK ID NAME DRIVER SCOPE
|
||||
7430df902d7a bridge bridge local
|
||||
ea92373fd499 foo-1-day-ago bridge local
|
||||
ab53663ed3c7 foo-1-min-ago bridge local
|
||||
97b91972bc3b host host local
|
||||
f949d337b1f5 none null local
|
||||
|
||||
$ docker network prune --force --filter until=5m
|
||||
|
||||
Deleted Networks:
|
||||
foo-1-day-ago
|
||||
|
||||
$ docker network ls
|
||||
|
||||
NETWORK ID NAME DRIVER SCOPE
|
||||
7430df902d7a bridge bridge local
|
||||
ab53663ed3c7 foo-1-min-ago bridge local
|
||||
97b91972bc3b host host local
|
||||
f949d337b1f5 none null local
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
command: docker network rm
|
||||
aliases: remove
|
||||
short: Remove one or more networks
|
||||
long: |-
|
||||
Removes one or more networks by name or identifier. To remove a network,
|
||||
you must first disconnect any containers connected to it.
|
||||
usage: docker network rm NETWORK [NETWORK...]
|
||||
pname: docker network
|
||||
plink: docker_network.yaml
|
||||
examples: |-
|
||||
### Remove a network
|
||||
|
||||
To remove the network named 'my-network':
|
||||
|
||||
```bash
|
||||
$ docker network rm my-network
|
||||
```
|
||||
|
||||
### Remove multiple networks
|
||||
|
||||
To delete multiple networks in a single `docker network rm` command, provide
|
||||
multiple network names or ids. The following example deletes a network with id
|
||||
`3695c422697f` and a network named `my-network`:
|
||||
|
||||
```bash
|
||||
$ docker network rm 3695c422697f my-network
|
||||
```
|
||||
|
||||
When you specify multiple networks, the command attempts to delete each in turn.
|
||||
If the deletion of one network fails, the command continues to the next on the
|
||||
list and tries to delete that. The command reports success or failure for each
|
||||
deletion.
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
command: docker node
|
||||
short: Manage Swarm nodes
|
||||
long: Manage nodes.
|
||||
usage: docker node
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker node demote
|
||||
- docker node inspect
|
||||
- docker node ls
|
||||
- docker node promote
|
||||
- docker node ps
|
||||
- docker node rm
|
||||
- docker node update
|
||||
clink:
|
||||
- docker_node_demote.yaml
|
||||
- docker_node_inspect.yaml
|
||||
- docker_node_ls.yaml
|
||||
- docker_node_promote.yaml
|
||||
- docker_node_ps.yaml
|
||||
- docker_node_rm.yaml
|
||||
- docker_node_update.yaml
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
command: docker node demote
|
||||
short: Demote one or more nodes from manager in the swarm
|
||||
long: |-
|
||||
Demotes an existing manager so that it is no longer a manager. This command
|
||||
targets a docker engine that is a manager in the swarm.
|
||||
usage: docker node demote NODE [NODE...]
|
||||
pname: docker node
|
||||
plink: docker_node.yaml
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker node demote <node name>
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
command: docker node inspect
|
||||
short: Display detailed information on one or more nodes
|
||||
long: |-
|
||||
Returns information about a node. By default, this command renders all results
|
||||
in a JSON array. You can specify an alternate format to execute a
|
||||
given template for each result. Go's
|
||||
[text/template](http://golang.org/pkg/text/template/) package describes all the
|
||||
details of the format.
|
||||
usage: docker node inspect [OPTIONS] self|NODE [NODE...]
|
||||
pname: docker node
|
||||
plink: docker_node.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
|
||||
examples: "### Inspect a node\n\n```none\n$ docker node inspect swarm-manager\n\n[\n{\n
|
||||
\ \"ID\": \"e216jshn25ckzbvmwlnh5jr3g\",\n \"Version\": {\n \"Index\":
|
||||
10\n },\n \"CreatedAt\": \"2017-05-16T22:52:44.9910662Z\",\n \"UpdatedAt\":
|
||||
\"2017-05-16T22:52:45.230878043Z\",\n \"Spec\": {\n \"Role\": \"manager\",\n
|
||||
\ \"Availability\": \"active\"\n },\n \"Description\": {\n \"Hostname\":
|
||||
\"swarm-manager\",\n \"Platform\": {\n \"Architecture\": \"x86_64\",\n
|
||||
\ \"OS\": \"linux\"\n },\n \"Resources\": {\n \"NanoCPUs\":
|
||||
1000000000,\n \"MemoryBytes\": 1039843328\n },\n \"Engine\":
|
||||
{\n \"EngineVersion\": \"17.06.0-ce\",\n \"Plugins\": [\n
|
||||
\ {\n \"Type\": \"Volume\",\n \"Name\":
|
||||
\"local\"\n },\n {\n \"Type\":
|
||||
\"Network\",\n \"Name\": \"overlay\"\n },\n {\n
|
||||
\ \"Type\": \"Network\",\n \"Name\": \"null\"\n
|
||||
\ },\n {\n \"Type\": \"Network\",\n
|
||||
\ \"Name\": \"host\"\n },\n {\n
|
||||
\ \"Type\": \"Network\",\n \"Name\": \"bridge\"\n
|
||||
\ },\n {\n \"Type\": \"Network\",\n
|
||||
\ \"Name\": \"overlay\"\n }\n ]\n },\n
|
||||
\ \"TLSInfo\": {\n \"TrustRoot\": \"-----BEGIN CERTIFICATE-----\\nMIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw\\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy\\nNDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\\nA0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g\\nAh8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\\nAf8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO\\nPQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3\\nzONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==\\n-----END
|
||||
CERTIFICATE-----\\n\",\n \"CertIssuerSubject\": \"MBMxETAPBgNVBAMTCHN3YXJtLWNh\",\n
|
||||
\ \"CertIssuerPublicKey\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ==\"\n
|
||||
\ }\n },\n \"Status\": {\n \"State\": \"ready\",\n \"Addr\":
|
||||
\"168.0.32.137\"\n },\n \"ManagerStatus\": {\n \"Leader\": true,\n
|
||||
\ \"Reachability\": \"reachable\",\n \"Addr\": \"168.0.32.137:2377\"\n
|
||||
\ }\n}\n]\n```\n\n### Specify an output format\n\n```none\n$ docker node inspect
|
||||
--format '{{ .ManagerStatus.Leader }}' self\n\nfalse\n\n$ docker node inspect --pretty
|
||||
self\nID: e216jshn25ckzbvmwlnh5jr3g\nHostname: swarm-manager\nJoined
|
||||
at: 2017-05-16 22:52:44.9910662 +0000 utc\nStatus:\n State: Ready\n
|
||||
Availability: Active\n Address: 172.17.0.2\nManager Status:\n
|
||||
Address: 172.17.0.2:2377\n Raft Status: Reachable\n Leader:
|
||||
\ Yes\nPlatform:\n Operating System: linux\n Architecture: x86_64\nResources:\n
|
||||
CPUs: 4\n Memory: 7.704 GiB\nPlugins:\n Network:
|
||||
\ overlay, bridge, null, host, overlay\n Volume: local\nEngine
|
||||
Version: 17.06.0-ce\nTLS Info:\n TrustRoot:\n-----BEGIN CERTIFICATE-----\nMIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy\nNDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\nA0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g\nAh8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO\nPQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3\nzONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==\n-----END
|
||||
CERTIFICATE-----\n\n Issuer Public Key:\tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ==\n
|
||||
Issuer Subject:\tMBMxETAPBgNVBAMTCHN3YXJtLWNh\n```"
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
command: docker node ls
|
||||
aliases: list
|
||||
short: List nodes in the swarm
|
||||
long: |-
|
||||
Lists all the nodes that the Docker Swarm manager knows about. You can filter
|
||||
using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section
|
||||
for more information about available filter options.
|
||||
usage: docker node ls [OPTIONS]
|
||||
pname: docker node
|
||||
plink: docker_node.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 nodes 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
|
||||
examples: "```bash\n$ docker node ls\n\nID HOSTNAME STATUS
|
||||
\ AVAILABILITY MANAGER STATUS\n1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready
|
||||
\ Active\n38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active\ne216jshn25ckzbvmwlnh5jr3g
|
||||
* swarm-manager1 Ready Active Leader\n```\n> **Note**:\n> In the above
|
||||
example output, there is a hidden column of `.Self` that indicates if the\n> node
|
||||
is the same node as the current docker daemon. A `*` (e.g., `e216jshn25ckzbvmwlnh5jr3g
|
||||
*`)\n> means this node is the current docker daemon.\n\n\n### Filtering\n\nThe filtering
|
||||
flag (`-f` or `--filter`) format is of \"key=value\". If there is more\nthan one
|
||||
filter, then pass multiple flags (e.g., `--filter \"foo=bar\" --filter \"bif=baz\"`)\n\nThe
|
||||
currently supported filters are:\n\n* [id](node_ls.md#id)\n* [label](node_ls.md#label)\n*
|
||||
[membership](node_ls.md#membership)\n* [name](node_ls.md#name)\n* [role](node_ls.md#role)\n\n####
|
||||
id\n\nThe `id` filter matches all or part of a node's id.\n\n```bash\n$ docker node
|
||||
ls -f id=1\n\nID HOSTNAME STATUS AVAILABILITY MANAGER
|
||||
STATUS\n1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active\n```\n\n#### label\n\nThe
|
||||
`label` filter matches nodes based on engine labels and on the presence of a `label`
|
||||
alone or a `label` and a value. Node labels are currently not used for filtering.\n\nThe
|
||||
following filter matches nodes with the `foo` label regardless of its value.\n\n```bash\n$
|
||||
docker node ls -f \"label=foo\"\n\nID HOSTNAME STATUS
|
||||
\ AVAILABILITY MANAGER STATUS\n1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready
|
||||
\ Active\n```\n\n#### membership\n\nThe `membership` filter matches nodes based
|
||||
on the presence of a `membership` and a value\n`accepted` or `pending`.\n\nThe following
|
||||
filter matches nodes with the `membership` of `accepted`.\n\n```bash\n$ docker node
|
||||
ls -f \"membership=accepted\"\n\nID HOSTNAME STATUS
|
||||
\ AVAILABILITY MANAGER STATUS\n1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready
|
||||
\ Active\n38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active\n```\n\n####
|
||||
name\n\nThe `name` filter matches on all or part of a node hostname.\n\nThe following
|
||||
filter matches the nodes with a name equal to `swarm-master` string.\n\n```bash\n$
|
||||
docker node ls -f name=swarm-manager1\n\nID HOSTNAME STATUS
|
||||
\ AVAILABILITY MANAGER STATUS\ne216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready
|
||||
\ Active Leader\n```\n\n#### role\n\nThe `role` filter matches nodes based
|
||||
on the presence of a `role` and a value `worker` or `manager`.\n\nThe following
|
||||
filter matches nodes with the `manager` role.\n\n```bash\n$ docker node ls -f \"role=manager\"\n\nID
|
||||
\ HOSTNAME STATUS AVAILABILITY MANAGER STATUS\ne216jshn25ckzbvmwlnh5jr3g
|
||||
* swarm-manager1 Ready Active Leader\n```\n\n### Formatting\n\nThe formatting
|
||||
options (`--format`) pretty-prints nodes output\nusing a Go template.\n\nValid placeholders
|
||||
for the Go template are listed below:\n\nPlaceholder | Description\n-----------------|------------------------------------------------------------------------------------------\n`.ID`
|
||||
\ | Node ID\n`.Self` | Node of the daemon (`true/false`, `true`indicates
|
||||
that the node is the same as current docker daemon)\n`.Hostname` | Node hostname\n`.Status`
|
||||
\ | Node status\n`.Availability` | Node availability (\"active\", \"pause\",
|
||||
or \"drain\")\n`.ManagerStatus` | Manager status of the node\n`.TLSStatus` |
|
||||
TLS status of the node (\"Ready\", or \"Needs Rotation\" has TLS certificate signed
|
||||
by an old CA)\n`.EngineVersion` | Engine version\n\nWhen using the `--format` option,
|
||||
the `node ls` command will either\noutput the data exactly as the template declares
|
||||
or, when using the\n`table` directive, includes column headers as well.\n\nThe following
|
||||
example uses a template without headers and outputs the\n`ID`, `Hostname`, and `TLS
|
||||
Status` entries separated by a colon for all nodes:\n\n```bash\n$ docker node ls
|
||||
--format \"{{.ID}}: {{.Hostname}} {{.TLSStatus}}\"\ne216jshn25ckzbvmwlnh5jr3g: swarm-manager1
|
||||
Ready\n35o6tiywb700jesrt3dmllaza: swarm-worker1 Needs Rotation \n```"
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
command: docker node promote
|
||||
short: Promote one or more nodes to manager in the swarm
|
||||
long: |-
|
||||
Promotes a node to manager. This command targets a docker engine that is a
|
||||
manager in the swarm.
|
||||
usage: docker node promote NODE [NODE...]
|
||||
pname: docker node
|
||||
plink: docker_node.yaml
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker node promote <node name>
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
command: docker node ps
|
||||
short: List tasks running on one or more nodes, defaults to current node
|
||||
long: Lists all the tasks on a Node that Docker knows about. You can filter using
|
||||
the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more
|
||||
information about available filter options.
|
||||
usage: docker node ps [OPTIONS] [NODE...]
|
||||
pname: docker node
|
||||
plink: docker_node.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 tasks using a Go template
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: no-resolve
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Do not map IDs to Names
|
||||
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: quiet
|
||||
shorthand: q
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Only display task IDs
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker node ps swarm-manager1
|
||||
NAME IMAGE NODE DESIRED STATE CURRENT STATE
|
||||
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
|
||||
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
|
||||
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
```
|
||||
|
||||
### Filtering
|
||||
|
||||
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:
|
||||
|
||||
* [name](#name)
|
||||
* [id](#id)
|
||||
* [label](#label)
|
||||
* [desired-state](#desired-state)
|
||||
|
||||
#### name
|
||||
|
||||
The `name` filter matches on all or part of a task's name.
|
||||
|
||||
The following filter matches all tasks with a name containing the `redis` string.
|
||||
|
||||
```bash
|
||||
$ docker node ps -f name=redis swarm-manager1
|
||||
|
||||
NAME IMAGE NODE DESIRED STATE CURRENT STATE
|
||||
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
|
||||
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
|
||||
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
```
|
||||
|
||||
#### id
|
||||
|
||||
The `id` filter matches a task's id.
|
||||
|
||||
```bash
|
||||
$ docker node ps -f id=bg8c07zzg87di2mufeq51a2qp swarm-manager1
|
||||
|
||||
NAME IMAGE NODE DESIRED STATE CURRENT STATE
|
||||
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
|
||||
```
|
||||
|
||||
#### label
|
||||
|
||||
The `label` filter matches tasks based on the presence of a `label` alone or a `label` and a
|
||||
value.
|
||||
|
||||
The following filter matches tasks with the `usage` label regardless of its value.
|
||||
|
||||
```bash
|
||||
$ docker node ps -f "label=usage"
|
||||
|
||||
NAME IMAGE NODE DESIRED STATE CURRENT STATE
|
||||
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 10 minutes
|
||||
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 9 minutes
|
||||
```
|
||||
|
||||
|
||||
#### desired-state
|
||||
|
||||
The `desired-state` filter can take the values `running`, `shutdown`, or `accepted`.
|
||||
|
||||
|
||||
### Formatting
|
||||
|
||||
The formatting options (`--format`) pretty-prints tasks output
|
||||
using a Go template.
|
||||
|
||||
Valid placeholders for the Go template are listed below:
|
||||
|
||||
Placeholder | Description
|
||||
----------------|------------------------------------------------------------------------------------------
|
||||
`.Name` | Task name
|
||||
`.Image` | Task image
|
||||
`.Node` | Node ID
|
||||
`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`)
|
||||
`.CurrentState` | Current state of the task
|
||||
`.Error` | Error
|
||||
`.Ports` | Task published ports
|
||||
|
||||
When using the `--format` option, the `node ps` command will either
|
||||
output the data exactly as the template declares or, when using the
|
||||
`table` directive, includes column headers as well.
|
||||
|
||||
The following example uses a template without headers and outputs the
|
||||
`Name` and `Image` entries separated by a colon for all tasks:
|
||||
|
||||
```bash
|
||||
$ docker node ps --format "{{.Name}}: {{.Image}}"
|
||||
top.1: busybox
|
||||
top.2: busybox
|
||||
top.3: busybox
|
||||
```
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
command: docker node rm
|
||||
aliases: remove
|
||||
short: Remove one or more nodes from the swarm
|
||||
long: When run from a manager node, removes the specified nodes from a swarm.
|
||||
usage: docker node rm [OPTIONS] NODE [NODE...]
|
||||
pname: docker node
|
||||
plink: docker_node.yaml
|
||||
options:
|
||||
- option: force
|
||||
shorthand: f
|
||||
value_type: bool
|
||||
default_value: "false"
|
||||
description: Force remove a node from the swarm
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Remove a stopped node from the swarm
|
||||
|
||||
```bash
|
||||
$ docker node rm swarm-node-02
|
||||
|
||||
Node swarm-node-02 removed from swarm
|
||||
```
|
||||
### Attempt to remove a running node from a swarm
|
||||
|
||||
Removes the specified nodes from the swarm, but only if the nodes are in the
|
||||
down state. If you attempt to remove an active node you will receive an error:
|
||||
|
||||
```non
|
||||
$ docker node rm swarm-node-03
|
||||
|
||||
Error response from daemon: rpc error: code = 9 desc = node swarm-node-03 is not
|
||||
down and can't be removed
|
||||
```
|
||||
|
||||
### Forcibly remove an inaccessible node from a swarm
|
||||
|
||||
If you lose access to a worker node or need to shut it down because it has been
|
||||
compromised or is not behaving as expected, you can use the `--force` option.
|
||||
This may cause transient errors or interruptions, depending on the type of task
|
||||
being run on the node.
|
||||
|
||||
```bash
|
||||
$ docker node rm --force swarm-node-03
|
||||
|
||||
Node swarm-node-03 removed from swarm
|
||||
```
|
||||
|
||||
A manager node must be demoted to a worker node (using `docker node demote`)
|
||||
before you can remove it from the swarm.
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
command: docker node update
|
||||
short: Update a node
|
||||
long: Update metadata about a node, such as its availability, labels, or roles.
|
||||
usage: docker node update [OPTIONS] NODE
|
||||
pname: docker node
|
||||
plink: docker_node.yaml
|
||||
options:
|
||||
- option: availability
|
||||
value_type: string
|
||||
description: Availability of the node ("active"|"pause"|"drain")
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label-add
|
||||
value_type: list
|
||||
description: Add or update a node label (key=value)
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: label-rm
|
||||
value_type: list
|
||||
description: Remove a node label if exists
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
- option: role
|
||||
value_type: string
|
||||
description: Role of the node ("worker"|"manager")
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
examples: |-
|
||||
### Add label metadata to a node
|
||||
|
||||
Add metadata to a swarm node using node labels. You can specify a node label as
|
||||
a key with an empty value:
|
||||
|
||||
``` bash
|
||||
$ docker node update --label-add foo worker1
|
||||
```
|
||||
|
||||
To add multiple labels to a node, pass the `--label-add` flag for each label:
|
||||
|
||||
```bash
|
||||
$ docker node update --label-add foo --label-add bar worker1
|
||||
```
|
||||
|
||||
When you [create a service](service_create.md),
|
||||
you can use node labels as a constraint. A constraint limits the nodes where the
|
||||
scheduler deploys tasks for a service.
|
||||
|
||||
For example, to add a `type` label to identify nodes where the scheduler should
|
||||
deploy message queue service tasks:
|
||||
|
||||
``` bash
|
||||
$ docker node update --label-add type=queue worker1
|
||||
```
|
||||
|
||||
The labels you set for nodes using `docker node update` apply only to the node
|
||||
entity within the swarm. Do not confuse them with the docker daemon labels for
|
||||
[dockerd](https://docs.docker.com/engine/userguide/labels-custom-metadata/#daemon-labels).
|
||||
|
||||
For more information about labels, refer to [apply custom
|
||||
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
|
||||
deprecated: false
|
||||
min_api_version: "1.24"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: true
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
command: docker pause
|
||||
short: Pause all processes within one or more containers
|
||||
long: |-
|
||||
The `docker pause` command suspends all processes in the specified containers.
|
||||
On Linux, this uses the cgroups freezer. Traditionally, when suspending a process
|
||||
the `SIGSTOP` signal is used, which is observable by the process being suspended.
|
||||
With the cgroups freezer the process is unaware, and unable to capture,
|
||||
that it is being suspended, and subsequently resumed. On Windows, only Hyper-V
|
||||
containers can be paused.
|
||||
|
||||
See the
|
||||
[cgroups freezer documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
|
||||
for further details.
|
||||
usage: docker pause CONTAINER [CONTAINER...]
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
examples: |-
|
||||
```bash
|
||||
$ docker pause my_container
|
||||
```
|
||||
deprecated: false
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
command: docker plugin
|
||||
short: Manage plugins
|
||||
long: Manage plugins.
|
||||
usage: docker plugin
|
||||
pname: docker
|
||||
plink: docker.yaml
|
||||
cname:
|
||||
- docker plugin create
|
||||
- docker plugin disable
|
||||
- docker plugin enable
|
||||
- docker plugin inspect
|
||||
- docker plugin install
|
||||
- docker plugin ls
|
||||
- docker plugin push
|
||||
- docker plugin rm
|
||||
- docker plugin set
|
||||
- docker plugin upgrade
|
||||
clink:
|
||||
- docker_plugin_create.yaml
|
||||
- docker_plugin_disable.yaml
|
||||
- docker_plugin_enable.yaml
|
||||
- docker_plugin_inspect.yaml
|
||||
- docker_plugin_install.yaml
|
||||
- docker_plugin_ls.yaml
|
||||
- docker_plugin_push.yaml
|
||||
- docker_plugin_rm.yaml
|
||||
- docker_plugin_set.yaml
|
||||
- docker_plugin_upgrade.yaml
|
||||
deprecated: false
|
||||
min_api_version: "1.25"
|
||||
experimental: false
|
||||
experimentalcli: false
|
||||
kubernetes: false
|
||||
swarm: false
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue