Merge branch 'master' into patch-1

This commit is contained in:
Maria Bermudez 2019-01-10 06:48:27 -08:00 committed by GitHub
commit dba97175ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1143 changed files with 15120 additions and 147517 deletions

10
404.md
View File

@ -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)
![https://docs.docker.com/](/images/404-docs.png)
Please file an issue at [https://github.com/docker/docker.github.io](https://github.com/docker/docker.github.io/issues/new).

View File

@ -121,8 +121,5 @@ know.
## Style guide
If you have questions about how to write for Docker's documentation, have a look
at the [style guide](/opensource/doc-style/). The style
guide provides guidance about grammar, syntax, formatting, styling, language, or
tone. If something isn't clear in the guide, submit an issue to let us
know or submit a pull request to help us improve it.
Docker does not currently maintain a style guide. Use your best judgment, and
try to follow the example set by the existing documentation.

View File

@ -174,7 +174,8 @@ You have two options:
To read the docs offline, you can use either a standalone container or a swarm service.
To see all available tags, go to
[Docker Cloud](https://cloud.docker.com/app/docs/repository/docker/docs/docker.github.io/tags).
[Docker Hub](https://docs.docker.com/docker-hub/).
The following examples use the `latest` tag:
- Run a single container:
@ -197,7 +198,7 @@ Either way, you can now access the docs at port 4000 on your Docker host.
- `/_data/toc.yaml` defines the left-hand navigation for the docs
- `/js/menu.js` defines most of the docs-specific JS such as TOC generation and menu syncing
- `/css/documentation.css` defines the docs-specific style rules
- `/css/style.scss` defines the docs-specific style rules
- `/_layouts/docs.html` is the HTML template file, which defines the header and footer, and includes all the JS/CSS that serves the docs content
## Relative linking for GitHub viewing
@ -318,7 +319,7 @@ still optimizes the bandwidth during browsing).
## Building archives and the live published docs
All the images described below are automatically built using Docker Cloud. To
All the images described below are automatically built using Docker Hub. To
build the site manually, from scratch, including all utility and archive images,
see the [README in the publish-tools
branch](https://github.com/docker/docker.github.io/blob/publish-tools/README.md).

View File

@ -22,8 +22,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks"]
latest_stable_docker_engine_api_version: "1.39"
docker_ce_stable_version: "18.09"
docker_ce_edge_version: "18.09"
docker_ee_version: "2.1"
compose_version: "1.23.1"
docker_ee_version: "18.09"
compose_version: "1.23.2"
machine_version: "0.16.0"
distribution_version: "2.6"
dtr_version: "2.6"
@ -95,7 +95,7 @@ defaults:
- scope:
path: "install"
values:
win_latest_build: "docker-17.06.2-ee-17"
win_latest_build: "docker-18.09.0"
- scope:
path: "datacenter"
values:
@ -148,14 +148,14 @@ defaults:
values:
ucp_org: "docker"
ucp_repo: "ucp"
ucp_version: "3.1.0"
ucp_version: "3.1.1"
- 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.0"
ucp_version: "3.1.1"
dtr_version: "2.6.0"
dtr_latest_image: "docker/dtr:2.6.0"
- scope:
@ -164,7 +164,7 @@ defaults:
hide_from_sitemap: true
ucp_org: "docker"
ucp_repo: "ucp"
ucp_version: "3.0.6"
ucp_version: "3.0.7"
- scope:
path: "datacenter/ucp/2.2"
values:

View File

@ -17,7 +17,6 @@ texts:
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."
cloud-swarm: "**Beta Feature.** Swarm Mode for Docker Cloud is currently a public Beta."
# URL based advisories

View File

@ -6,6 +6,14 @@
- product: "ucp"
version: "3.1"
tar-files:
- 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"
url: https://packages.docker.com/caas/ucp_images_win_2016_3.1.1.tar.gz
- description: "3.1.1 Windows Server 1709"
url: https://packages.docker.com/caas/ucp_images_win_1709_3.1.1.tar.gz
- description: "3.1.1 Windows Server 1803"
url: https://packages.docker.com/caas/ucp_images_win_1803_3.1.1.tar.gz
- description: "3.1.0 Linux"
url: https://packages.docker.com/caas/ucp_images_3.1.0.tar.gz
- description: "3.1.0 Windows Server 2016 LTSC"
@ -17,6 +25,14 @@
- product: "ucp"
version: "3.0"
tar-files:
- 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"
url: https://packages.docker.com/caas/ucp_images_win_2016_3.0.7.tar.gz
- description: "3.0.7 Windows Server 1709"
url: https://packages.docker.com/caas/ucp_images_win_1709_3.0.7.tar.gz
- description: "3.0.7 Windows Server 1803"
url: https://packages.docker.com/caas/ucp_images_win_1803_3.0.7.tar.gz
- description: "3.0.6 Linux"
url: https://packages.docker.com/caas/ucp_images_3.0.6.tar.gz
- description: "3.0.6 IBM Z"

View File

@ -2,6 +2,7 @@ command: docker
cname:
- docker attach
- docker build
- docker builder
- docker checkpoint
- docker commit
- docker config
@ -10,6 +11,7 @@ cname:
- docker create
- docker deploy
- docker diff
- docker engine
- docker events
- docker exec
- docker export
@ -59,6 +61,7 @@ cname:
clink:
- docker_attach.yaml
- docker_build.yaml
- docker_builder.yaml
- docker_checkpoint.yaml
- docker_commit.yaml
- docker_config.yaml
@ -67,6 +70,7 @@ clink:
- docker_create.yaml
- docker_deploy.yaml
- docker_diff.yaml
- docker_engine.yaml
- docker_events.yaml
- docker_exec.yaml
- docker_export.yaml

View File

@ -293,6 +293,16 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: progress
value_type: string
default_value: auto
description: |
Set type of progress output (auto, plain, tty). Use plain to show container output
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pull
value_type: bool
default_value: "false"
@ -321,6 +331,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: secret
value_type: stringArray
default_value: '[]'
description: |
Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: security-opt
value_type: stringSlice
default_value: '[]'
@ -349,6 +370,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: ssh
value_type: stringArray
default_value: '[]'
description: |
SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: stream
value_type: bool
default_value: "false"
@ -477,21 +509,27 @@ examples: "### Build with PATH\n\n```bash\n$ docker build .\n\nUploading context
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 .\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.\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\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|
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|
@ -519,19 +557,18 @@ examples: "### Build with PATH\n\n```bash\n$ docker build .\n\nUploading context
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
multi-stage builds](https://docs.docker.com/develop/develop-images/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####
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
@ -551,7 +588,7 @@ examples: "### Build with PATH\n\n```bash\n$ docker build .\n\nUploading context
>> /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
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

View File

@ -0,0 +1,16 @@
command: docker builder
short: Manage builds
long: Manage builds
usage: docker builder
pname: docker
plink: docker.yaml
cname:
- docker builder prune
clink:
- docker_builder_prune.yaml
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -0,0 +1,51 @@
command: docker builder prune
short: Remove build cache
long: Remove build cache
usage: docker builder prune
pname: docker builder
plink: docker_builder.yaml
options:
- option: all
shorthand: a
value_type: bool
default_value: "false"
description: Remove all unused 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. 'unused-for=24h')
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: force
shorthand: f
value_type: bool
default_value: "false"
description: Do not prompt for confirmation
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: keep-storage
value_type: bytes
default_value: "0"
description: Amount of disk space to keep for cache
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -18,4 +18,5 @@ experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux

View File

@ -28,4 +28,5 @@ experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux

View File

@ -20,4 +20,5 @@ experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux

View File

@ -20,4 +20,5 @@ experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux

View File

@ -82,6 +82,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-percent
value_type: int64
default_value: "0"
@ -91,6 +92,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-period
value_type: int64
default_value: "0"
@ -394,6 +396,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: io-maxiops
value_type: uint64
default_value: "0"
@ -403,6 +406,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: ip
value_type: string
description: IPv4 address (e.g., 172.30.100.104)

View File

@ -82,6 +82,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-percent
value_type: int64
default_value: "0"
@ -91,6 +92,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-period
value_type: int64
default_value: "0"
@ -412,6 +414,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: io-maxiops
value_type: uint64
default_value: "0"
@ -421,6 +424,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: ip
value_type: string
description: IPv4 address (e.g., 172.30.100.104)

View File

@ -23,6 +23,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux
- option: checkpoint-dir
value_type: string
description: Use a custom checkpoint storage directory
@ -31,6 +32,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux
- option: detach-keys
value_type: string
description: Override the key sequence for detaching a container

View File

@ -93,6 +93,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-percent
value_type: int64
default_value: "0"
@ -102,6 +103,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-period
value_type: int64
default_value: "0"
@ -405,6 +407,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: io-maxiops
value_type: uint64
default_value: "0"
@ -414,6 +417,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: ip
value_type: string
description: IPv4 address (e.g., 172.30.100.104)
@ -961,7 +965,7 @@ examples: |-
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
NOTE: initially present devices still need to be explicitly added to
the create/run command
deprecated: false
experimental: false

View File

@ -19,13 +19,21 @@ options:
shorthand: c
value_type: stringSlice
default_value: '[]'
description: Path to a Compose file
description: Path to a Compose file, or "-" to read from stdin
deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: string
description: Kubernetes namespace to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
- option: prune
value_type: bool
default_value: "false"
@ -122,5 +130,5 @@ min_api_version: "1.25"
experimental: true
experimentalcli: false
kubernetes: false
swarm: true
swarm: false

View File

@ -0,0 +1,20 @@
command: docker engine
short: Manage the docker engine
long: Manage the docker engine
usage: docker engine COMMAND
pname: docker
plink: docker.yaml
cname:
- docker engine activate
- docker engine check
- docker engine update
clink:
- docker_engine_activate.yaml
- docker_engine_check.yaml
- docker_engine_update.yaml
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -0,0 +1,95 @@
command: docker engine activate
short: Activate Enterprise Edition
long: |
Activate Enterprise Edition.
With this command you may apply an existing Docker enterprise license, or
interactively download one from Docker. In the interactive exchange, you can
sign up for a new trial, or download an existing license. If you are
currently running a Community Edition engine, the daemon will be updated to
the Enterprise Edition Docker engine with additional capabilities and long
term support.
For more information about different Docker Enterprise license types visit
https://www.docker.com/licenses
For non-interactive scriptable deployments, download your license from
https://hub.docker.com/ then specify the file with the '--license' flag.
usage: docker engine activate [OPTIONS]
pname: docker engine
plink: docker_engine.yaml
options:
- option: containerd
value_type: string
description: override default location of containerd endpoint
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: display-only
value_type: bool
default_value: "false"
description: only display license information and exit
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: engine-image
value_type: string
description: Specify engine image
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: format
value_type: string
description: Pretty-print licenses using a Go template
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: license
value_type: string
description: License File
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
value_type: bool
default_value: "false"
description: Only display available licenses by ID
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: registry-prefix
value_type: string
default_value: docker.io/store/docker
description: Override the default location where engine images are pulled
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: version
value_type: string
description: |
Specify engine version (default is to use currently running version)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -0,0 +1,85 @@
command: docker engine check
short: Check for available engine updates
long: Check for available engine updates
usage: docker engine check [OPTIONS]
pname: docker engine
plink: docker_engine.yaml
options:
- option: containerd
value_type: string
description: override default location of containerd endpoint
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: downgrades
value_type: bool
default_value: "false"
description: Report downgrades (default omits older versions)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: engine-image
value_type: string
description: |
Specify engine image (default uses the same image as currently running)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: format
value_type: string
description: Pretty-print updates using a Go template
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pre-releases
value_type: bool
default_value: "false"
description: Include pre-release versions
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
shorthand: q
value_type: bool
default_value: "false"
description: Only display available versions
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: registry-prefix
value_type: string
default_value: docker.io/store/docker
description: |
Override the existing location where engine images are pulled
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: upgrades
value_type: bool
default_value: "true"
description: Report available upgrades
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -0,0 +1,47 @@
command: docker engine update
short: Update a local engine
long: Update a local engine
usage: docker engine update [OPTIONS]
pname: docker engine
plink: docker_engine.yaml
options:
- option: containerd
value_type: string
description: override default location of containerd endpoint
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: engine-image
value_type: string
description: |
Specify engine image (default uses the same image as currently running)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: registry-prefix
value_type: string
default_value: docker.io/store/docker
description: Override the current location where engine images are pulled
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: version
value_type: string
description: Specify engine version
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

View File

@ -19,6 +19,7 @@ long: |-
- `die`
- `exec_create`
- `exec_detach`
- `exec_die`
- `exec_start`
- `export`
- `health_status`

View File

@ -6,7 +6,7 @@ long: |-
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)
Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/v17.03/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

View File

@ -89,19 +89,13 @@ examples: |-
`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 all images:
`ID` and `CreatedSince` entries separated by a colon for the `busybox` image:
```bash
$ docker images --format "{{.ID}}: {{.Created}} ago"
$ docker history --format "{{.ID}}: {{.CreatedSince}}" busybox
cc1b61406712: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 3 weeks ago
<missing>: 3 weeks ago
<missing>: 3 weeks ago
f6e427c148a7: 4 weeks ago
<missing>: 4 weeks ago
```
deprecated: false
experimental: false

View File

@ -191,6 +191,16 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: progress
value_type: string
default_value: auto
description: |
Set type of progress output (auto, plain, tty). Use plain to show container output
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pull
value_type: bool
default_value: "false"
@ -219,6 +229,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: secret
value_type: stringArray
default_value: '[]'
description: |
Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: security-opt
value_type: stringSlice
default_value: '[]'
@ -247,6 +268,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: ssh
value_type: stringArray
default_value: '[]'
description: |
SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: stream
value_type: bool
default_value: "false"

View File

@ -23,6 +23,15 @@ options:
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

View File

@ -35,6 +35,15 @@ options:
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
examples: |-
### Import from a remote location

View File

@ -25,49 +25,49 @@ long: "Login to a registry.\n\n### Login to a self-hosted registry\n\nIf you wan
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```"
[pass](https://www.passwordstore.org/): https://github.com/docker/docker-credential-helpers/releases\n\n####
Configure the credentials store\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####
Configure credential helpers\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

View File

@ -7,7 +7,7 @@ long: |-
> 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/).
[Configure logging drivers](https://docs.docker.com/config/containers/logging/configure/).
The `docker logs --follow` command will continue streaming the new output from
the container's `STDOUT` and `STDERR`.

View File

@ -9,25 +9,25 @@ long: "The `docker manifest` command by itself performs no action. In order to o
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
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\nisplay an image manifest,
or manifest list\n\nOptions:\n --help Print usage\n --insecure allow
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 MANFEST_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
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 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
@ -51,7 +51,7 @@ clink:
- 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
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
@ -64,7 +64,7 @@ examples: "### inspect an image's manifest object\n \n```bash\n$ docker manifest
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 -v hello-world\n{\n \"Ref\": \"docker.io/library/hello-world:latest\",\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\":

View File

@ -1,7 +1,7 @@
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 MANFEST_LIST MANIFEST [MANIFEST...]
usage: docker manifest create MANIFEST_LIST MANIFEST [MANIFEST...]
pname: docker manifest
plink: docker_manifest.yaml
options:
@ -18,7 +18,7 @@ options:
- option: insecure
value_type: bool
default_value: "false"
description: allow communication with an insecure registry
description: Allow communication with an insecure registry
deprecated: false
experimental: false
experimentalcli: false

View File

@ -8,7 +8,7 @@ options:
- option: insecure
value_type: bool
default_value: "false"
description: allow communication with an insecure registry
description: Allow communication with an insecure registry
deprecated: false
experimental: false
experimentalcli: false

View File

@ -43,11 +43,11 @@ examples: |-
Error: Conflict, cannot delete image fd484f19954f because it is tagged in multiple repositories, use -f to force
2013/12/11 05:47:16 Error: failed to remove one or more images
$ docker rmi test1
$ docker rmi test1:latest
Untagged: test1:latest
$ docker rmi test2
$ docker rmi test2:latest
Untagged: test2:latest
@ -57,7 +57,7 @@ examples: |-
REPOSITORY TAG IMAGE ID CREATED SIZE
test latest fd484f19954f 23 seconds ago 7 B (virtual 4.964 MB)
$ docker rmi test
$ docker rmi test:latest
Untagged: test:latest
Deleted: fd484f19954f4920da7ff372b5067f5b7ddb2fd3830cecd17b96ea9e286ba5b8

View File

@ -93,6 +93,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-percent
value_type: int64
default_value: "0"
@ -102,6 +103,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: cpu-period
value_type: int64
default_value: "0"
@ -423,6 +425,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: io-maxiops
value_type: uint64
default_value: "0"
@ -432,6 +435,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
- option: ip
value_type: string
description: IPv4 address (e.g., 172.30.100.104)
@ -1138,7 +1142,7 @@ examples: |-
```
The `my-label` key doesn't specify a value so the label defaults to an empty
string(`""`). To add multiple labels, repeat the label flag (`-l` or `--label`).
string (`""`). To add multiple labels, repeat the label flag (`-l` or `--label`).
The `key=value` must be unique to avoid overwriting the label value. If you
specify labels with identical keys but different values, each subsequent value
@ -1312,7 +1316,7 @@ examples: |-
|:---------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `no` | Do not automatically restart the container when it exits. This is the default. |
| `on-failure[:max-retries]` | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. |
| `unless-stopped` | Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted. |
| `unless-stopped` | Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted. |
| `always` | Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container. |
```bash
@ -1323,7 +1327,7 @@ examples: |-
so that if the container exits, Docker will restart it.
More detailed information on restart policies can be found in the
[Restart Policies (--restart)](../run.md#restart-policies-restart)
[Restart Policies (--restart)](../run.md#restart-policies---restart)
section of the Docker run reference page.
### Add entries to container hosts file (--add-host)

View File

@ -1,8 +1,9 @@
command: docker secret create
short: Create a secret from a file or STDIN as content
long: "Creates a secret using standard input or from a file for the secret content.
You must run this command on a manager node. \n\nFor detailed information about
using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/)."
long: |-
Creates a secret using standard input or from a file for the secret content. You must run this command on a manager node.
For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/).
usage: docker secret create [OPTIONS] SECRET [file|-]
pname: docker secret
plink: docker_secret.yaml
@ -38,7 +39,7 @@ examples: |-
### Create a secret
```bash
$ echo <secret> | docker secret create my_secret -
$ printf <secret> | docker secret create my_secret -
onakdyv307se2tl7nl20anokv

View File

@ -196,6 +196,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: init
value_type: bool
default_value: "false"
description: |
Use an init inside each service container to forward signals and reap processes
deprecated: false
min_api_version: "1.37"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: isolation
value_type: string
description: Service container isolation mode

View File

@ -306,6 +306,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: init
value_type: bool
default_value: "false"
description: |
Use an init inside each service container to forward signals and reap processes
deprecated: false
min_api_version: "1.37"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: isolation
value_type: string
description: Service container isolation mode

View File

@ -1,7 +1,7 @@
command: docker stack
short: Manage Docker stacks
long: Manage stacks.
usage: docker stack
usage: docker stack [OPTIONS]
pname: docker
plink: docker.yaml
cname:
@ -22,22 +22,21 @@ options:
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -20,13 +20,21 @@ options:
shorthand: c
value_type: stringSlice
default_value: '[]'
description: Path to a Compose file
description: Path to a Compose file, or "-" to read from stdin
deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: string
description: Kubernetes namespace to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
- option: prune
value_type: bool
default_value: "false"
@ -63,17 +71,16 @@ inherited_options:
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
### Compose file
@ -117,7 +124,7 @@ examples: |-
`--compose-file` flags.
```bash
$ docker stack deploy --compose-file docker-compose.yml -f docker-compose.prod.yml vossibility
$ docker stack deploy --compose-file docker-compose.yml -c docker-compose.prod.yml vossibility
Ignoring unsupported options: links
@ -176,6 +183,6 @@ deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -2,10 +2,19 @@ command: docker stack ls
aliases: list
short: List stacks
long: Lists the stacks.
usage: docker stack ls
usage: docker stack ls [OPTIONS]
pname: docker stack
plink: docker_stack.yaml
options:
- option: all-namespaces
value_type: bool
default_value: "false"
description: List stacks from all Kubernetes namespaces
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
- option: format
value_type: string
description: Pretty-print stacks using a Go template
@ -14,23 +23,31 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: stringSlice
default_value: '[]'
description: Kubernetes namespaces to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
inherited_options:
- option: kubeconfig
value_type: string
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
The following command shows all stacks and some additional information:
@ -38,9 +55,9 @@ examples: |-
```bash
$ docker stack ls
ID SERVICES
vossibility-stack 6
myapp 2
ID SERVICES ORCHESTRATOR
myapp 2 Kubernetes
vossibility-stack 6 Swarm
```
### Formatting
@ -49,10 +66,12 @@ examples: |-
Valid placeholders for the Go template are listed below:
| Placeholder | Description |
| ----------- | ------------------ |
| `.Name` | Stack name |
| `.Services` | Number of services |
| Placeholder | Description |
| --------------- | ------------------ |
| `.Name` | Stack name |
| `.Services` | Number of services |
| `.Orchestrator` | Orchestrator name |
| `.Namespace` | Namespace |
When using the `--format` option, the `stack ls` command either outputs
the data exactly as the template declares or, when using the
@ -70,6 +89,6 @@ deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -15,7 +15,7 @@ options:
experimental: false
experimentalcli: false
kubernetes: false
swarm: true
swarm: false
- option: format
value_type: string
description: Pretty-print tasks using a Go template
@ -24,6 +24,14 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: string
description: Kubernetes namespace to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
- option: no-resolve
value_type: bool
default_value: "false"
@ -58,17 +66,16 @@ inherited_options:
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
### List the tasks that are part of a stack
@ -260,6 +267,6 @@ deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -4,26 +4,34 @@ short: Remove one or more stacks
long: |-
Remove the stack from the swarm. This command has to be run targeting
a manager node.
usage: docker stack rm STACK [STACK...]
usage: docker stack rm [OPTIONS] STACK [STACK...]
pname: docker stack
plink: docker_stack.yaml
options:
- option: namespace
value_type: string
description: Kubernetes namespace to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
inherited_options:
- option: kubeconfig
value_type: string
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
### Remove a stack
@ -65,6 +73,6 @@ deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -15,7 +15,7 @@ options:
experimental: false
experimentalcli: false
kubernetes: false
swarm: true
swarm: false
- option: format
value_type: string
description: Pretty-print services using a Go template
@ -24,6 +24,14 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: string
description: Kubernetes namespace to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
- option: quiet
shorthand: q
value_type: bool
@ -40,17 +48,16 @@ inherited_options:
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: true
experimentalcli: false
kubernetes: true
swarm: false
- option: namespace
- option: orchestrator
value_type: string
default_value: default
description: Kubernetes namespace to use
description: Orchestrator to use (swarm|kubernetes|all)
deprecated: false
experimental: false
experimentalcli: true
kubernetes: true
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
The following command shows all services in the `myapp` stack:
@ -82,8 +89,23 @@ examples: |-
The currently supported filters are:
* id / ID (`--filter id=7be5ei6sqeye`, or `--filter ID=7be5ei6sqeye`)
* name (`--filter name=myapp_web`)
* Swarm: supported
* Kubernetes: not supported
* label (`--filter label=key=value`)
* Swarm: supported
* Kubernetes: supported
* mode (`--filter mode=replicated`, or `--filter mode=global`)
* Swarm: not supported
* Kubernetes: supported
* name (`--filter name=myapp_web`)
* Swarm: supported
* Kubernetes: supported
* node (`--filter node=mynode`)
* Swarm: not supported
* Kubernetes: supported
* service (`--filter service=web`)
* Swarm: not supported
* Kubernetes: supported
### Formatting
@ -117,6 +139,6 @@ deprecated: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: true
swarm: true
kubernetes: false
swarm: false

View File

@ -23,6 +23,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux
- option: checkpoint-dir
value_type: string
description: Use a custom checkpoint storage directory
@ -31,6 +32,7 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
os_type: linux
- option: detach-keys
value_type: string
description: Override the key sequence for detaching a container

View File

@ -6,6 +6,8 @@ long: |-
If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint.
> **Note**: On Linux, the Docker CLI reports memory usage by subtracting page cache usage from the total memory usage. The API does not perform such a calculation but rather provides the total memory usage and the amount from the page cache so that clients can use the data as needed.
> **Note**: The `PIDS` column contains the number of processes and kernel threads created by that container. Threads is the term used by Linux kernel. Other equivalent terms are "lightweight process" or "kernel task", etc. A large number in the `PIDS` column combined with a small number of processes (as reported by `ps` or `top`) may indicate that something in the container is creating many threads.
usage: docker stats [OPTIONS] [CONTAINER...]
pname: docker
plink: docker.yaml

View File

@ -48,6 +48,27 @@ options:
description: |
Address or interface to use for data path traffic (format: <ip|interface>)
deprecated: false
min_api_version: "1.31"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: default-addr-pool
value_type: ipNetSlice
default_value: '[]'
description: default address pool in CIDR format
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: default-addr-pool-mask-length
value_type: uint32
default_value: "24"
description: default address pool subnet mask length
deprecated: false
min_api_version: "1.39"
experimental: false
experimentalcli: false
kubernetes: false
@ -202,6 +223,14 @@ examples: |-
If unspecified, Docker will use the same IP address or interface that is used for the
advertise address.
### `--default-addr-pool`
This flag specifies default subnet pools for global scope networks.
Format example is `--default-addr-pool 30.30.0.0/16 --default-addr-pool 40.40.0.0/16`
### `--default-addr-pool-mask-length`
This flag specifies default subnet pools mask length for default-addr-pool.
Format example is `--default-addr-pool-mask-length 24`
### `--task-history-limit`
This flag sets up task history retention limit.

View File

@ -30,6 +30,7 @@ options:
description: |
Address or interface to use for data path traffic (format: <ip|interface>)
deprecated: false
min_api_version: "1.31"
experimental: false
experimentalcli: false
kubernetes: false

View File

@ -23,7 +23,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
trust inspect alpine:latest\n[\n {\n \"Name\": \"alpine:latest\",\n \"SignedTags\":
[\n {\n \"SignedTag\": \"latest\",\n \"Digest\": \"d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478\",\n
\ \"Signers\": [\n \"Repo Admin\"\n ]\n }\n ],\n \"Signers\":
[],\n \"AdminstrativeKeys\": [\n {\n \"Name\": \"Repository\",\n
[],\n \"AdministrativeKeys\": [\n {\n \"Name\": \"Repository\",\n
\ \"Keys\": [\n {\n \"ID\": \"5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd\"\n
\ }\n ]\n },\n {\n \"Name\": \"Root\",\n \"Keys\":
[\n {\n \"ID\": \"a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce\"\n
@ -43,7 +43,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
\ }\n ]\n },\n {\n \"Name\": \"carol\",\n \"Keys\":
[\n {\n \"ID\": \"d32fa8b5ca08273a2880f455fcb318da3dc80aeae1a30610815140deef8f30d9\"\n
\ },\n {\n \"ID\": \"9a8bbec6ba2af88a5fad6047d428d17e6d05dbdd03d15b4fc8a9a0e8049cd606\"\n
\ }\n ]\n }\n ],\n \"AdminstrativeKeys\": [\n {\n
\ }\n ]\n }\n ],\n \"AdministrativeKeys\": [\n {\n
\ \"Name\": \"Repository\",\n \"Keys\": [\n {\n \"ID\":
\"27df2c8187e7543345c2e0bf3a1262e0bc63a72754e9a7395eac3f747ec23a44\"\n }\n
\ ]\n },\n {\n \"Name\": \"Root\",\n \"Keys\": [\n
@ -53,7 +53,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
docker trust inspect unsigned-img\nNo signatures or cannot access unsigned-img\n```\n\nHowever,
if other tags are signed in the same image repository,\n`docker trust inspect` reports
relevant key information:\n\n```bash\n$ docker trust inspect alpine:unsigned\n[\n
\ {\n \"Name\": \"alpine:unsigned\",\n \"Signers\": [],\n \"AdminstrativeKeys\":
\ {\n \"Name\": \"alpine:unsigned\",\n \"Signers\": [],\n \"AdministrativeKeys\":
[\n {\n \"Name\": \"Repository\",\n \"Keys\": [\n {\n
\ \"ID\": \"5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd\"\n
\ }\n ]\n },\n {\n \"Name\": \"Root\",\n \"Keys\":
@ -72,7 +72,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
[\n \"Repo Admin\"\n ]\n },\n {\n
\ \"SignedTag\": \"latest\",\n \"Digest\": \"d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478\",\n
\ \"Signers\": [\n \"Repo Admin\"\n ]\n
\ }\n ],\n \"Signers\": [],\n \"AdminstrativeKeys\":
\ }\n ],\n \"Signers\": [],\n \"AdministrativeKeys\":
[\n {\n \"Name\": \"Repository\",\n \"Keys\":
[\n {\n \"ID\": \"5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd\"\n
\ }\n ]\n },\n {\n \"Name\":
@ -95,7 +95,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
[\n \"Repo Admin\"\n ]\n },\n {\n
\ \"SignedTag\": \"latest\",\n \"Digest\": \"d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478\",\n
\ \"Signers\": [\n \"Repo Admin\"\n ]\n
\ }\n ],\n \"Signers\": [],\n \"AdminstrativeKeys\":
\ }\n ],\n \"Signers\": [],\n \"AdministrativeKeys\":
[\n {\n \"Name\": \"Repository\",\n \"Keys\":
[\n {\n \"ID\": \"5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd\"\n
\ }\n ]\n },\n {\n \"Name\":
@ -108,7 +108,7 @@ examples: "### Get low-level details about signatures for a single image tag\n\n
\ },\n {\n \"SignedTag\": \"signer\",\n \"Digest\":
\"a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8\",\n \"Signers\":
[\n \"Repo Admin\"\n ]\n }\n ],\n
\ \"Signers\": [],\n \"AdminstrativeKeys\": [\n {\n \"Name\":
\ \"Signers\": [],\n \"AdministrativeKeys\": [\n {\n \"Name\":
\"Root\",\n \"Keys\": [\n {\n \"ID\":
\"8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92\"\n }\n
\ ]\n },\n {\n \"Name\": \"Repository\",\n

View File

@ -19,6 +19,14 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: kubeconfig
value_type: string
description: Kubernetes config file
deprecated: false
experimental: false
experimentalcli: false
kubernetes: true
swarm: false
examples: |-
### Default output

View File

@ -12,7 +12,7 @@
overrides:
- path: /apidocs/
description: "Auto-generated API docs for Docker Cloud, DTR, UCP. File an issue."
description: "Auto-generated API docs for DTR and UCP. File an issue."
- path: /engine/api/
description: "ReDoc/Swagger API specs"

View File

@ -1,13 +0,0 @@
# Define Advisory texts
# can be used in page frontmatter, e.g.:
# previewflag: cloud-swarm
# modeled on advisories
texts:
cloud-swarm: "**Beta Feature.** Swarm Mode for Docker Cloud is currently a public Beta."
# URL based previewdocs
# any URL that begins with "/engine/" will get the "engine" preview
# will be over-ridden by the `previewdocs` frontmatter in the topic

View File

@ -48,8 +48,9 @@ source,destination
/v1.9/docker-hub/,/docker-hub/
/v1.10/docker-hub/,/docker-hub/
/v1.11/docker-hub/,/docker-hub/
/login,https://cloud.docker.com/app/login
/login,https://hub.docker.com/
/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html,https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html
/blog/docker-data-science/,https://www.dataquest.io/blog/docker-data-science/
/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container,http://stackoverflow.com/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container
/engine/examples/mongodb/,/samples/library/mongo/

1 source destination
48 /v1.9/docker-hub/ /docker-hub/
49 /v1.10/docker-hub/ /docker-hub/
50 /v1.11/docker-hub/ /docker-hub/
51 /login https://cloud.docker.com/app/login https://hub.docker.com/
52 /bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html
53 /blog/docker-data-science/ https://www.dataquest.io/blog/docker-data-science/
54 /questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container http://stackoverflow.com/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container
55 /engine/examples/mongodb/ /samples/library/mongo/
56

View File

@ -487,6 +487,8 @@ guides:
title: NIST SP 800-53
- path: /compliance/nist/800_190/
title: NIST SP 800-190
- path: /compliance/nist/fips140_2/
title: FIPS 140-2
- path: /compliance/nist/nistir_8176/
title: NISTIR 8176
- path: /compliance/nist/itl_october2017/
@ -1413,9 +1415,6 @@ reference:
- title: Registry API
path: /registry/spec/api/
nosync: true
- title: Cloud API
path: /apidocs/docker-cloud/
nosync: true
- sectiontitle: Drivers and specifications
section:
@ -1729,6 +1728,8 @@ manuals:
section:
- title: Access Kubernetes Resources
path: /ee/ucp/kubernetes/kube-resources/
- title: Configure AWS EBS Storage for Kubernetes
path: /ee/ucp/kubernetes/configure-aws-storage/
- title: Deploy a workload
path: /ee/ucp/kubernetes/
- title: Deploy a Compose-based app
@ -2490,8 +2491,10 @@ manuals:
path: /ee/dtr/admin/configure/deploy-caches/
- title: Cache deployment strategy
path: /ee/dtr/admin/configure/deploy-caches/strategy/
- title: Deploy a DTR cache
- title: Deploy a DTR cache with Docker Swarm
path: /ee/dtr/admin/configure/deploy-caches/simple/
- title: Deploy a DTR cache with Kubernetes
path: /ee/dtr/admin/configure/deploy-caches/simple-kube/
- title: Configure caches for high availability
path: /ee/dtr/admin/configure/deploy-caches/high-availability/
- title: Cache configuration reference
@ -2658,10 +2661,14 @@ manuals:
section:
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/
title: Overview
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/tls/
title: Deploy caches with TLS
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/chaining/
title: Chain multiple caches
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/strategy/
title: Cache deployment strategy
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/simple/
title: Deploy a DTR cache
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/high-availability/
title: Configure caches for high availability
- path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/configuration-reference/
title: Cache configuration reference
- path: /datacenter/dtr/2.5/guides/admin/configure/garbage-collection/
title: Garbage collection
- path: /datacenter/dtr/2.5/guides/admin/configure/use-a-web-proxy/
@ -3374,179 +3381,6 @@ manuals:
title: Get support
- title: Get support
path: /ee/get-support/
- sectiontitle: Docker Cloud
section:
- sectiontitle: Migration
section:
- path: /docker-cloud/migration/
title: Migration overview
- path: /docker-cloud/migration/cloud-to-swarm/
title: Migrate to Docker CE
- path: /docker-cloud/migration/cloud-to-kube-aks/
title: Migration to AKS
- path: /docker-cloud/migration/cloud-to-kube-gke/
title: Migrate to GKE
- path: /docker-cloud/migration/cloud-to-aws-ecs/
title: Migrate to Amazon ECS
- path: /docker-cloud/migration/deregister-swarms/
title: Deregister swarms
- path: /docker-cloud/migration/kube-primer/
title: Kubernetes primer
- path: /docker-cloud/
title: About Docker Cloud
- path: /docker-cloud/dockerid/
title: Docker Cloud settings and Docker ID
- path: /docker-cloud/orgs/
title: Organizations and teams
- sectiontitle: Manage builds and images
section:
- path: /docker-cloud/builds/
title: Builds and images overview
- path: /docker-cloud/builds/repos/
title: Docker Cloud repositories
- path: /docker-cloud/builds/link-source/
title: Link to a source code repository
- path: /docker-cloud/builds/push-images/
title: Push images to Docker Cloud
- path: /docker-cloud/builds/automated-build/
title: Automated builds
- path: /docker-cloud/builds/automated-testing/
title: Automated repository tests
- path: /docker-cloud/builds/advanced/
title: Advanced options for autobuild and autotest
- sectiontitle: Manage swarms (beta swarm mode)
section:
- path: /docker-cloud/cloud-swarm/
title: Overview
- path: /docker-cloud/cloud-swarm/using-swarm-mode/
title: Using Swarm mode
- path: /docker-cloud/cloud-swarm/register-swarms/
title: Register existing swarms
- path: /docker-cloud/cloud-swarm/create-cloud-swarm-aws/
title: Create a new swarm on Amazon Web Services in Docker Cloud
- path: /docker-cloud/cloud-swarm/create-cloud-swarm-azure/
title: Create a new swarm on Microsoft Azure in Docker Cloud
- path: /docker-cloud/cloud-swarm/connect-to-swarm/
title: Connect to a swarm through Docker Cloud
- path: /docker-cloud/cloud-swarm/link-aws-swarm/
title: Link Amazon Web Services to Docker Cloud
- path: /docker-cloud/cloud-swarm/link-azure-swarm/
title: Link Microsoft Azure Cloud Services to Docker Cloud
- path: /docker-cloud/cloud-swarm/ssh-key-setup/
title: Set up SSH keys
- sectiontitle: Manage Infrastructure (standard mode)
section:
- path: /docker-cloud/infrastructure/
title: Infrastructure overview
- path: /docker-cloud/infrastructure/deployment-strategies/
title: Container distribution strategies
- path: /docker-cloud/infrastructure/link-aws/
title: Link to Amazon Web Services hosts
- path: /docker-cloud/infrastructure/link-do/
title: Link to DigitalOcean hosts
- path: /docker-cloud/infrastructure/link-azure/
title: Link to Microsoft Azure hosts
- path: /docker-cloud/infrastructure/link-packet/
title: Link to Packet hosts
- path: /docker-cloud/infrastructure/link-softlayer/
title: Link to SoftLayer hosts
- path: /docker-cloud/infrastructure/ssh-into-a-node/
title: SSH into a Docker Cloud-managed node
- path: /docker-cloud/infrastructure/docker-upgrade/
title: Upgrade Docker on a node
- path: /docker-cloud/infrastructure/byoh/
title: Use the Docker Cloud agent
- path: /docker-cloud/infrastructure/cloud-on-packet.net-faq/
title: Use Docker Cloud and Packet.net
- path: /docker-cloud/infrastructure/cloud-on-aws-faq/
title: Use Docker Cloud on AWS
- sectiontitle: Manage nodes and apps (standard mode)
section:
- path: /docker-cloud/standard/
title: Overview
- sectiontitle: Getting started
section:
- path: /docker-cloud/getting-started/
title: Getting started with Docker Cloud
- path: /docker-cloud/getting-started/intro_cloud/
title: Introducing Docker Cloud
- path: /docker-cloud/getting-started/connect-infra/
title: Link to your infrastructure
- path: /docker-cloud/getting-started/your_first_node/
title: Deploy your first node
- path: /docker-cloud/getting-started/your_first_service/
title: Deploy your first service
- sectiontitle: Deploy an application
section:
- path: /docker-cloud/getting-started/deploy-app/1_introduction/
title: Introduction to deploying an app in Docker Cloud
- path: /docker-cloud/getting-started/deploy-app/2_set_up/
title: Set up your environment
- path: /docker-cloud/getting-started/deploy-app/3_prepare_the_app/
title: Prepare the application
- path: /docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/
title: Push the image to Docker Cloud's Registry
- path: /docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/
title: Deploy the app as a Docker Cloud service
- path: /docker-cloud/getting-started/deploy-app/6_define_environment_variables/
title: Define environment variables
- path: /docker-cloud/getting-started/deploy-app/7_scale_the_service/
title: Scale the service
- path: /docker-cloud/getting-started/deploy-app/8_view_logs/
title: View service logs
- path: /docker-cloud/getting-started/deploy-app/9_load-balance_the_service/
title: Load-balance the service
- path: /docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/
title: Provision a data backend for the service
- path: /docker-cloud/getting-started/deploy-app/11_service_stacks/
title: Stackfiles for your service
- path: /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/
title: Data management with volumes
- sectiontitle: Manage applications
section:
- path: /docker-cloud/apps/
title: Applications in Docker Cloud
- path: /docker-cloud/apps/deploy-to-cloud-btn/
title: Add a deploy to Docker Cloud button
- path: /docker-cloud/apps/auto-destroy/
title: Automatic container destroy
- path: /docker-cloud/apps/autorestart/
title: Automatic container restart
- path: /docker-cloud/apps/auto-redeploy/
title: Automatic service redeploy
- path: /docker-cloud/apps/load-balance-hello-world/
title: Create a proxy or load balancer
- path: /docker-cloud/apps/deploy-tags/
title: Deployment tags
- path: /docker-cloud/apps/stacks/
title: Manage service stacks
- path: /docker-cloud/apps/ports/
title: Publish and expose service or container ports
- path: /docker-cloud/apps/service-redeploy/
title: Redeploy running services
- path: /docker-cloud/apps/service-scaling/
title: Scale your service
- path: /docker-cloud/apps/api-roles/
title: Service API roles
- path: /docker-cloud/apps/service-links/
title: Service discovery and links
- path: /docker-cloud/apps/triggers/
title: Use triggers
- path: /docker-cloud/apps/volumes/
title: Work with data volumes
- path: /docker-cloud/apps/stack-yaml-reference/
title: Cloud stack file YAML reference
- path: /docker-cloud/slack-integration/
title: Docker Cloud notifications in Slack
- path: /apidocs/docker-cloud/
title: Docker Cloud API
nosync: true
- path: /docker-cloud/installing-cli/
title: The Docker Cloud CLI
- path: /docker-cloud/docker-errors-faq/
title: Known issues in Docker Cloud
- path: /docker-cloud/release-notes/
title: Release notes
- sectiontitle: Docker Compose
section:
- path: /compose/overview/
@ -3801,48 +3635,50 @@ manuals:
title: Migrate from Boot2Docker to Machine
- path: /release-notes/docker-machine/
title: Docker Machine release notes
- sectiontitle: Docker Store
section:
- path: /docker-store/
title: About Docker Store
- sectiontitle: Docker Store FAQs
section:
- path: /docker-store/customer_faq/
title: Customer FAQs
- path: /docker-store/publisher_faq/
title: Publisher FAQs
- sectiontitle: For Publishers
section:
- path: /docker-store/publish/
title: Publish content on Docker Store
- path: /docker-store/certify-images/
title: Certify Docker images
- path: /docker-store/certify-plugins-logging/
title: Certify Docker logging plugins
- path: /docker-store/trustchain/
title: Docker Store trust chain
- path: /docker-store/byol/
title: Bring Your Own License (BYOL)
- sectiontitle: Docker Hub
section:
- path: /docker-hub/
title: Overview of Docker Hub
- path: /docker-hub/accounts/
title: Use Docker Hub with Docker ID
- path: /docker-hub/orgs/
title: Teams &amp; organizations
title: Quickstart
- path: /docker-hub/repos/
title: Repositories on Docker Hub
- path: /docker-hub/builds/
title: Automated builds
title: Repositories
- path: /docker-hub/official_images/
title: Official Images
- path: /docker-hub/orgs/
title: Teams & Organizations
- path: /docker-hub/webhooks/
title: Webhooks for automated builds
- path: /docker-hub/bitbucket/
title: Automated builds with Bitbucket
- path: /docker-hub/github/
title: Automated builds from GitHub
- path: /docker-hub/official_repos/
title: Official repositories on Docker Hub
title: Webhooks
- path: /docker-hub/slack_integration/
title: Slack Integration
- path: /docker-hub/upgrade/
title: Upgrading your plan
- sectiontitle: Automated Builds
section:
- path: /docker-hub/builds/
title: Set up Automated builds
- path: /docker-hub/builds/automated-testing/
title: Testing in Automated Builds
- path: /docker-hub/builds/advanced/
title: Advanced Automated Builds
- path: /docker-hub/builds/link-source/
title: Link to GitHub and BitBucket
- path: /docker-hub/builds/classic/
title: Classic Automated Builds
- sectiontitle: Publisher & Certified Content
section:
- path: /docker-hub/publish/
title: Overview
- path: /docker-hub/publish/customer_faq/
title: User FAQs
- path: /docker-hub/publish/publisher_faq/
title: Publisher FAQs
- path: /docker-hub/publish/certify-images/
title: Certify Images & Plugins
- path: /docker-hub/publish/certify-plugins-logging/
title: Certify Logging Plugins
- path: /docker-hub/publish/trustchain/
title: Trust Chain
- path: /docker-hub/publish/byol/
title: Bring Your Own License (BYOL)
- sectiontitle: Open-source projects
section:
- sectiontitle: Docker Notary
@ -3962,9 +3798,6 @@ manuals:
- path: /release-notes/docker-compose/
title: Docker Compose
nosync: true
- path: /docker-cloud/release-notes/
title: Docker Cloud
nosync: true
- path: /docker-for-aws/release-notes/
title: Docker for AWS
nosync: true

View File

@ -1,6 +1,8 @@
| Docker version | Maximum API version | Change log |
|:---------------|:---------------------------|:---------------------------------------------------------|
| 18.09 | [1.39](/engine/api/v1.39/) | [changes](/engine/api/version-history/#v139-api-changes) |
| 18.06 | [1.38](/engine/api/v1.38/) | [changes](/engine/api/version-history/#v138-api-changes) |
| 18.05 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) |
| 18.04 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) |
| 18.03 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) |

View File

@ -1,9 +0,0 @@
You can now create _new_ Docker Swarms from within Docker Cloud as well as
register existing swarms.
When you create a swarm, Docker Cloud connects to the Cloud provider on your
behalf, and uses the provider's APIs and a provider-specific template to launch
Docker instances. The instances are then joined to a swarm and the swarm is
configured using your input. When you access the swarm from Docker Cloud, the
system forwards your commands directly to the Docker instances running in the
swarm.

View File

@ -9,7 +9,7 @@ your Compose file and their name start with the `x-` character sequence.
> of service, volume, network, config and secret definitions.
```none
version: '2.1'
version: '3.4'
x-custom:
items:
- a

View File

@ -55,7 +55,7 @@ passphrases in your keychain.
2. Add your SSH private key to the ssh-agent.
```none
$ ssh-add -K ~/.ssh/id_rsa
$ ssh-add ~/.ssh/id_rsa
```
If you created your key with a different name or have an existing key
@ -81,7 +81,7 @@ passphrases in your keychain.
2. Add your SSH private key to the ssh-agent.
```none
$ ssh-add -K ~/.ssh/id_rsa
$ ssh-add ~/.ssh/id_rsa
```
If you created your key with a different name or have an existing key

View File

@ -2,7 +2,7 @@
provides authentication and encrypts data communication over insecure networks.
These topics describe how to find existing SSH keys or generate new ones, and
add the public key to your Docker Cloud account. GitHub has a good set of
add the public key to your Docker Hub account. GitHub has a good set of
topics on [Connecting to GitHub with
SSH](https://help.github.com/articles/connecting-to-github-with-ssh/), which you
can tailor to SSH scenarios beyond GitHub, including Docker. The quick-look

View File

@ -30,7 +30,7 @@ For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker CE for Cen
To install Docker EE, you will need the URL of the Docker EE repository associated with your trial or subscription:
1. Go to [https://store.docker.com/my-content](https://store.docker.com/my-content){: target="_blank" class="_" }. All of your subscriptions and trials are listed.
1. Go to [https://hub.docker.com/my-content](https://hub.docker.com/my-content){: target="_blank" class="_" }. All of your subscriptions and trials are listed.
2. Click the **Setup** button for **Docker Enterprise Edition for {{ linux-dist-long }}**.
3. Copy the URL from **Copy and paste this URL to download your Edition** and save it for later use.
@ -137,20 +137,12 @@ You only need to set up the repository once, after which you can install Docker
{% elsif section == "install-using-yum-repo" %}
There are currently two versions of Docker EE Engine available:
> ***NOTE:*** If you need to run Docker EE 2.0, please see the following instructions:
> * [18.03](https://docs.docker.com/v18.03/ee/supported-platforms/) - Older Docker EE Engine only release
> * [17.06](https://docs.docker.com/v17.06/engine/installation/) - Docker Enterprise Edition 2.0 (Docker Engine,
> UCP, and DTR).
* 18.03 - Use this version if you're only running Docker EE Engine.
* 17.06 - Use this version if you're using Docker Enterprise Edition 2.0 (Docker
Engine, UCP, and DTR).
1. By default, Docker EE Engine 17.06 is installed. If you want to install the
18.03 version run:
```bash
sudo yum-config-manager --enable docker-ee-stable-18.03
```
2. Install the latest patch release, or go to the next step to install a specific version:
1. Install the latest patch release, or go to the next step to install a specific version:
```bash
$ sudo yum -y install docker-ee
@ -158,27 +150,34 @@ Engine, UCP, and DTR).
If prompted to accept the GPG key, verify that the fingerprint matches `{{ gpg-fingerprint }}`, and if so, accept it.
3. To install a _specific version_ of Docker EE (recommended in production), list versions and install:
2. To install a _specific version_ of Docker EE (recommended in production), list versions and install:
a. List and sort the versions available in your repo. This example sorts results by version number, highest to lowest, and is truncated:
```bash
$ sudo yum list docker-ee --showduplicates | sort -r
docker-ee.x86_64 {{ site.docker_ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-17.06
docker-ee.x86_64 {{ site.docker_ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-18.09
```
The list returned depends on which repositories you enabled, and is specific to your version of {{ linux-dist-long }} (indicated by `.el7` in this example).
b. Install a specific version by its **fully qualified package name** which is the package name (`docker-ee`) plus the version string (2nd column) up to the hyphen, for example: `docker-ee-17.06.1.ee.2`
b. Install a specific version by its **fully qualified package name** which is the package name (`docker-ee`) plus the version string (2nd column) up to the hyphen, for example: `docker-ee-18.09.0`
```bash
$ sudo yum -y install <FULLY-QUALIFIED-PACKAGE-NAME>
```
For example, if you want to install the 18.09 version run the following:
```bash
sudo yum-config-manager --enable docker-ee-stable-18.09
```
Docker is installed but not started. The `docker` group is created, but no users are added to the group.
4. Start Docker:
3. Start Docker:
> If using `devicemapper`, ensure it is properly configured before starting Docker, per the [storage guide](/storage/storagedriver/device-mapper-driver/){: target="_blank" class="_" }.
@ -186,7 +185,7 @@ Engine, UCP, and DTR).
$ sudo systemctl start docker
```
5. Verify that Docker EE is installed correctly by running the `hello-world`
4. Verify that Docker EE is installed correctly by running the `hello-world`
image. This command downloads a test image, runs it in a container, prints
an informational message, and exits:

View File

@ -39,8 +39,7 @@
<li><a href="https://www.docker.com/docker-community">Community Edition</a></li>
<li class="break"><a href="https://www.docker.com/enterprise">Enterprise Edition </a></li>
<li><a href="https://www.docker.com/products/docker-datacenter">Docker Datacenter</a></li>
<li><a href="https://cloud.docker.com/">Docker Cloud</a></li>
<li><a href="https://store.docker.com/">Docker Store</a></li>
<li><a href="https://hub.docker.com/">Docker Hub</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">

View File

@ -33,8 +33,8 @@
</li>
<li><a href="https://docs.docker.com">Docs</a></li>
<li><a href="https://docker.com/docker-community">Community</a></li>
<li><a href="https://cloud.docker.com/">Create Docker ID</a></li>
<li><a href="https://cloud.docker.com/login">Sign In</a></li>
<li><a href="https://hub.docker.com/signup">Create Docker ID</a></li>
<li><a href="https://hub.docker.com/sso/start">Sign In</a></li>
</ul>
</div>
<!--/.nav-collapse -->

View File

@ -55,8 +55,8 @@ Remember to log out and back in for this to take effect!
> **Warning**:
>
> Adding a user to the "docker" group grants the ability to run containers
> which can be used to obtain root privileges on the docker host. Refer to
> Adding a user to the "docker" group grants them the ability to run containers
> which can be used to obtain root privileges on the Docker host. Refer to
> [Docker Daemon Attack Surface](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface)
> for more information.
{:.warning}

View File

@ -13,7 +13,7 @@ Usage: {% include kubernetes-mac-win.md platform="mac" %}
{% assign product = "Docker for Mac" %}
{% capture min-version %}{{ product }} **17.12 CE Edge**{% endcapture %}
{% capture version-caveat %}
Kubernetes is available in {{ min-version }} and higher, and **18.06 Stable** and higher
{% endcapture%}
@ -88,7 +88,7 @@ Run `kubectl get services -n my-app` to see only the services deployed in the
### Override the default orchestrator
While testing Kubernetes, you may want to deploy some workloads in swarm mode.
Use the `DOCKER_ORCHESTRATOR` variable to override the default orchestrator for
Use the `DOCKER_STACK_ORCHESTRATOR` variable to override the default orchestrator for
a given terminal session or a single Docker command. This variable can be unset
(the default, in which case Kubernetes is the orchestrator) or set to `swarm` or
`kubernetes`. The following command overrides the orchestrator for a single
@ -96,17 +96,24 @@ deployment, by setting the variable{% if platform == "mac"" %}
at the start of the command itself.
```bash
DOCKER_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack
DOCKER_STACK_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack
```{% elsif platform == "windows" %}
before running the command.
```shell
set DOCKER_ORCHESTRATOR=swarm
set DOCKER_STACK_ORCHESTRATOR=swarm
docker stack deploy --compose-file /path/to/docker-compose.yml mystack
```
{% endif %}
Alternatively, the `--orchestrator` flag may be set to `swarm` or `kubernetes`
when deploying to override the default orchestrator for that deployment.
```bash
docker stack deploy --orchestrator swarm --compose-file /path/to/docker-compose.yml mystack
```
> **Note**: Deploying the same app in Kubernetes and swarm mode may lead to
> conflicts with ports and service names.

View File

@ -2,7 +2,7 @@
{% comment %}
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
Usage:
{% include toc_pure_liquid.html html=content sanitize=true class="inline_toc" id="my_toc" toc_min=2 toc_max=3 my_name="unnamed" %}
{% include toc_pure_liquid.html html=content sanitize=true class="inline_toc" id="my_toc" toc_min=2 toc_max=3 %}
Variables:
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
@ -11,7 +11,6 @@
* id (string) - an ID to assigned to the TOC
* toc_min (int) - the minimum TOC header level to use (if not set, check page, then site, then default to 2)
* toc_max (int) - the maximum TOC header level to use (if not set, check page, then site, then default to 3)
* page_name (string) - the URL of the page
Output:
An unordered list representing the table of contents of a markdown block. This snippet will only generate the table of contents and will NOT output the markdown given to it
@ -20,7 +19,6 @@
{% capture my_toc %}{% endcapture %}
{% assign minHeader = include.toc_min | default: 2 %}
{% assign maxHeader = include.toc_max | default: 3 %}
{% assign my_name = include.page_name | default: "unnamed" %}
{% assign nodes = include.html | split: '<h' %}
{% for node in nodes %}
@ -53,7 +51,7 @@
{% endfor %}
{% capture my_toc %}{{ my_toc }}
{{ space }}- [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}]({{ my_name }}#{{ html_id }}){: class="nomunge" }{% endcapture %}
{{ space }}- [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}](#{{ html_id }}){: class="nomunge" }{% endcapture %}
{% endfor %}

View File

@ -2,7 +2,7 @@
>
> This content is imported from
> [the official Docker Library docs](https://github.com/docker-library/docs/tree/master/{{ page.repo}}/),
> and is provided by the original uploader. You can view the Docker Store page for this image at
> [https://store.docker.com/images/{{ page.repo }}](https://store.docker.com/images/{{ page.repo }})
> and is provided by the original uploader. You can view the Docker Hub page for this image at
> [https://hub.docker.com/images/{{ page.repo }}](https://hub.docker.com/images/{{ page.repo }})
<!-- content begin -->

View File

@ -85,9 +85,7 @@ bash _scripts/fetch-upstream-resources.sh -l
# Currently, this is:
# /samples/
# /docker-id/
# /docker-cloud/
# /docker-hub/
# /docker-store/
# These rely on _layout/archive-redirect.html
only_live_contents=("samples" "docker-id" "docker-cloud" "docker-hub" "docker-store")
@ -145,5 +143,3 @@ echo " and get back to master, run the following:"
echo
echo " git reset --hard; git clean -fd; git checkout master; git branch -D v$version"
echo

View File

@ -185,6 +185,12 @@ section.section {
padding-top: 20px;
padding-bottom: 20px;
}
/***Swagger***/
.swagger-section {
padding-top: 2rem;
}
/*
*
* global footer ***********************************************************************

View File

@ -94,6 +94,11 @@
*
*/
// Some links don't have 'href' attr, hence no mouse pointer
.nav-sidebar li a {
cursor: pointer;
}
.nav-sidebar>li>a {
padding-right: 20px;
padding-left: 20px;
@ -155,6 +160,12 @@
padding: 0 20px 20px 0;
}
/* pointer for collapsed sidebar list items */
.collapsed
{
cursor:pointer;
}
/*
*
@ -372,3 +383,5 @@ input:checked+.slider:before {
float: left;
margin: 2px 0 0;
}

View File

@ -1,5 +0,0 @@
# The files in this directory are read-only
The API docs for the products represented in this directory are generated
internally by Docker using our source code. If you have feedback on these
docs, the best way to let us know is to file an issue on GitHub.

View File

@ -1 +0,0 @@
build/

View File

@ -1,2 +0,0 @@
.idea
.DS_Store

View File

@ -1,15 +0,0 @@
FROM ubuntu:trusty
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq ruby ruby-dev build-essential git awscli && \
gem install --no-ri --no-rdoc bundler
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install
ADD . /app
ENV PATH=$PATH:/app AWS_ACCESS_KEY_ID=**setme** AWS_SECRET_ACCESS_KEY=**setme** BUCKET=**setme**
EXPOSE 4567
CMD ["bundle", "exec", "middleman", "server"]

View File

@ -1,12 +0,0 @@
source 'https://rubygems.org'
# Middleman
gem 'middleman', '~>3.3.10'
gem 'middleman-gh-pages', '~> 0.0.3'
gem 'middleman-syntax', '~> 2.0.0'
gem 'middleman-autoprefixer', '~> 2.4.4'
gem 'rouge', '~> 1.9.0'
gem 'redcarpet', '~> 3.3.2'
gem 'rake', '~> 10.4.2'
gem 'therubyracer', '~> 0.12.1', platforms: :ruby

View File

@ -1,140 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.1.11)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
autoprefixer-rails (5.2.0.1)
execjs
json
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.4)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.2)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
erubis (2.7.0)
execjs (2.5.2)
ffi (1.9.8)
haml (4.0.6)
tilt
hike (1.2.3)
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
i18n (0.7.0)
json (1.8.3)
kramdown (1.7.0)
libv8 (3.16.14.7)
listen (2.10.1)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
middleman (3.3.12)
coffee-script (~> 2.2)
compass (>= 1.0.0, < 2.0.0)
compass-import-once (= 1.0.5)
execjs (~> 2.0)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-core (= 3.3.12)
middleman-sprockets (>= 3.1.2)
sass (>= 3.4.0, < 4.0)
uglifier (~> 2.5)
middleman-autoprefixer (2.4.4)
autoprefixer-rails (~> 5.2.0)
middleman-core (>= 3.3.3)
middleman-core (3.3.12)
activesupport (~> 4.1.0)
bundler (~> 1.1)
erubis
hooks (~> 0.3)
i18n (~> 0.7.0)
listen (>= 2.7.9, < 3.0)
padrino-helpers (~> 0.12.3)
rack (>= 1.4.5, < 2.0)
rack-test (~> 0.6.2)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.4.1, < 2.0)
middleman-gh-pages (0.0.3)
rake (> 0.9.3)
middleman-sprockets (3.4.2)
middleman-core (>= 3.3)
sprockets (~> 2.12.1)
sprockets-helpers (~> 1.1.0)
sprockets-sass (~> 1.3.0)
middleman-syntax (2.0.0)
middleman-core (~> 3.2)
rouge (~> 1.0)
minitest (5.7.0)
multi_json (1.11.1)
padrino-helpers (0.12.5)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.12.5)
tilt (~> 1.4.1)
padrino-support (0.12.5)
activesupport (>= 3.1)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (3.3.2)
ref (1.0.5)
rouge (1.9.0)
sass (3.4.14)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.1.0)
sprockets (~> 2.0)
sprockets-sass (1.3.1)
sprockets (~> 2.0)
tilt (~> 1.1)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
timers (4.0.1)
hitimes
tzinfo (1.2.2)
thread_safe (~> 0.1)
uber (0.0.13)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
ruby
DEPENDENCIES
middleman (~> 3.3.10)
middleman-autoprefixer (~> 2.4.4)
middleman-gh-pages (~> 0.0.3)
middleman-syntax (~> 2.0.0)
rake (~> 10.4.2)
redcarpet (~> 3.3.2)
rouge (~> 1.9.0)
therubyracer (~> 0.12.1)

View File

@ -1,13 +0,0 @@
Copyright 2008-2013 Concur Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.

View File

@ -1,28 +0,0 @@
.PHONY: docs build release
CONTAINER_NAME=api-build
export CONTAINER_NAME
docs: build
docker run --rm -it -p 4567:4567 dockercloud/api-docs
build:
git submodule init && git submodule update
docker build -t dockercloud/api-docs .
release: build
docker rm -f $(CONTAINER_NAME) || true
docker run --name $(CONTAINER_NAME) -it \
dockercloud/api-docs middleman build
docker cp $(CONTAINER_NAME):/app/build ../
rm -r ../docker-cloud
mv ../build ../docker-cloud
cp ../docker-cloud/index.html ../layouts/single.html
# defuse text that looks like a go template
# commenting out until we know that we're not using Hugo anywhere & can remove
# grep -rl '{ {' ../docker-cloud/* | xargs sed -i~ "s/{ {/{ {/g"
#rm source/includes/node.md~
#rm source/includes/stack.md~
#rm ../source/index.html~
#rm ../source/layouts/single.html~
docker rm $(CONTAINER_NAME)

View File

@ -1,29 +0,0 @@
dockercloud/api-docs
====================
[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/)
If you find a typo or mismatch between the API and this documentation, send us a pull request!
## Usage
To run it locally:
```none
$ git clone --recursive https://github.com/docker/docker.github.io.git
$ make release
```
The documentation will be available in http://localhost:8000/
## Updating the release HTML
As with the HTML generated by the DTR apidocs, the Docker Cloud documentation
needs to be generated and the resulting HTML committed to this repository.
After merging all PR's, run `make release`. This will place the updated HTML
into the `apidocs/docker-cloud` directory.
Create a new Pull Request and get it merged. - now this repository is ready for
the release process using `docker/docs.docker.com`.

View File

@ -1,6 +0,0 @@
require 'middleman-gh-pages'
require 'rake/clean'
CLOBBER.include('build')
task :default => [:build]

View File

@ -1,38 +0,0 @@
# Markdown
set :markdown_engine, :redcarpet
set :markdown,
fenced_code_blocks: true,
smartypants: true,
disable_indented_code_blocks: true,
prettify: true,
tables: true,
with_toc_data: true,
no_intra_emphasis: true
# Assets
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :fonts_dir, 'fonts'
# Activate the syntax highlighter
activate :syntax
activate :autoprefixer do |config|
config.browsers = ['last 2 version', 'Firefox ESR']
config.cascade = false
config.inline = true
end
# Github pages require relative links
activate :relative_assets
set :relative_links, true
# Build Configuration
configure :build do
activate :minify_css
activate :minify_javascript
# activate :relative_assets
# activate :asset_hash
# activate :gzip
end

View File

@ -1,4 +0,0 @@
apidocs:
image: tutum/api-docs:latest
ports:
- "4567:4567"

View File

@ -1,148 +0,0 @@
{
"IcoMoonType": "selection",
"icons": [
{
"icon": {
"paths": [
"M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z"
],
"attrs": [],
"isMulticolor": false,
"tags": [
"exclamation-circle"
],
"defaultCode": 61546,
"grid": 14
},
"attrs": [],
"properties": {
"id": 100,
"order": 4,
"prevSize": 28,
"code": 58880,
"name": "exclamation-sign",
"ligatures": ""
},
"setIdx": 0,
"iconIdx": 0
},
{
"icon": {
"paths": [
"M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z"
],
"attrs": [],
"isMulticolor": false,
"tags": [
"info-circle"
],
"defaultCode": 61530,
"grid": 14
},
"attrs": [],
"properties": {
"id": 85,
"order": 3,
"name": "info-sign",
"prevSize": 28,
"code": 58882
},
"setIdx": 0,
"iconIdx": 2
},
{
"icon": {
"paths": [
"M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z"
],
"attrs": [],
"isMulticolor": false,
"tags": [
"check-circle"
],
"defaultCode": 61528,
"grid": 14
},
"attrs": [],
"properties": {
"id": 83,
"order": 9,
"prevSize": 28,
"code": 58886,
"name": "ok-sign"
},
"setIdx": 0,
"iconIdx": 6
},
{
"icon": {
"paths": [
"M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z"
],
"width": 951,
"attrs": [],
"isMulticolor": false,
"tags": [
"search"
],
"defaultCode": 61442,
"grid": 14
},
"attrs": [],
"properties": {
"id": 2,
"order": 1,
"prevSize": 28,
"code": 58887,
"name": "icon-search"
},
"setIdx": 0,
"iconIdx": 7
}
],
"height": 1024,
"metadata": {
"name": "slate",
"license": "SIL OFL 1.1"
},
"preferences": {
"showGlyphs": true,
"showQuickUse": true,
"showQuickUse2": true,
"showSVGs": true,
"fontPref": {
"prefix": "icon-",
"metadata": {
"fontFamily": "slate",
"majorVersion": 1,
"minorVersion": 0,
"description": "Based on FontAwesome",
"license": "SIL OFL 1.1"
},
"metrics": {
"emSize": 1024,
"baseline": 6.25,
"whitespace": 50
},
"resetPoint": 58880,
"showSelector": false,
"selector": "class",
"classSelector": ".icon",
"showMetrics": false,
"showMetadata": true,
"showVersion": true,
"ie7": false
},
"imagePref": {
"prefix": "icon-",
"png": true,
"useClassSelector": true,
"color": 4473924,
"bgColor": 16777215
},
"historySize": 100,
"showCodes": true,
"gridSize": 16,
"showLiga": false
}
}

View File

@ -1,3 +0,0 @@
#!/bin/bash
middleman build
aws s3 sync /app/build s3://${AWS_S3_BUCKET}/apidocs/docker-cloud/ --delete --acl public-read --region us-east-1

View File

@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="slate" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe600;" d="M438.857 877.714q119.429 0 220.286-58.857t159.714-159.714 58.857-220.286-58.857-220.286-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857zM512 165.143v108.571q0 8-5.143 13.429t-12.571 5.429h-109.714q-7.429 0-13.143-5.714t-5.714-13.143v-108.571q0-7.429 5.714-13.143t13.143-5.714h109.714q7.429 0 12.571 5.429t5.143 13.429zM510.857 361.714l10.286 354.857q0 6.857-5.714 10.286-5.714 4.571-13.714 4.571h-125.714q-8 0-13.714-4.571-5.714-3.429-5.714-10.286l9.714-354.857q0-5.714 5.714-10t13.714-4.286h105.714q8 0 13.429 4.286t6 10z" />
<glyph unicode="&#xe602;" d="M585.143 164.571v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 676.571v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="&#xe606;" d="M733.714 531.428q0 16-10.286 26.286l-52 51.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-233.143-232.571-129.143 129.143q-10.857 10.857-25.714 10.857t-25.714-10.857l-52-51.429q-10.286-10.286-10.286-26.286 0-15.429 10.286-25.714l206.857-206.857q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l310.286 310.286q10.286 10.286 10.286 25.714zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="&#xe607;" d="M658.286 475.428q0 105.714-75.143 180.857t-180.857 75.143-180.857-75.143-75.143-180.857 75.143-180.857 180.857-75.143 180.857 75.143 75.143 180.857zM950.857 0q0-29.714-21.714-51.429t-51.429-21.714q-30.857 0-51.429 21.714l-196 195.429q-102.286-70.857-228-70.857-81.714 0-156.286 31.714t-128.571 85.714-85.714 128.571-31.714 156.286 31.714 156.286 85.714 128.571 128.571 85.714 156.286 31.714 156.286-31.714 128.571-85.714 85.714-128.571 31.714-156.286q0-125.714-70.857-228l196-196q21.143-21.143 21.143-51.429z" horiz-adv-x="951" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

View File

@ -1,28 +0,0 @@
# Errors
> API response structure
```json
{
"error": "Descriptive error message"
}
```
The Docker Cloud API uses the following error codes:
Error Code | Meaning
---------- | -------
400 | Bad Request -- There's a problem in the content of your request. Retrying the same request will fail.
401 | Unauthorized -- Your API key is wrong or your account has been deactivated.
402 | Payment Required -- You need to provide billing information to perform this request.
403 | Forbidden -- Quota limit exceeded. Contact support to request a quota increase.
404 | Not Found -- The requested object cannot be found.
405 | Method Not Allowed -- The endpoint requested does not implement the method sent.
409 | Conflict -- The object cannot be created or updated because another object exists with the same unique fields
415 | Unsupported Media Type -- Make sure you are using `Accept` and `Content-Type` headers as `application/json` and that the data your are `POST`-ing or `PATCH`-ing is in valid JSON format.
429 | Too Many Requests -- You are being throttled because of too many requests in a short period of time.
500 | Internal Server Error -- There was a server error while processing your request. Try again later, or contact support.
503 | Service Unavailable -- We're temporarily offline for maintenance. Try again later.
504 | Gateway Timeout -- Our API servers are at full capacity. Try again later.

View File

@ -1,353 +0,0 @@
# Actions
## Action
> Example
```json
{
"action": "Cluster Create",
"end_date": "Wed, 17 Sep 2014 08:26:22 +0000",
"ip": "56.78.90.12",
"is_user_action": true,
"can_be_canceled": false,
"location": "New York, USA",
"method": "POST",
"object": "/api/infra/v1/user_namespace/cluster/eea638f4-b77a-4183-b241-22dbd7866f22/",
"path": "/api/infra/v1/user_namespace/cluster/",
"resource_uri": "/api/audit/v1/action/6246c558-976c-4df6-ba60-eb1a344a17af/",
"start_date": "Wed, 17 Sep 2014 08:26:22 +0000",
"state": "Success",
"user": "user_namespace",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2",
"uuid": "6246c558-976c-4df6-ba60-eb1a344a17af"
}
```
An action represents an API call by a user. Details of the API call such as timestamp, origin IP address, and user agent are logged in the action object.
Simple API calls that do not require asynchronous execution will return immediately with the appropriate HTTP error code and an action object will be created either in `Success` or `Failed` states. API calls that do require asynchronous execution will return HTTP code `202 Accepted` immediately and create an action object in `In progress` state, which will change to `Success` or `Failed` state depending on the outcome of the operation being performed. In both cases the response will include a `X-DockerCloud-Action-URI` header with the resource URI of the created action.
### Attributes
| Attribute | Description |
|:----------------|:-----------------------------------------------------------------------------------|
| resource_uri | A unique API endpoint that represents the action |
| uuid | A unique identifier for the action generated automatically on creation |
| object | The API object (resource URI) to which the action applies to |
| action | Name of the operation performed/being performed |
| method | HTTP method used to access the API |
| path | HTTP path of the API accessed |
| user | The user authenticated in the request that created the action |
| user_agent | The user agent provided by the client when accessing the API endpoint |
| start_date | Date and time when the API call was performed and the operation started processing |
| end_date | Date and time when the API call finished processing |
| state | State of the operation (see table below) |
| ip | IP address of the user that performed the API call |
| location | Geographic location of the IP address of the user that performed the API call |
| is_user_action | If the action has been triggered by the user |
| can_be_canceled | If the action can be canceled by the user in the middle of its execution |
| can_be_retried | If the action can be retried by the user |
### Action states
| State | Description |
|:------------|:---------------------------------------------------------------------------------------------|
| Pending | The action needed asynchronous execution and it is waiting for an in progress action |
| In progress | The action needed asynchronous execution and is being performed |
| Canceling | The action is being canceled by user request |
| Canceled | The action has been canceled |
| Success | The action was executed successfully |
| Failed | There was an issue when the action was being performed. Check the logs for more information. |
## List all actions
```python
import dockercloud
actions = dockercloud.Action.list()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
actionList, err := dockercloud.ListActions()
if err != nil {
log.Println(err)
}
log.Println(actionList)
```
```http
GET /api/audit/v1/action/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud action ls
```
Lists all actions in chronological order. Returns a list of `Action` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/audit/v1/action/`
### Query Parameters
| Parameter | Description |
|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| uuid | Filter by UUID. |
| state | Filter by state. Possible values: `In progress`, `Success`, `Failed` |
| start_date | Filter by start date. Valid filtering values are `start_date__gte` (after or on the date supplied) and `start_date__lte` (before or on the date supplied) |
| end_date | Filter by end date. Valid filtering values are `end_date__gte` (after or on the date supplied) and `end_date__lte` (before or on the date supplied) |
| object | Filter by resource URI of the related object. This filter can only be combined with 'include_related' filter |
| include_related | There is a parent-child relationship between Docker Cloud objects, described in table `Relationships between Docker Cloud objects`. If set to 'true', will include the actions of the related objects to the object specified in "object" filter parameter. Possible values: 'true' or 'false' |
## Relationships between Docker Cloud objects
| Object | Relationships |
|:-------------|:-------------------------------------------------------------------------------|
| Container | Container, service, stack (if any) |
| Service | All containers in the service, service, stack (if any) |
| Stack | All services in the stack, all containers in every service in the stack, stack |
| Node | Node, node cluster (if any) |
| Node cluster | All nodes in the cluster, node cluster |
## Get an action by UUID
```python
import dockercloud
action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
log.Println(action)
```
```http
GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud action inspect 7eaf7fff
```
Get all the details of an specific action
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/audit/v1/action/(uuid)/`
### Path Parameters
| Parameter | Description |
|:----------|:-----------------------------------|
| uuid | The UUID of the action to retrieve |
## Get the logs of an action
> Example log line
```json
{
"type": "log",
"log": "Log line from the action",
"timestamp": 1433779324
}
```
```python
import dockercloud
def log_handler(message):
print message
action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
action.logs(tail=300, follow=True, log_handler=log_handler)
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
c := make(chan dockercloud.Logs)
action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
go action.GetLogs(c)
for {
log.Println(<-c)
}
```
```http
GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
Host: ws.cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Connection: Upgrade
Upgrade: websocket
```
```shell
docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
```
Get the logs of the specified action.
### Endpoint Type
Available in Docker Cloud's **STREAM API**
### HTTP Request
`GET /api/audit/v1/action/(uuid)/logs/`
### Path Parameters
| Parameter | Description |
|:----------|:----------------------------------------|
| uuid | The UUID of the action to retrieve logs |
### Query Parameters
| Parameter | Description |
|:----------|:---------------------------------------------------------------------------|
| tail | Number of lines to show from the end of the logs (default: `300`) |
| follow | Whether to stream logs or close the connection immediately (default: true) |
## Cancel an action
```http
POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/cancel/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
action, err = action.Cancel()
if err != nil {
log.Println(err)
}
log.Println(action)
```
Cancels an action in Pending or In progress state.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/audit/v1/action/(uuid)/cancel/`
### Path Parameters
| Parameter | Description |
|:----------|:---------------------------------|
| uuid | The UUID of the action to cancel |
## Retry an action
```python
import dockercloud
def log_handler(message):
print message
action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
action.logs(tail=300, follow=True, log_handler=log_handler)
```
```http
POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/retry/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
action, err = action.Retry()
if err != nil {
log.Println(err)
}
log.Println(action)
```
```shell
docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
```
Retries an action in Success, Failed or Canceled state.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/audit/v1/action/(uuid)/retry/`
### Path Parameters
| Parameter | Description |
|:----------|:--------------------------------|
| uuid | The UUID of the action to retry |

View File

@ -1,120 +0,0 @@
# Availability Zones
## Availability Zone
> Example
```json
{
"available": true,
"name": "ap-northeast-1a",
"region": "/api/infra/v1/region/az/ap-northeast-1/",
"resource_uri": "/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/"
}
```
An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS
### Attributes
Attribute | Description
--------- | -----------
available | Whether the availability zone is currently available for new node deployments
name | An identifier for the availability zone
region | The resource URI of the region where the availability zone is allocated
resource_uri | A unique API endpoint that represents the zone
## List all availability zones
```python
import dockercloud
az = dockercloud.AZ.list()
```
```http
GET /api/infra/v1/az/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
az, err := dockercloud.ListAZ()
if err != nil {
log.Println(err)
}
log.Println(az)
```
```shell
docker-cloud nodecluster az
```
Lists all availability zones from all regions of all supported cloud providers. Returns a list of `Availability Zone` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/az/`
### Query Parameters
Parameter | Description
--------- | -----------
name | Filter by availability zone name
region | Filter by resource URI of the target region
## Get an individual availability zone
```python
import dockercloud
az = dockercloud.AZ.fetch("aws/sa-east-1/sa-east-1a")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
az, err := dockercloud.GetAZ("aws/sa-east-1/sa-east-1a")
if err != nil {
log.Println(err)
}
log.Println(az)
```
```http
GET /api/infra/v1/az/aws/sa-east-1/sa-east-1a/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
Get all the details of a specific availability zone
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/`
### Path Parameters
Parameter | Description
--------- | -----------
name | The name of the availability zone to retrieve
provider | The name of the provider
region | The name of the region

View File

@ -1,827 +0,0 @@
# Containers
## Container
> Example
```json
{
"autodestroy": "OFF",
"autorestart": "OFF",
"bindings": [
{
"volume": "/api/infra/v1/user_namespace/volume/1863e34d-6a7d-4945-aefc-8f27a4ab1a9e/",
"host_path": null,
"container_path": "/data",
"rewritable": true
},
{
"volume": null,
"host_path": "/etc",
"container_path": "/etc",
"rewritable": true
}
],
"cap_add": [
"ALL"
],
"cap_drop": [
"NET_ADMIN",
"SYS_ADMIN"
],
"container_envvars": [
{
"key": "DB_1_ENV_DEBIAN_FRONTEND",
"value": "noninteractive"
},
{
"key": "DB_1_ENV_MYSQL_PASS",
"value": "**Random**"
},
{
"key": "DB_1_ENV_MYSQL_USER",
"value": "admin"
},
{
"key": "DB_1_ENV_PATH",
"value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
},
{
"key": "DB_1_ENV_REPLICATION_MASTER",
"value": "**False**"
},
{
"key": "DB_1_ENV_REPLICATION_PASS",
"value": "replica"
},
{
"key": "DB_1_ENV_REPLICATION_SLAVE",
"value": "**False**"
},
{
"key": "DB_1_ENV_REPLICATION_USER",
"value": "replica"
},
{
"key": "DB_1_PORT",
"value": "tcp://172.16.0.3:3306"
},
{
"key": "DB_1_PORT_3306_TCP",
"value": "tcp://172.16.0.3:3306"
},
{
"key": "DB_1_PORT_3306_TCP_ADDR",
"value": "172.16.0.3"
},
{
"key": "DB_1_PORT_3306_TCP_PORT",
"value": "3306"
},
{
"key": "DB_1_PORT_3306_TCP_PROTO",
"value": "tcp"
},
{
"key": "DB_ENV_DEBIAN_FRONTEND",
"value": "noninteractive"
},
{
"key": "DB_ENV_MYSQL_PASS",
"value": "**Random**"
},
{
"key": "DB_ENV_MYSQL_USER",
"value": "admin"
},
{
"key": "DB_ENV_PATH",
"value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
},
{
"key": "DB_ENV_REPLICATION_MASTER",
"value": "**False**"
},
{
"key": "DB_ENV_REPLICATION_PASS",
"value": "replica"
},
{
"key": "DB_ENV_REPLICATION_SLAVE",
"value": "**False**"
},
{
"key": "DB_ENV_REPLICATION_USER",
"value": "replica"
},
{
"key": "DB_PASS",
"value": "szVaPz925B7I"
},
{
"key": "DB_PORT",
"value": "tcp://172.16.0.3:3306"
},
{
"key": "DB_PORT_3306_TCP",
"value": "tcp://172.16.0.3:3306"
},
{
"key": "DB_PORT_3306_TCP_ADDR",
"value": "172.16.0.3"
},
{
"key": "DB_PORT_3306_TCP_PORT",
"value": "3306"
},
{
"key": "DB_PORT_3306_TCP_PROTO",
"value": "tcp"
},
{
"key": "DB_DOCKERCLOUD_API_URL",
"value": "https://cloud.docker.com/api/app/v1/user_namespace/service/c0fed1dc-c528-40c9-aa4c-dc00672ebcbf/"
}
],
"container_ports": [
{
"endpoint_uri": "http://wordpress-stackable-1.admin.cont.dockerapp.io:49153/",
"inner_port": 80,
"outer_port": 49153,
"port_name": "http",
"protocol": "tcp",
"published": true,
"uri_protocol": "http"
}
],
"cpu_shares": 100,
"cpuset": "0,1",
"cgroup_parent": "m-executor-abcd",
"deployed_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
"destroyed_datetime": null,
"devices": [
"/dev/ttyUSB0:/dev/ttyUSB0"
],
"dns": [
"8.8.8.8"
],
"dns_search": [
"example.com",
"c1dd4e1e-1356-411c-8613-e15146633640.local.dockerapp.io"
],
"domainname": "domainname",
"entrypoint": "",
"exit_code": null,
"exit_code_msg": null,
"extra_hosts": [
"onehost:50.31.209.229"
],
"hostname": "hostname",
"image_name": "tutum/wordpress-stackable:latest",
"labels": {
"com.example.description": "Accounting webapp",
"com.example.department": "Finance",
"com.example.label-with-empty-value": ""
},
"linked_to_container": [
{
"endpoints": {
"3306/tcp": "tcp://172.16.0.3:3306"
},
"from_container": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
"name": "DB_1",
"to_container": "/api/app/v1/user_namespace/container/ba434e1e-1234-411c-8613-e15146633640/"
}
],
"link_variables": {
"WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
"WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
"WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
"WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
"WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
"WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
"WORDPRESS_STACKABLE_1_ENV_HOME": "/",
"WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"WORDPRESS_STACKABLE_1_PORT": "tcp://172.16.0.2:80",
"WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://172.16.0.2:80",
"WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "172.16.0.2",
"WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "80",
"WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
"WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
"WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
"WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
"WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
"WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
"WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
"WORDPRESS_STACKABLE_ENV_HOME": "/",
"WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"WORDPRESS_STACKABLE_PORT": "tcp://172.16.0.2:80",
"WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://172.16.0.2:80",
"WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "172.16.0.2",
"WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "80",
"WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp"
},
"mac_address": "02:42:ac:11:65:43",
"memory": 1024,
"memory_swap": 4096,
"name": "wordpress-stackable",
"net": "bridge",
"node": "/api/infra/v1/user_namespace/node/9691c44e-3155-4ca2-958d-c9571aac0a14/",
"pid": "none",
"private_ip": "10.7.0.1",
"privileged": false,
"public_dns": "wordpress-stackable-1.admin.cont.dockerapp.io",
"read_only": true,
"resource_uri": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
"roles": ["global"],
"run_command": "/run-wordpress.sh",
"security_opt": [
"label:user:USER",
"label:role:ROLE"
],
"service": "/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/",
"started_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
"state": "Running",
"stdin_open": false,
"stopped_datetime": null,
"synchronized": true,
"tty": false,
"user": "root",
"uuid": "c1dd4e1e-1356-411c-8613-e15146633640",
"working_dir": "/app"
}
```
A container is a representation of a Docker container in a node.
This is a [namespaced endpoint](#namespaced-endpoints).
### Attributes
Attribute | Description
--------- | -----------
uuid | A unique identifier for the container generated automatically on creation
resource_uri | A unique API endpoint that represents the container
image_name | The Docker image name and tag of the container
bindings | A list of volume bindings that the container has mounted (see table `Container Binding attributes` below)
name | A user provided name for the container (inherited from the service)
node | The resource URI of the node where this container is running
service | The resource URI of the service which this container is part of
public_dns | The external FQDN of the container
state | The state of the container (see table `Container states` below)
synchronized | Flag indicating if the container is synchronized with the current service definition.
exit_code | The numeric exit code of the container (if applicable, `null` otherwise)
exit_code_msg | A string representation of the exit code of the container (if applicable, `null` otherwise)
deployed_datetime | The date and time of the last deployment of the container (if applicable, `null` otherwise)
started_datetime | The date and time of the last `start` operation on the container (if applicable, `null` otherwise)
stopped_datetime | The date and time of the last `stop` operation on the container (if applicable, `null` otherwise)
destroyed_datetime | The date and time of the `terminate` operation on the container (if applicable, `null` otherwise)
container_ports | List of published ports of this container (see table `Container Port attributes` below)
container_envvars | List of user-defined environment variables set on the containers of the service, which will override the container environment variables (see table `Container Environment Variable attributes` below)
labels | Container metadata in form of dictionary
working_dir | Working directory for running binaries within a container
user | User used on the container on launch
hostname | Hostname used on the container on launch
domainname | Domainname used on the container on launch
mac_address | Ethernet device's MAC address used on the container on launch
cgroup_name | Optional parent cgroup for the container.
tty | If the container has the tty enable
stdin_open | If the container has stdin opened
dns | Container custom DNS servers
dns_search | Container custom DNS search domain
cap_add | Container added capabilities
cap_drop | Container dropped capabilities
devices | List of container device mappings
extra_hosts | List of container hostname mappings
secuirty_opt | Labeling scheme of this container
entrypoint | Entrypoint used on the container on launch
run_command | Run command used on the container on launch
cpu_shares | The relative CPU priority of the container (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information)
cpuset | CPUs in which execution is allowed
memory | The memory limit of the container in MB (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information)
memory_swap | Total memory limit (memory + swap) of the container in MB
autorestart | Whether to restart the container automatically if it stops (see [Crash recovery](/docker-cloud/apps/autorestart/) for more information)
autodestroy | Whether to terminate the container automatically if it stops (see [Autodestroy](/docker-cloud/apps/auto-destroy/) for more information)
roles | List of Docker Cloud roles assigned to this container (see [API roles](/docker-cloud/apps/api-roles/) for more information))
linked_to_container | List of IP addresses of the linked containers (see table `Container Link attributes` below and [Service links](/docker-cloud/apps/service-links/) for more information)
link_variables | List of environment variables that would be exposed in any container that is linked to this one
privileged | Whether the container has Docker's `privileged` flag set or not (see [Runtime privilege](/engine/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration) for more information)
read_only | Whether the container filesystem is read-only or not
private_ip | IP address of the container on the overlay network. This IP will be reachable from any other container.
net | Network mode set on the container (see table `Network Modes` below, [more information](/engine/reference/run/#network-settings))
pid | PID (Process) Namespace mode for the container ([more information](/engine/reference/run/#pid-settings-pid))
### Container Binding attributes
Attribute | Description
--------- | -----------
host_path | The host path of the volume
container_path | The container path where the volume is mounted
rewritable | `true` is the volume has writable permissions
volume | The resource URI of the volume
### Container Port attributes
Attribute | Description
--------- | -----------
protocol | The protocol of the port, either `tcp` or `udp`
inner_port | The published port number inside the container
outer_port | The published port number in the node public network interface
port_name | Name of the service associated to this port
uri_protocol | The protocol to be used in the endpoint for this port, such as `http`
endpoint_uri | The URI of the endpoint for this port
published | Whether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
### Container Environment Variable attributes
Attribute | Description
--------- | -----------
key | The name of the environment variable
value | The value of the environment variable
### Container States
State | Description
----- | -----------
Starting | The container is being deployed or started (from Stopped). No actions allowed in this state.
Running | The container is deployed and running. Possible actions in this state: `stop`, `terminate`.
Stopping | The container is being stopped. No actions allowed in this state.
Stopped | The container is stopped. Possible actions in this state: `start`, `terminate`.
Terminating | The container is being deleted. No actions allowed in this state.
Terminated | The container has been deleted. No actions allowed in this state.
### Network Modes
Strategy | Description
-------- | -----------
bridge | Creates a new network stack for the container on the docker bridge.
host | Uses the host network stack inside the container.
### Container Link attributes
Attribute | Description
--------- | -----------
name | The name given to the link
from_container | The resource URI of the "client" container
to_container | The resource URI of the "server" container being linked
endpoints | A dictionary with the endpoints (protocol, IP and port) to be used to reach each of the "server" container exposed ports
## List all containers
```python
import dockercloud
containers = dockercloud.Container.list()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
containerList, err := dockercloud.ListContainers()
if err != nil {
log.Println(err)
}
log.Println(containerList)
```
```http
GET /api/app/v1/container/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container ps
```
Lists all current and recently terminated containers. Returns a list of `Container` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/app/v1/[optional_namespace/]container/`
### Query Parameters
Parameter | Description
--------- | -----------
uuid | Filter by UUID
state | Filter by state. Possible values: `Starting`, `Running`, `Stopping`, `Stopped`, `Terminating`, `Terminated`
name | Filter by container name
service | Filter by resource URI of the target service.
node | Filter by resource URI of the target node.
## Get an existing container
```python
import dockercloud
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockerckoud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
log.Println(container)
```
```http
GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container inspect 7eaf7fff
```
Get all the details of an specific container
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/app/v1/[optional_namespace/]container/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to retrieve
## Get the logs of a container
> Example log line
```json
{
"type": "log",
"log": "Log line from the container",
"streamType": "stdout",
"timestamp": 1433779324
}
```
```python
import dockercloud
def log_handler(message):
print message
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.logs(tail=300, follow=True, log_handler=log_handler)
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("447ecddc-2890-4ea2-849b-99392e0dd7a6")
if err != nil {
log.Fatal(err)
}
c := make(chan dockercloud.Logs)
go container.Logs(c)
for {
s := <-c
log.Println(s)
}
```
```http
GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
Host: ws.cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Connection: Upgrade
Upgrade: websocket
```
```shell
docker-cloud container logs 7eaf7fff
```
Get the logs of the specified container.
### Endpoint Type
Available in Docker Cloud's **STREAM API**
### HTTP Request
`GET /api/app/v1/[optional_namespace/]container/(uuid)/logs/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to retrieve logs
### Query Parameters
Parameter | Description
--------- | -----------
tail | Number of lines to show from the end of the logs (default: `300`)
follow | Whether to stream logs or close the connection immediately (default: true)
service | Filter by service (resource URI)
## Start a container
```python
import dockercloud
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.start()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = container.Start(); err != nil {
log.Println(err)
}
```
```http
POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container start 7eaf7fff
```
Starts a stopped container.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/app/v1/[optional_namespace/]container/(uuid)/start/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to start
## Stop a container
```python
import dockercloud
container = dockerlcoud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.stop()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = container.Stop(); err != nil {
log.Println(err)
}
```
```http
POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container stop 7eaf7fff
```
Stops a running container.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/app/v1/[optional_namespace/]container/(uuid)/stop/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to stop
## Redeploy a container
```python
import dockercloud
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.redeploy()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true) to reuse the existing volumes
//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
if err = container.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
log.Println(err)
}
```
```http
POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container redeploy 7eaf7fff
```
Redeploys a container.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/app/v1/[optional_namespace/]container/(uuid)/redeploy/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to redeploy
### Query Parameters
Parameter | Description
--------- | -----------
reuse_volumes | Whether to reuse container volumes for this redeploy operation or not (default: `true`).
## Terminate a container
```python
import dockercloud
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.delete()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = container.Terminate(); err != nil {
log.Println(err)
}
```
```http
DELETE /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud container terminate 7eaf7fff
```
Terminates the specified container. This is not reversible. All data stored in the container will be permanently deleted.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`DELETE /api/app/v1/[optional_namespace/]container/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container to terminate
## Execute command inside a container
```
import dockercloud
def msg_handler(message):
print message
container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
container.execute("ls", handler=msg_handler)
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
c := make(chan dockercloud.Exec)
container.Exec("ls", c)
```
```http
GET /api/app/v1/container/(uuid)/exec/ HTTP/1.1
Host: ws.cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Connection: Upgrade
Upgrade: websocket
```
```
docker-cloud exec 7eaf7fff ls
```
Executes a command inside the specified running container, creating a bi-directional stream for the process' standard input and output. This endpoint can be connected to using a bi-directional Secure Web Socket `wss://ws.cloud.docker.com/api/app/v1/container/(uuid)/exec/`
### Endpoint Type
Available in Docker Cloud's **STREAM API**
### HTTP Request
`GET /api/app/v1/[optional_namespace/]container/(uuid)/exec/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the container where the command will be executed
### Query Parameters
Parameter | Description
--------- | -----------
command | Command to be executed (default: `sh`)

View File

@ -1,135 +0,0 @@
# Docker Cloud Events
## Docker Cloud Event
> Example
```json
{
"type": "action",
"action": "update",
"parents": [
"/api/app/v1/user_namespace/container/0b0e3538-88df-4f07-9aed-3a3cc4175076/"
],
"resource_uri": "/api/app/v1/user_namespace/action/49f0efe8-a704-4a10-b02f-f96344fabadd/",
"state": "Success",
"uuid": "093ba3bb-08dd-48f0-8f12-4d3b85ef85b3",
"datetime": "2016-02-01T16:47:28Z"
}
```
Docker Cloud events are generated every time any of the following objects is created or changes state:
* Stack
* Service
* Container
* Node Cluster
* Node
* Action
This is a [namespaced endpoint](#namespaced-endpoints).
### Attributes
| Attribute | Description |
|:-------------|:---------------------------------------------------------------------------------------------------------------------------------|
| type | Type of object that was created or updated. For possible values, check the [events types](#event-types) table below. |
| action | Type of action that was executed on the object. Possible values: `create`, `update` or `delete` |
| parents | List of resource URIs (REST API) of the parents of the object, according to the "Parent-child hierarchy" table below |
| resource_uri | Resource URI (REST API) of the object that was created or updated. You can do a `GET` operation on this URL to fetch its details |
| state | The current state of the object |
| uuid | Unique identifier for the event |
| datetime | Date and time of the event in ISO 8601 format |
### Event types
| Type | Description |
|:------------|:-----------------------------------------------------------------------------------------------|
| stack | Whenever a `Stack` is created or updated |
| service | Whenever a `Service` is created or updated |
| container | Whenever a `Container` is created or updated |
| nodecluster | Whenever a `Node Cluster` is created or updated |
| node | Whenever a `Node` is created or updated |
| action | Whenever a `Action` is created or updated |
| error | Sent when an error occurs on the websocket connection or as part of the authentication process |
### Parent-child hierarchy
| Object type | Parent types |
|:-------------|:----------------------------------------|
| Stack | (None) |
| Service | Stack |
| Container | Service, Stack, Node, Node Cluster |
| Node Cluster | (None) |
| Node | Node Cluster |
| Action | (object to which the action applies to) |
## Listen to new Docker Cloud Events
```python
import dockercloud
def process_event(event):
print event
events = dockercloud.Events()
events.on_message(process_event)
events.run_forever()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
// Listens for container events only
myFilter := dockercloud.NewStreamFilter(&dockercloud.EventFilter{Type: "container"})
stream := dockercloud.NewStream(myFilter)
if err := stream.Connect(); err == nil {
go stream.RunForever()
} else {
log.Print("Connect err: " + err.Error())
}
for {
select {
case event := <-stream.MessageChan:
log.Println(event)
case err := <-stream.ErrorChan:
log.Println(err)
}
}
```
```http
GET /api/audit/v1/events/ HTTP/1.1
Host: ws.cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Connection: Upgrade
Upgrade: websocket
```
```shell
docker-cloud event
```
Listens for new Docker Cloud Events
### Endpoint Type
Available in Docker Cloud's **STREAM API**
### HTTP Request
`GET /api/audit/v1/[optional_namespace/]events/`
### Query Parameters
Parameter | Description
--------- | -----------
type | Filter by type
object | Filter by object resource URI
parent | Filter by object parents

View File

@ -1,370 +0,0 @@
# Nodes
## Node
> Example
```json
{
"availability_zone": "/api/infra/v1/az/testing-provider/testing-region/testing-az/",
"cpu": 1,
"current_num_containers": 4,
"deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
"destroyed_datetime": null,
"disk": 60,
"docker_execdriver": "native-0.2",
"docker_graphdriver": "aufs",
"docker_version": "1.5.0",
"external_fqdn": "fc1a5bb9-user.node.dockerapp.io",
"last_seen": "Thu, 25 Sep 2014 13:14:44 +0000",
"memory": 1792,
"nickname": "fc1a5bb9-user.node.dockerapp.io",
"node_cluster": "/api/infra/v1/user_namespace/nodecluster/d787a4b7-d525-4061-97a0-f423e8f1d229/",
"node_type": "/api/infra/v1/user_namespace/nodetype/testing-provider/testing-type/",
"public_ip": "10.45.2.11",
"region": "/api/infra/v1/region/testing-provider/testing-region/",
"resource_uri": "/api/infra/v1/user_namespace/node/fc1a5bb9-17f5-4819-b667-8c7cd819e949/",
"state": "Deployed",
"tags": [
{"name": "tag_one"},
{"name": "tag-two"}
],
"tunnel": "https://tunnel01.cloud.docker.com:12345",
"uuid": "fc1a5bb9-17f5-4819-b667-8c7cd819e949"
}
```
A node is a virtual machine provided by a cloud provider where containers can be deployed.
This is a [namespaced endpoint](#namespaced-endpoints).
### Attributes
Attribute | Description
--------- | -----------
availability_zone | The resource URI of the availability zone where the node is deployed, if any
uuid | A unique identifier for the node generated automatically on creation
resource_uri | A unique API endpoint that represents the node
external_fqdn | An automatically generated FQDN for the node. Containers deployed on this node will inherit this FQDN.
state | The state of the node. See the below table for a list of possible states.
node_cluster | The resource URI of the node cluster to which this node belongs to (if applicable)
node_type | The resource URI of the node type used for the node
region | The resource URI of the region where the node is deployed
docker_execdriver | Docker's execution driver used in the node
docker_graphdriver | Docker's storage driver used in the node
docker_version | Docker's version used in the node
cpu | Node number of CPUs
disk | Node storage size in GB
memory | Node memory in MB
current_num_containers | The actual number of containers deployed in this node
last_seen | Date and time of the last time the node was contacted by Docker Cloud
public_ip | The public IP allocated to the node
tunnel | If the node does not accept incoming connections to port 2375, the address of the reverse tunnel to access the docker daemon, or `null` otherwise
deployed_datetime | The date and time when this node cluster was deployed
destroyed_datetime | The date and time when this node cluster was terminated (if applicable)
tags | List of tags to identify the node when deploying services (see [Tags](/docker-cloud/apps/deploy-tags/) for more information)
nickname | A user-friendly name for the node (`external_fqdn` by default)
### Node states
State | Description
----- | -----------
Deploying | The node is being deployed in the cloud provider. No actions allowed in this state.
Deployed | The node is deployed and provisioned and is ready to deploy containers. Possible actions in this state: `terminate`, `docker-upgrade`.
Unreachable | The node is deployed but Docker Cloud cannot connect to the docker daemon. Possible actions in this state: `health-check` and `terminate`.
Upgrading | The node docker daemon is being upgraded. No actions allowed in this state.
Terminating | The node is being terminated in the cloud provider. No actions allowed in this state.
Terminated | The node has been terminated and is no longer present in the cloud provider. No actions allowed in this state.
## List all nodes
```python
import dockercloud
nodes = dockercloud.Node.list()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodeList, err := dockercloud.ListNodes()
if err != nil {
log.Println(err)
}
log.Println(nodeList)
```
```http
GET /api/infra/v1/node/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud node ls
```
Lists all current and recently terminated nodes. Returns a list of `Node` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/[optional_namespace/]node/`
### Query Parameters
Parameter | Description
--------- | -----------
uuid | Filter by UUID
state | Filter by state. Possible values: `Deploying`, `Deployed`, `Unreachable`, `Upgrading`, `Terminating`, `Terminated`
node_cluster | Filter by resource URI of the target node cluster
node_type | Filter by resource URI of the target node type
region | Filter by resource URI of the target region
docker_version | Filter by Docker engine version running in the nodes
## Get an existing node
```python
import dockercloud
node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
log.Println(node)
```
```http
GET /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud node inspect 7eaf7fff
```
Get all the details of an specific node
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/[optional_namespace/]node/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node to retrieve
## Update a node
```python
import dockercloud
node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
node.tags.add(["tag-1"])
node.save()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = node.Update(dockercloud.Node{Tags: []string{{Name: "tag-1"}}}); err != nil {
log.Println(err)
}
```
```http
PATCH /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
{"tags": [{"name": "tag-1"}], "nickname": "dev node"}
```
```shell
docker-cloud tag add -t tag-1 7eaf7fff
docker-cloud tag set -t tag-2 7eaf7fff
```
Names the node with a user-friendly name and/or replaces the old tags for the new list provided.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`PATCH /api/infra/v1/[optional_namespace/]node/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node to retrieve
### JSON Parameters
Parameter | Description
--------- | -----------
nickname | (optional) A user-friendly name for the node (`external_fqdn` by default)
tags | (optional) List of tags the node will have. This operation replaces the user tag list.
## Upgrade Docker Daemon
```python
import dockercloud
node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
node.upgrade_docker()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = node.Upgrade(); err != nil {
log.Println(err)
}
```
```http
POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/docker-upgrade/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud node upgrade 7eaf7fff
```
Upgrades the docker daemon of the node. This will restart your containers on that node. See [Docker upgrade](/docker-cloud/infrastructure/docker-upgrade/) for more information.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/infra/v1/[optional_namespace/]node/(uuid)/docker-upgrade/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node to upgrade
## Perform a health check of a node
```http
POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/health-check/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
Tests connectivity between Docker Cloud and the node. Updates the node status to `Deployed` if the check was successful, or to `Unreachable` otherwise.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/infra/v1/[optional_namespace/]node/(uuid)/health-check/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node to perform the health check to
## Terminate a node
```python
import dockercloud
node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
node.delete()
```
```http
DELETE /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = node.Terminate(); err != nil {
log.Println(err)
}
```
```shell
docker-cloud node rm 7eaf7fff
```
Terminates the specified node.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`DELETE /api/infra/v1/[optional_namespace/]node/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node to terminate

View File

@ -1,412 +0,0 @@
# Node Clusters
## Node Cluster
> Example
```json
{
"current_num_nodes": 1,
"deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
"destroyed_datetime": null,
"disk": 60,
"nickname": "my test cluster",
"name": "TestCluster",
"node_type": "/api/infra/v1/nodetype/aws/t2.micro/",
"nodes": [
"/api/infra/v1/user_namespace/node/75d20367-0948-4f10-8ba4-ffb4d16ed3c6/"
],
"region": "/api/infra/v1/region/aws/us-east-1/",
"resource_uri": "/api/infra/v1/user_namespace/nodecluster/5516df0b-721e-4470-b350-741ff22e63a0/",
"state": "Deployed",
"tags": [
{"name": "tag_one"},
{"name": "tag-two"},
{"name": "tagthree3"}
],
"target_num_nodes": 2,
"uuid": "5516df0b-721e-4470-b350-741ff22e63a0",
"provider_options": {
"vpc": {
"id": "vpc-aa1c70d4",
"subnets": ["subnet-aaa7d94f", "subnet-aa15fa64"],
"security_groups": ["sg-aa1c70d4"]
},
"iam": {
"instance_profile_name": "my_instance_profile"
}
}
}
```
A node cluster is a group of nodes that share the same provider, region and/or availability zone, and node type. They are on the same private network.
This is a [namespaced endpoint](#namespaced-endpoints).
### Attributes
Attribute | Description
--------- | -----------
uuid | A unique identifier for the node cluster generated automatically on creation
resource_uri | A unique API endpoint that represents the node cluster
name | A user provided name for the node cluster
state | The state of the node cluster. See the below table for a list of possible states.
node_type | The resource URI of the node type used for the node cluster
disk | The size of the disk where images and containers are stored (in GB)
nodes | A list of resource URIs of the `Node` objects on the node cluster
region | The resource URI of the `Region` object where the node cluster is deployed
target_num_nodes | The desired number of nodes for the node cluster
current_num_nodes | The actual number of nodes in the node cluster. This may differ from `target_num_nodes` if the node cluster is being deployed or scaled
deployed_datetime | The date and time when this node cluster was deployed
destroyed_datetime | The date and time when this node cluster was terminated (if applicable)
tags | List of tags to identify the node cluster nodes when deploying services (see [Tags](/docker-cloud/apps/deploy-tags/) for more information)
provider_options | Provider-specific extra options for the deployment of the node (see `Provider options` table below for more information)
nickname | A user-friendly name for the node cluster (`name` by default)
### Node Cluster states
State | Description
----- | -----------
Init | The node cluster has been created and has no deployed containers yet. Possible actions in this state: `deploy`, `terminate`.
Deploying | All nodes in the cluster are either deployed or being deployed. No actions allowed in this state.
Deployed | All nodes in the cluster are deployed and provisioned. Possible actions in this state: `terminate`.
Partly deployed | One or more nodes of the cluster are deployed and running. Possible actions in this state: `terminate`.
Scaling | The cluster is either deploying new nodes or terminating existing ones responding to a scaling request. No actions allowed in this state.
Terminating | All nodes in the cluster are either being terminated or already terminated. No actions allowed in this state.
Terminated | The node cluster and all its nodes have been terminated. No actions allowed in this state.
Empty cluster | There are no nodes deployed in this cluster. Possible actions in this state: `terminate`.
### Provider options
You can specify the following options when using the Amazon Web Services provider:
* `vpc`: VPC-related options (optional)
* `id`: AWS VPC identifier of the target VPC where the nodes of the cluster will be deployed (required)
* `subnets`: a list of target subnet identifiers inside selected VPC. If you specify more than one subnet, Docker Cloud will balance among all of them following a high-availability schema (optional)
* `security_groups`: the security group that will be applied to every node of the cluster (optional)
* `iam`: IAM-related options (optional)
* `instance_profile_name`: name of the instance profile (container for instance an IAM role) to attach to every node of the cluster (required)
## List all node clusters
```python
import dockercloud
nodeclusters = dockercloud.NodeCluster.list()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodeclusters, err := dockercloud.ListNodeClusters()
if err != nil {
log.Println(err)
}
log.Println(nodeclusters)
```
```http
GET /api/infra/v1/nodecluster/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud nodecluster ls
```
Lists all current and recently terminated node clusters. Returns a list of `NodeCluster` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/[optional_namespace/]nodecluster/`
### Query Parameters
Parameter | Description
--------- | -----------
uuid | Filter by UUID
state | Filter by state. Possible values: `Init`, `Deploying`, `Deployed`, `Partly deployed`, `Scaling`, `Terminating`, `Terminated`, `Empty cluster`
name | Filter by node cluster name
region | Filter by resource URI of the target region
node_type | Filter by resource URI of the target node type
## Create a new node cluster
```python
import dockercloud
region = dockercloud.Region.fetch("digitalocean/lon1")
node_type = dockercloud.NodeType.fetch("digitalocean/1gb")
nodecluster = dockercloud.NodeCluster.create(name="my_cluster", node_type=node_type, region=region, disk=60)
nodecluster.save()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodecluster, err := dockercloud.CreateNodeCluster(dockercloud.NodeCreateRequest{Name: "my_cluster", Region: "/api/infra/v1/region/digitalocean/lon1/", NodeType: "/api/infra/v1/nodetype/digitalocean/1gb/", Target_num_nodes: 2})
if err != nil {
log.Println(err)
}
log.Println(nodecluster)
```
```http
POST /api/infra/v1/nodecluster/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
Content-Type: application/json
{"name": "my_cluster", "region": "/api/infra/v1/region/digitalocean/lon1/", "node_type": "/api/infra/v1/nodetype/digitalocean/1gb/", "disk": 60}
```
```shell
docker-cloud nodecluster create my_cluster digitalocean lon1 1gb
```
Creates a new node cluster without deploying it.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/infra/v1/[optional_namespace/]nodecluster/`
### JSON Parameters
Parameter | Description
--------- | -----------
name | (required) A user provided name for the node cluster
node_type | (required) The resource URI of the node type to be used for the node cluster
region | (required) The resource URI of the region where the node cluster is to be deployed
disk | (optional) The size of the volume to create where images and containers will be stored, in GB (default: `60`). Not available for Digital Ocean. To create Softlayer nodes you must select one of the following sizes (in GBs): 10, 20, 25, 30, 40, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 500, 750, 1000, 1500 or 2000
nickname | (optional) A user-friendly name for the node cluster (`name` by default)
target_num_nodes | (optional) The desired number of nodes for the node cluster (default: `1`)
tags | (optional) List of tags of the node cluster to be used when deploying services see [Tags](/docker-cloud/apps/deploy-tags/) for more information) (default: `[]`)
provider_options | Provider-specific extra options for the deployment of the node (see table `Provider options` above for more information)
## Get an existing node cluster
```python
import dockercloud
service = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
log.Println(nodecluster)
```
```http
GET /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud nodecluster inspect 7eaf7fff
```
Get all the details of an specific node cluster
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node cluster to retrieve
## Deploy a node cluster
```python
import dockercloud
nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
nodecluster.deploy()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = nodecluster.Deploy(); err != nil {
log.Println(err)
}
```
```http
POST /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/deploy/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
Deploys and provisions a recently created node cluster in the specified region and cloud provider.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`POST /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/deploy/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node cluster to deploy
## Update an existing node cluster
```python
import dockercloud
nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
nodecluster.target_num_nodes = 3
nodecluster.tags.add("tag-1")
nodecluster.save()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = nodecluster.Update(dockercloud.NodeCreateRequest{Target_num_nodes: 4}); err != nil {
log.Println(err)
}
```
```http
PATCH /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
Content-Type: application/json
{"target_num_nodes": 3, "tags": [{"name": "tag-1"}]}
```
```shell
docker-cloud nodecluster scale 7eaf7fff 3
docker-cloud tag add -t tag-1 7eaf7fff
docker-cloud tag set -t tag-2 7eaf7fff
```
Updates the node cluster details and applies the changes automatically.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`PATCH /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node cluster to update
### JSON Parameters
Parameter | Description
--------- | -----------
target_num_nodes | (optional) The number of nodes to scale this node cluster to
tags | (optional) List of tags the node cluster (and nodes within the node cluster) will have. This operation replaces the user tag list.
## Terminate a node cluster
```python
import dockercloud
nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
nodecluster.delete()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
if err != nil {
log.Println(err)
}
if err = nodecluster.Terminate(); err != nil {
log.Println(err)
}
```
```http
DELETE /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
dockercloud nodecluster rm 7eaf7fff
```
Terminates all the nodes in a node cluster and the node cluster itself. This is not reversible.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`DELETE /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/`
### Path Parameters
Parameter | Description
--------- | -----------
uuid | The UUID of the node cluster to terminate

View File

@ -1,137 +0,0 @@
# Node Types
## Node Type
> Example
```json
{
"availability_zones": [],
"available": true,
"label": "1GB",
"name": "1gb",
"provider": "/api/infra/v1/provider/digitalocean/",
"regions": [
"/api/infra/v1/region/digitalocean/ams1/",
"/api/infra/v1/region/digitalocean/sfo1/",
"/api/infra/v1/region/digitalocean/nyc2/",
"/api/infra/v1/region/digitalocean/ams2/",
"/api/infra/v1/region/digitalocean/sgp1/",
"/api/infra/v1/region/digitalocean/lon1/",
"/api/infra/v1/region/digitalocean/nyc3/",
"/api/infra/v1/region/digitalocean/nyc1/"
],
"resource_uri": "/api/infra/v1/nodetype/digitalocean/1gb/"
}
```
A node type is a representation of an instance size supported by a certain cloud provider in a certain region and/or availability zone.
### Attributes
Attribute | Description
--------- | -----------
resource_uri | A unique API endpoint that represents the node type
name | An identifier for the node type
label | A user-friendly name for the node type
regions | A list of resource URIs of the regions to which this node type can be deployed to
availability_zones | A list of resource URIs of the availability zones to which this node type can be deployed to
provider | The resource URI of the provider of the node type
available | Whether the node type is currently available for new node deployments
## List all node types
```python
import dockercloud
nodetypes = dockercloud.NodeType.list()
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodetypeList, err := dockercloud.ListNodeTypes()
if err != nil {
log.Println(err)
}
log.Println(nodetypeList)
```
```http
GET /api/infra/v1/nodetype/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```shell
docker-cloud nodecluster nodetype
```
Lists all node types of all supported cloud providers. Returns a list of `NodeType` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/nodetype/`
### Query Parameters
Parameter | Description
--------- | -----------
name | Filter by node type name
regions | Filter by resource URI of the target regions
availability_zones | Filter by resource URI of the target availability zones
## Get an individual node type
```python
import dockercloud
nodetype = dockercloud.NodeType.fetch("digitalocean/1gb")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
nodetype, err := dockercloud.GetNodeType("digitalocean","1gb")
if err != nil {
log.Println(err)
}
log.Println(nodetype)
```
```http
GET /api/infra/v1/nodetype/digitalocean/1gb/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
Get all the details of a specific node type
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/nodetype/(provider.name)/(name)/`
### Path Parameters
Parameter | Description
--------- | -----------
name | The name of the node type to retrieve
provider.name | The name of the provider of the node type

View File

@ -1,132 +0,0 @@
# Providers
## Provider
> Example
```json
{
"available": true,
"label": "Digital Ocean",
"name": "digitalocean",
"regions": [
"/api/infra/v1/region/digitalocean/ams1/",
"/api/infra/v1/region/digitalocean/ams2/",
"/api/infra/v1/region/digitalocean/ams3/",
"/api/infra/v1/region/digitalocean/lon1/",
"/api/infra/v1/region/digitalocean/nyc1/",
"/api/infra/v1/region/digitalocean/nyc2/",
"/api/infra/v1/region/digitalocean/nyc3/",
"/api/infra/v1/region/digitalocean/sfo1/",
"/api/infra/v1/region/digitalocean/sgp1/"
],
"resource_uri": "/api/infra/v1/provider/digitalocean/"
}
```
A provider is a representation of a cloud provider supported by Docker Cloud. Providers have one or more regions where nodes are deployed.
### Attributes
Attribute | Description
--------- | -----------
resource_uri | A unique API endpoint that represents the provider
name | A unique identifier for the provider
label | A user-friendly name for the provider
regions | A list of resource URIs of the regions available in this provider
available | Whether the provider is currently available for new node deployments
## List all providers
```python
import dockercloud
providers = dockercloud.Provider.list()
```
```http
GET /api/infra/v1/provider/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
providerList, err := dockercloud.ListProviders()
if err != nil {
log.Println(err)
}
log.Println(providerList)
```
```shell
docker-cloud nodecluster provider
```
Lists all supported cloud providers. Returns a list of `Provider` objects.
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/provider/`
### Query Parameters
Parameter | Description
--------- | -----------
name | Filter by provider name
## Get an individual provider
```python
import dockercloud
provider = dockercloud.Provider.fetch("digitalocean")
```
```go
import "github.com/docker/go-dockercloud/dockercloud"
provider, err := dockercloud.GetProvider("digitalocean")
if err != nil {
log.Println(err)
}
log.Println(provider)
```
```http
GET /api/infra/v1/provider/digitalocean/ HTTP/1.1
Host: cloud.docker.com
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Accept: application/json
```
Get all the details of a specific provider
### Endpoint Type
Available in Docker Cloud's **REST API**
### HTTP Request
`GET /api/infra/v1/provider/(name)/`
### Path Parameters
Parameter | Description
--------- | -----------
name | The name of the provider to retrieve

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