From 9c648cf0792bae452053ffe3b41e54db945871fa Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Fri, 5 May 2017 12:50:22 -0700 Subject: [PATCH] Docker 17.05 docs (#3092) * Add Netlify build script * Pull 'edge' stuff from master for now * Add env-regex logging opt (#2688) * Update Dockerfile to pull from 17.05 branch * Update YAML files from 17.05.x branch * Add scaffolding for 17.05 content * Document highlights for 17.05 * Add v1.29 API * Document multi-stage builds --- Dockerfile | 5 +- _data/engine-cli-edge/docker_attach.yaml | 2 +- _data/engine-cli-edge/docker_build.yaml | 432 +++++++----------- _data/engine-cli-edge/docker_commit.yaml | 3 +- .../docker_container_attach.yaml | 4 +- .../docker_container_commit.yaml | 1 - .../docker_container_create.yaml | 36 +- .../docker_container_exec.yaml | 1 - .../docker_container_prune.yaml | 4 - .../engine-cli-edge/docker_container_run.yaml | 36 +- .../docker_container_update.yaml | 2 + _data/engine-cli-edge/docker_create.yaml | 36 +- _data/engine-cli-edge/docker_deploy.yaml | 3 + _data/engine-cli-edge/docker_exec.yaml | 1 - _data/engine-cli-edge/docker_image_build.yaml | 6 +- .../engine-cli-edge/docker_image_import.yaml | 1 - _data/engine-cli-edge/docker_image_prune.yaml | 2 - _data/engine-cli-edge/docker_import.yaml | 1 - _data/engine-cli-edge/docker_inspect.yaml | 7 +- _data/engine-cli-edge/docker_network.yaml | 4 +- .../docker_network_connect.yaml | 1 - .../docker_network_create.yaml | 21 +- _data/engine-cli-edge/docker_network_ls.yaml | 22 +- _data/engine-cli-edge/docker_node_ls.yaml | 35 ++ _data/engine-cli-edge/docker_node_update.yaml | 2 - .../docker_plugin_inspect.yaml | 2 - _data/engine-cli-edge/docker_plugin_ls.yaml | 2 - _data/engine-cli-edge/docker_plugin_set.yaml | 13 +- _data/engine-cli-edge/docker_run.yaml | 59 ++- .../engine-cli-edge/docker_secret_create.yaml | 36 +- .../docker_secret_inspect.yaml | 25 +- _data/engine-cli-edge/docker_secret_ls.yaml | 114 ++++- .../docker_service_create.yaml | 62 +-- .../engine-cli-edge/docker_service_logs.yaml | 13 +- _data/engine-cli-edge/docker_service_ls.yaml | 16 +- .../docker_service_update.yaml | 66 ++- .../engine-cli-edge/docker_stack_deploy.yaml | 3 + _data/engine-cli-edge/docker_stack_rm.yaml | 40 +- .../docker_stack_services.yaml | 2 - _data/engine-cli-edge/docker_stats.yaml | 4 - _data/engine-cli-edge/docker_system.yaml | 2 +- _data/engine-cli-edge/docker_update.yaml | 2 + _data/engine-cli-edge/docker_volume.yaml | 4 +- .../engine-cli-edge/docker_volume_create.yaml | 1 - _data/engine-cli-edge/docker_volume_ls.yaml | 2 - .../engine-cli-edge/docker_volume_prune.yaml | 2 + _data/toc.yaml | 256 ++++++----- _scripts/fetch-upstream-resources.sh | 26 +- edge/index.md | 150 +++++- engine/admin/logging/overview.md | 9 +- engine/api/v1.29/index.html | 35 ++ engine/api/v1.29/redoc.1.11.0.min.js | 44 ++ .../userguide/eng-image/multistage-build.md | 159 +++++++ netlify.sh | 121 +++++ 54 files changed, 1242 insertions(+), 696 deletions(-) create mode 100644 engine/api/v1.29/index.html create mode 100755 engine/api/v1.29/redoc.1.11.0.min.js create mode 100644 engine/userguide/eng-image/multistage-build.md create mode 100755 netlify.sh diff --git a/Dockerfile b/Dockerfile index 4080248bd0a..d5f4a29d24f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,8 @@ COPY . md_source ## To get master from svn the svn branch needs to be 'trunk'. To get a branch from svn it needs to be 'branches/branchname' # Engine -ENV ENGINE_SVN_BRANCH="branches/17.03.x" -ENV ENGINE_BRANCH="17.03.x" +ENV ENGINE_SVN_BRANCH="branches/17.05.x" +ENV ENGINE_BRANCH="17.05.x" # Distribution ENV DISTRIBUTION_SVN_BRANCH="branches/release/2.6" @@ -32,3 +32,4 @@ RUN md_source/_scripts/fetch-upstream-resources.sh \ && rm -rf target/apidocs/layouts \ && find target -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \ && rm -rf md_source + diff --git a/_data/engine-cli-edge/docker_attach.yaml b/_data/engine-cli-edge/docker_attach.yaml index c824f06c690..17c3ba42be7 100644 --- a/_data/engine-cli-edge/docker_attach.yaml +++ b/_data/engine-cli-edge/docker_attach.yaml @@ -1,5 +1,5 @@ command: docker attach -short: Attach to a running container +short: Attach local standard input, output, and error streams to a running container long: |- Use `docker attach` to attach your terminal's standard input, output, and error (or any combination of the three) to a running container using the container's diff --git a/_data/engine-cli-edge/docker_build.yaml b/_data/engine-cli-edge/docker_build.yaml index 7c2c51c8c81..4cb4ed7f42b 100644 --- a/_data/engine-cli-edge/docker_build.yaml +++ b/_data/engine-cli-edge/docker_build.yaml @@ -104,10 +104,8 @@ pname: docker plink: docker.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: build-arg - default_value: '[]' description: Set build-time variables - option: cache-from default_value: '[]' @@ -143,7 +141,6 @@ options: - option: isolation description: Container isolation technology - option: label - default_value: '[]' description: Set metadata for an image - option: memory shorthand: m @@ -181,278 +178,167 @@ options: description: Squash newly built layers into a single new layer - option: tag shorthand: t - default_value: '[]' description: Name and optionally a tag in the 'name:tag' format +- option: target + description: Set the target build stage to build. - option: ulimit default_value: '[]' description: Ulimit options -examples: |- - ### Build with PATH - - ```bash - $ docker build . - - Uploading context 10240 bytes - Step 1/3 : FROM busybox - Pulling repository busybox - ---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/ - Step 2/3 : RUN ls -lh / - ---> Running in 9c9e81692ae9 - total 24 - drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin - drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev - drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc - drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib - lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib - dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc - lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin - dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys - drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp - drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr - ---> b35f4035db3f - Step 3/3 : CMD echo Hello world - ---> Running in 02071fceb21b - ---> f52f38b7823e - Successfully built f52f38b7823e - Removing intermediate container 9c9e81692ae9 - Removing intermediate container 02071fceb21b - ``` - - This example specifies that the `PATH` is `.`, and so all the files in the - local directory get `tar`d and sent to the Docker daemon. The `PATH` specifies - where to find the files for the "context" of the build on the Docker daemon. - Remember that the daemon could be running on a remote machine and that no - parsing of the Dockerfile happens at the client side (where you're running - `docker build`). That means that *all* the files at `PATH` get sent, not just - the ones listed to [*ADD*](../builder.md#add) in the Dockerfile. - - The transfer of context from the local machine to the Docker daemon is what the - `docker` client means when you see the "Sending build context" message. - - If you wish to keep the intermediate containers after the build is complete, - you must use `--rm=false`. This does not affect the build cache. - - ### Build with URL - - ```bash - $ docker build github.com/creack/docker-firefox - ``` - - This will clone the GitHub repository and use the cloned repository as context. - The Dockerfile at the root of the repository is used as Dockerfile. You can - specify an arbitrary Git repository by using the `git://` or `git@` scheme. - - ```bash - $ docker build -f ctx/Dockerfile http://server/ctx.tar.gz - - Downloading context: http://server/ctx.tar.gz [===================>] 240 B/240 B - Step 1/3 : FROM busybox - ---> 8c2e06607696 - Step 2/3 : ADD ctx/container.cfg / - ---> e7829950cee3 - Removing intermediate container b35224abf821 - Step 3/3 : CMD /bin/ls - ---> Running in fbc63d321d73 - ---> 3286931702ad - Removing intermediate container fbc63d321d73 - Successfully built 377c409b35e4 - ``` - - This sends the URL `http://server/ctx.tar.gz` to the Docker daemon, which - downloads and extracts the referenced tarball. The `-f ctx/Dockerfile` - parameter specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used - to build the image. Any `ADD` commands in that `Dockerfile` that refers to local - paths must be relative to the root of the contents inside `ctx.tar.gz`. In the - example above, the tarball contains a directory `ctx/`, so the `ADD - ctx/container.cfg /` operation works as expected. - - ### Build with - - - ```bash - $ docker build - < Dockerfile - ``` - - This will read a Dockerfile from `STDIN` without context. Due to the lack of a - context, no contents of any local directory will be sent to the Docker daemon. - Since there is no context, a Dockerfile `ADD` only works if it refers to a - remote URL. - - ```bash - $ docker build - < context.tar.gz - ``` - - This will build an image for a compressed context read from `STDIN`. Supported - formats are: bzip2, gzip and xz. - - ### Use a .dockerignore file - - ```bash - $ docker build . - - Uploading context 18.829 MB - Uploading context - Step 1/2 : FROM busybox - ---> 769b9341d937 - Step 2/2 : CMD echo Hello world - ---> Using cache - ---> 99cc1ad10469 - Successfully built 99cc1ad10469 - $ echo ".git" > .dockerignore - $ docker build . - Uploading context 6.76 MB - Uploading context - Step 1/2 : FROM busybox - ---> 769b9341d937 - Step 2/2 : CMD echo Hello world - ---> Using cache - ---> 99cc1ad10469 - Successfully built 99cc1ad10469 - ``` - - This example shows the use of the `.dockerignore` file to exclude the `.git` - directory from the context. Its effect can be seen in the changed size of the - uploaded context. The builder reference contains detailed information on - [creating a .dockerignore file](../builder.md#dockerignore-file) - - ### Tag an image (-t) - - ```bash - $ docker build -t vieux/apache:2.0 . - ``` - - This will build like the previous example, but it will then tag the resulting - image. The repository name will be `vieux/apache` and the tag will be `2.0`. - [Read more about valid tags](tag.md). - - You can apply multiple tags to an image. For example, you can apply the `latest` - tag to a newly built image and add another tag that references a specific - version. - For example, to tag an image both as `whenry/fedora-jboss:latest` and - `whenry/fedora-jboss:v2.1`, use the following: - - ```bash - $ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 . - ``` - ### Specify a Dockerfile (-f) - - ```bash - $ docker build -f Dockerfile.debug . - ``` - - This will use a file called `Dockerfile.debug` for the build instructions - instead of `Dockerfile`. - - ```bash - $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug . - $ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod . - ``` - - The above commands will build the current build context (as specified by the - `.`) twice, once using a debug version of a `Dockerfile` and once using a - production version. - - ```bash - $ cd /home/me/myapp/some/dir/really/deep - $ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp - $ docker build -f ../../../../dockerfiles/debug /home/me/myapp - ``` - - These two `docker build` commands do the exact same thing. They both use the - contents of the `debug` file instead of looking for a `Dockerfile` and will use - `/home/me/myapp` as the root of the build context. Note that `debug` is in the - directory structure of the build context, regardless of how you refer to it on - the command line. - - > **Note:** - > `docker build` will return a `no such file or directory` error if the - > file or directory does not exist in the uploaded context. This may - > happen if there is no context, or if you specify a file that is - > elsewhere on the Host system. The context is limited to the current - > directory (and its children) for security reasons, and to ensure - > repeatable builds on remote Docker hosts. This is also the reason why - > `ADD ../file` will not work. - - ### Use a custom parent cgroup (--cgroup-parent) - - When `docker build` is run with the `--cgroup-parent` option the containers - used in the build will be run with the [corresponding `docker run` - flag](../run.md#specifying-custom-cgroups). - - ### Set ulimits in container (--ulimit) - - Using the `--ulimit` option with `docker build` will cause each build step's - container to be started using those [`--ulimit` - flag values](./run.md#set-ulimits-in-container-ulimit). - - ### Set build-time variables (--build-arg) - - You can use `ENV` instructions in a Dockerfile to define variable - values. These values persist in the built image. However, often - persistence is not what you want. Users want to specify variables differently - depending on which host they build an image on. - - A good example is `http_proxy` or source versions for pulling intermediate - files. The `ARG` instruction lets Dockerfile authors define values that users - can set at build-time using the `--build-arg` flag: - - ```bash - $ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 . - ``` - - This flag allows you to pass the build-time variables that are - accessed like regular environment variables in the `RUN` instruction of the - Dockerfile. Also, these values don't persist in the intermediate or final images - like `ENV` values do. - - Using this flag will not alter the output you see when the `ARG` lines from the - Dockerfile are echoed during the build process. - - For detailed information on using `ARG` and `ENV` instructions, see the - [Dockerfile reference](../builder.md). - - ### Optional security options (--security-opt) - - This flag is only supported on a daemon running on Windows, and only supports - the `credentialspec` option. The `credentialspec` must be in the format - `file://spec.txt` or `registry://keyname`. - - ### Specify isolation technology for container (--isolation) - - This option is useful in situations where you are running Docker containers on - Windows. The `--isolation=` option sets a container's isolation - technology. On Linux, the only supported is the `default` option which uses - Linux namespaces. On Microsoft Windows, you can specify these values: - - - | Value | Description | - |-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| - | `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. | - | `process` | Namespace isolation only. | - | `hyperv` | Hyper-V hypervisor partition-based isolation. | - - Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`. - - ### Add entries to container hosts file (--add-host) - - You can add other hosts into a container's `/etc/hosts` file by using one or - more `--add-host` flags. This example adds a static address for a host named - `docker`: - - $ docker build --add-host=docker:10.180.0.1 . - - ### Squash an image's layers (--squash) **Experimental Only** - - Once the image is built, squash the new layers into a new image with a single - new layer. Squashing does not destroy any existing image, rather it creates a new - image with the content of the squashed layers. This effectively makes it look - like all `Dockerfile` commands were created with a single layer. The build - cache is preserved with this method. - - **Note**: using this option means the new image will not be able to take - advantage of layer sharing with other images and may use significantly more - space. - - **Note**: using this option you may see significantly more space used due to - storing two copies of the image, one for the build cache with all the cache - layers in tact, and one for the squashed version. +examples: "### Build with PATH\n\n```bash\n$ docker build .\n\nUploading context 10240 + bytes\nStep 1/3 : FROM busybox\nPulling repository busybox\n ---> e9aa60c60128MB/2.284 + MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/\nStep 2/3 : RUN ls -lh + /\n ---> Running in 9c9e81692ae9\ntotal 24\ndrwxr-xr-x 2 root root 4.0K + Mar 12 2013 bin\ndrwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev\ndrwxr-xr-x + \ 2 root root 4.0K Oct 19 00:19 etc\ndrwxr-xr-x 2 root root + \ 4.0K Nov 15 23:34 lib\nlrwxrwxrwx 1 root root 3 Mar 12 + \ 2013 lib64 -> lib\ndr-xr-xr-x 116 root root 0 Nov 15 23:34 proc\nlrwxrwxrwx + \ 1 root root 3 Mar 12 2013 sbin -> bin\ndr-xr-xr-x 13 root root + \ 0 Nov 15 23:34 sys\ndrwxr-xr-x 2 root root 4.0K Mar 12 + \ 2013 tmp\ndrwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr\n ---> b35f4035db3f\nStep + 3/3 : CMD echo Hello world\n ---> Running in 02071fceb21b\n ---> f52f38b7823e\nSuccessfully + built f52f38b7823e\nRemoving intermediate container 9c9e81692ae9\nRemoving intermediate + container 02071fceb21b\n```\n\nThis example specifies that the `PATH` is `.`, and + so all the files in the\nlocal directory get `tar`d and sent to the Docker daemon. + The `PATH` specifies\nwhere to find the files for the \"context\" of the build on + the Docker daemon.\nRemember that the daemon could be running on a remote machine + and that no\nparsing of the Dockerfile happens at the client side (where you're + running\n`docker build`). That means that *all* the files at `PATH` get sent, not + just\nthe ones listed to [*ADD*](../builder.md#add) in the Dockerfile.\n\nThe transfer + of context from the local machine to the Docker daemon is what the\n`docker` client + means when you see the \"Sending build context\" message.\n\nIf you wish to keep + the intermediate containers after the build is complete,\nyou must use `--rm=false`. + This does not affect the build cache.\n\n### Build with URL\n\n```bash\n$ docker + build github.com/creack/docker-firefox\n```\n\nThis will clone the GitHub repository + and use the cloned repository as context.\nThe Dockerfile at the root of the repository + is used as Dockerfile. You can\nspecify an arbitrary Git repository by using the + `git://` or `git@` scheme.\n\n```bash\n$ docker build -f ctx/Dockerfile http://server/ctx.tar.gz\n\nDownloading + context: http://server/ctx.tar.gz [===================>] 240 B/240 B\nStep 1/3 + : FROM busybox\n ---> 8c2e06607696\nStep 2/3 : ADD ctx/container.cfg /\n ---> e7829950cee3\nRemoving + intermediate container b35224abf821\nStep 3/3 : CMD /bin/ls\n ---> Running in fbc63d321d73\n + ---> 3286931702ad\nRemoving intermediate container fbc63d321d73\nSuccessfully built + 377c409b35e4\n```\n\nThis sends the URL `http://server/ctx.tar.gz` to the Docker + daemon, which\ndownloads and extracts the referenced tarball. The `-f ctx/Dockerfile`\nparameter + specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used\nto build + the image. Any `ADD` commands in that `Dockerfile` that refers to local\npaths must + be relative to the root of the contents inside `ctx.tar.gz`. In the\nexample above, + the tarball contains a directory `ctx/`, so the `ADD\nctx/container.cfg /` operation + works as expected.\n\n### Build with -\n\n```bash\n$ docker build - < Dockerfile\n```\n\nThis + will read a Dockerfile from `STDIN` without context. Due to the lack of a\ncontext, + no contents of any local directory will be sent to the Docker daemon.\nSince there + is no context, a Dockerfile `ADD` only works if it refers to a\nremote URL.\n\n```bash\n$ + docker build - < context.tar.gz\n```\n\nThis will build an image for a compressed + context read from `STDIN`. Supported\nformats are: bzip2, gzip and xz.\n\n### Use + a .dockerignore file\n\n```bash\n$ docker build .\n\nUploading context 18.829 MB\nUploading + context\nStep 1/2 : FROM busybox\n ---> 769b9341d937\nStep 2/2 : CMD echo Hello + world\n ---> Using cache\n ---> 99cc1ad10469\nSuccessfully built 99cc1ad10469\n$ + echo \".git\" > .dockerignore\n$ docker build .\nUploading context 6.76 MB\nUploading + context\nStep 1/2 : FROM busybox\n ---> 769b9341d937\nStep 2/2 : CMD echo Hello + world\n ---> Using cache\n ---> 99cc1ad10469\nSuccessfully built 99cc1ad10469\n```\n\nThis + example shows the use of the `.dockerignore` file to exclude the `.git`\ndirectory + from the context. Its effect can be seen in the changed size of the\nuploaded context. + The builder reference contains detailed information on\n[creating a .dockerignore + file](../builder.md#dockerignore-file)\n\n### Tag an image (-t)\n\n```bash\n$ docker + build -t vieux/apache:2.0 .\n```\n\nThis will build like the previous example, but + it will then tag the resulting\nimage. The repository name will be `vieux/apache` + and the tag will be `2.0`.\n[Read more about valid tags](tag.md).\n\nYou can apply + multiple tags to an image. For example, you can apply the `latest`\ntag to a newly + built image and add another tag that references a specific\nversion.\nFor example, + to tag an image both as `whenry/fedora-jboss:latest` and\n`whenry/fedora-jboss:v2.1`, + use the following:\n\n```bash\n$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 + .\n```\n\n### Specify a Dockerfile (-f)\n\n```bash\n$ docker build -f Dockerfile.debug + .\n```\n\nThis will use a file called `Dockerfile.debug` for the build instructions\ninstead + of `Dockerfile`.\n\n```bash\n$ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug + .\n$ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod .\n```\n\nThe above + commands will build the current build context (as specified by the\n`.`) twice, + once using a debug version of a `Dockerfile` and once using a\nproduction version.\n\n```bash\n$ + cd /home/me/myapp/some/dir/really/deep\n$ docker build -f /home/me/myapp/dockerfiles/debug + /home/me/myapp\n$ docker build -f ../../../../dockerfiles/debug /home/me/myapp\n```\n\nThese + two `docker build` commands do the exact same thing. They both use the\ncontents + of the `debug` file instead of looking for a `Dockerfile` and will use\n`/home/me/myapp` + as the root of the build context. Note that `debug` is in the\ndirectory structure + of the build context, regardless of how you refer to it on\nthe command line.\n\n> + **Note:**\n> `docker build` will return a `no such file or directory` error if the\n> + file or directory does not exist in the uploaded context. This may\n> happen if + there is no context, or if you specify a file that is\n> elsewhere on the Host system. + The context is limited to the current\n> directory (and its children) for security + reasons, and to ensure\n> repeatable builds on remote Docker hosts. This is also + the reason why\n> `ADD ../file` will not work.\n\n### Use a custom parent cgroup + (--cgroup-parent)\n\nWhen `docker build` is run with the `--cgroup-parent` option + the containers\nused in the build will be run with the [corresponding `docker run`\nflag](../run.md#specifying-custom-cgroups).\n\n### + Set ulimits in container (--ulimit)\n\nUsing the `--ulimit` option with `docker + build` will cause each build step's\ncontainer to be started using those [`--ulimit`\nflag + values](./run.md#set-ulimits-in-container-ulimit).\n\n### Set build-time variables + (--build-arg)\n\nYou can use `ENV` instructions in a Dockerfile to define variable\nvalues. + These values persist in the built image. However, often\npersistence is not what + you want. Users want to specify variables differently\ndepending on which host they + build an image on.\n\nA good example is `http_proxy` or source versions for pulling + intermediate\nfiles. The `ARG` instruction lets Dockerfile authors define values + that users\ncan set at build-time using the `--build-arg` flag:\n\n```bash\n$ docker + build --build-arg HTTP_PROXY=http://10.20.30.2:1234 .\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=` option + sets a container's isolation\ntechnology. On Linux, the only supported is the `default` + option which uses\nLinux namespaces. On Microsoft Windows, you can specify these + values:\n\n\n| Value | Description |\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| + `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the + `daemon` does not specify an isolation technology, Microsoft Windows uses `process` + as its default value. |\n| `process` | Namespace isolation only. |\n| + `hyperv` | Hyper-V hypervisor partition-based isolation. |\n\nSpecifying + the `--isolation` flag without a value is the same as setting `--isolation=\"default\"`.\n\n### + Add entries to container hosts file (--add-host)\n\nYou can add other hosts into + a container's `/etc/hosts` file by using one or\nmore `--add-host` flags. This example + adds a static address for a host named\n`docker`:\n\n $ docker build --add-host=docker:10.180.0.1 + .\n\n### Squash an image's layers (--squash) **Experimental Only**\n\n#### Overview\n\nOnce + the image is built, squash the new layers into a new image with a single\nnew layer. + Squashing does not destroy any existing image, rather it creates a new\nimage with + the content of the squashed layers. This effectively makes it look\nlike all `Dockerfile` + commands were created with a single layer. The build\ncache is preserved with this + method.\n\n**Note**: using this option means the new image will not be able to take\nadvantage + of layer sharing with other images and may use significantly more\nspace.\n\n**Note**: + using this option you may see significantly more space used due to\nstoring two + copies of the image, one for the build cache with all the cache\nlayers in tact, + and one for the squashed version.\n\n#### Prerequisites\n\nThe example on this page + is using experimental mode in Docker 1.13.\n\nExperimental mode can be enabled by + using the `--experimental` flag when starting the Docker daemon or setting `experimental: + true` in the `daemon.json` configuration file.\n\nBy default, experimental mode + is disabled. To see the current configuration, use the `docker version` command.\n\n```none\n\nServer:\n + Version: 1.13.1\n API version: 1.26 (minimum version 1.12)\n Go version: go1.7.5\n + Git commit: 092cba3\n Built: Wed Feb 8 06:35:24 2017\n OS/Arch: linux/amd64\n + Experimental: false\n\n [...]\n\n```\n\nTo enable experimental mode, users need + to restart the docker daemon with the experimental flag enabled.\n\n#### Enable + Docker experimental\n\nExperimental features are now included in the standard Docker + binaries as of version 1.13.0. For enabling experimental features, you need to start + the Docker daemon with `--experimental` flag. You can also enable the daemon flag + via /etc/docker/daemon.json. e.g.\n\n```\n\n{\n \"experimental\": true\n}\n\n```\nThen + make sure the experimental flag is enabled:\n\n```bash\n\n$ docker version -f '{{.Server.Experimental}}'\ntrue\n\n```\n\n#### + Build an image with `--squash` argument\n\nThe following is an example of docker + build with `--squash` argument\n\n```Dockerfile\n\nFROM busybox\nRUN echo hello + > /hello\nRUN echo world >> /hello\nRUN touch remove_me /remove_me\nENV HELLO world\nRUN + rm /remove_me\n\n```\nAn image named `test` is built with `--squash` argument.\n\n```bash\n\n$ + docker build --squash -t test .\n\n[...]\n\n```\n\nIf everything is right, the history + will look like this:\n\n```bash\n$ docker history test \n\nIMAGE CREATED + \ CREATED BY SIZE COMMENT\n4e10cb5b4cac + \ 3 seconds ago 12 B + \ merge sha256:88a7b0112a41826885df0e7072698006ee8f621c6ab99fca7fe9151d7b599702 + to sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb\n + \ 5 minutes ago /bin/sh -c rm /remove_me 0 + B\n 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0 + B\n 5 minutes ago /bin/sh -c touch remove_me /remove_me + \ 0 B\n 5 minutes ago /bin/sh -c echo world >> + /hello 0 B\n 6 minutes ago /bin/sh -c echo + hello > /hello 0 B\n 7 weeks ago /bin/sh + -c #(nop) CMD [\"sh\"] 0 B\n 7 weeks ago /bin/sh + -c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB\n\n```\nWe could find that all + layer's name is ``, and there is a new layer with COMMENT `merge`.\n\nTest + the image, check for `/remove_me` being gone, make sure `hello\\nworld` is in `/hello`, + make sure the `HELLO` envvar's value is `world`." diff --git a/_data/engine-cli-edge/docker_commit.yaml b/_data/engine-cli-edge/docker_commit.yaml index affa9f2109b..beab5228e89 100644 --- a/_data/engine-cli-edge/docker_commit.yaml +++ b/_data/engine-cli-edge/docker_commit.yaml @@ -2,7 +2,7 @@ command: docker commit short: Create a new image from a container's changes long: |- It can be useful to commit a container's file changes or settings into a new - image. This allows you debug a container by running an interactive shell, or to + image. This allows you to debug a container by running an interactive shell, or to export a working dataset to another server. Generally, it is better to use Dockerfiles to manage your images in a documented and maintainable way. [Read more about valid image names and tags](tag.md). @@ -27,7 +27,6 @@ options: description: Author (e.g., "John Hannibal Smith ") - option: change shorthand: c - default_value: '[]' description: Apply Dockerfile instruction to the created image - option: message shorthand: m diff --git a/_data/engine-cli-edge/docker_container_attach.yaml b/_data/engine-cli-edge/docker_container_attach.yaml index dc7b6dc8119..57bfb30d8ad 100644 --- a/_data/engine-cli-edge/docker_container_attach.yaml +++ b/_data/engine-cli-edge/docker_container_attach.yaml @@ -1,6 +1,6 @@ command: docker container attach -short: Attach to a running container -long: Attach to a running container +short: Attach local standard input, output, and error streams to a running container +long: Attach local standard input, output, and error streams to a running container usage: docker container attach [OPTIONS] CONTAINER pname: docker container plink: docker_container.yaml diff --git a/_data/engine-cli-edge/docker_container_commit.yaml b/_data/engine-cli-edge/docker_container_commit.yaml index 02372e375ed..20eb407f475 100644 --- a/_data/engine-cli-edge/docker_container_commit.yaml +++ b/_data/engine-cli-edge/docker_container_commit.yaml @@ -10,7 +10,6 @@ options: description: Author (e.g., "John Hannibal Smith ") - option: change shorthand: c - default_value: '[]' description: Apply Dockerfile instruction to the created image - option: message shorthand: m diff --git a/_data/engine-cli-edge/docker_container_create.yaml b/_data/engine-cli-edge/docker_container_create.yaml index d5109f7ea55..0afbd87ac1a 100644 --- a/_data/engine-cli-edge/docker_container_create.yaml +++ b/_data/engine-cli-edge/docker_container_create.yaml @@ -6,11 +6,9 @@ pname: docker container plink: docker_container.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: attach shorthand: a - default_value: '[]' description: Attach to STDIN, STDOUT or STDERR - option: blkio-weight default_value: "0" @@ -20,10 +18,8 @@ options: default_value: '[]' description: Block IO weight (relative device weight) - option: cap-add - default_value: '[]' description: Add Linux capabilities - option: cap-drop - default_value: '[]' description: Drop Linux capabilities - option: cgroup-parent description: Optional parent cgroup for the container @@ -52,19 +48,14 @@ options: default_value: "0" description: CPU shares (relative weight) - option: cpus - default_value: "0.000" description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems description: MEMs in which to allow execution (0-3, 0,1) -- option: credentialspec - description: Credential spec for managed service account (Windows only) - option: device - default_value: '[]' description: Add a host device to the container - option: device-cgroup-rule - default_value: '[]' description: Add a rule to the cgroup allowed devices list - option: device-read-bps default_value: '[]' @@ -82,31 +73,23 @@ options: default_value: "true" description: Skip image verification - option: dns - default_value: '[]' description: Set custom DNS servers - option: dns-opt - default_value: '[]' description: Set DNS options - option: dns-option - default_value: '[]' description: Set DNS options - option: dns-search - default_value: '[]' description: Set custom DNS search domains - option: entrypoint description: Overwrite the default ENTRYPOINT of the image - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: env-file - default_value: '[]' description: Read in a file of environment variables - option: expose - default_value: '[]' description: Expose a port or a range of ports - option: group-add - default_value: '[]' description: Add additional groups to join - option: health-cmd description: Command to run to check health @@ -116,6 +99,10 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + default_value: 0s + description: | + Start period for the container to initialize before starting health-retries countdown (ns|us|ms|s|m|h) (default 0s) - option: health-timeout default_value: 0s description: | @@ -156,21 +143,16 @@ options: description: Kernel memory limit - option: label shorthand: l - default_value: '[]' description: Set meta data on a container - option: label-file - default_value: '[]' description: Read in a line delimited file of labels - option: link - default_value: '[]' description: Add link to another container - option: link-local-ip - default_value: '[]' description: Container IPv4/IPv6 link-local addresses - option: log-driver description: Logging driver for the container - option: log-opt - default_value: '[]' description: Log driver options - option: mac-address description: Container MAC address (e.g., 92:d0:c6:0a:29:33) @@ -188,19 +170,19 @@ options: - option: memory-swappiness default_value: "-1" description: Tune container memory swappiness (0 to 100) +- option: mount + description: Attach a filesystem mount to the container - option: name description: Assign a name to the container - option: net default_value: default description: Connect a container to a network - option: net-alias - default_value: '[]' description: Add network-scoped alias for the container - option: network default_value: default description: Connect a container to a network - option: network-alias - default_value: '[]' description: Add network-scoped alias for the container - option: no-healthcheck default_value: "false" @@ -221,7 +203,6 @@ options: description: Give extended privileges to this container - option: publish shorthand: p - default_value: '[]' description: Publish a container's port(s) to the host - option: publish-all shorthand: P @@ -239,7 +220,6 @@ options: - option: runtime description: Runtime to use for this container - option: security-opt - default_value: '[]' description: Security Options - option: shm-size default_value: "0" @@ -251,13 +231,11 @@ options: default_value: "0" description: Timeout (in seconds) to stop a container - option: storage-opt - default_value: '[]' description: Storage driver options for the container - option: sysctl default_value: map[] description: Sysctl options - option: tmpfs - default_value: '[]' description: Mount a tmpfs directory - option: tty shorthand: t @@ -275,12 +253,10 @@ options: description: UTS namespace to use - option: volume shorthand: v - default_value: '[]' description: Bind mount a volume - option: volume-driver description: Optional volume driver for the container - option: volumes-from - default_value: '[]' description: Mount volumes from the specified container(s) - option: workdir shorthand: w diff --git a/_data/engine-cli-edge/docker_container_exec.yaml b/_data/engine-cli-edge/docker_container_exec.yaml index c7f9156ae00..8d74e2738ca 100644 --- a/_data/engine-cli-edge/docker_container_exec.yaml +++ b/_data/engine-cli-edge/docker_container_exec.yaml @@ -13,7 +13,6 @@ options: description: Override the key sequence for detaching a container - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: interactive shorthand: i diff --git a/_data/engine-cli-edge/docker_container_prune.yaml b/_data/engine-cli-edge/docker_container_prune.yaml index a798c9c720f..055ce4eba54 100644 --- a/_data/engine-cli-edge/docker_container_prune.yaml +++ b/_data/engine-cli-edge/docker_container_prune.yaml @@ -49,7 +49,6 @@ examples: |- The following removes containers created more than 5 minutes ago: ```bash - {% raw %} $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}' CONTAINER ID IMAGE COMMAND CREATED AT STATUS @@ -67,13 +66,11 @@ examples: |- CONTAINER ID IMAGE COMMAND CREATED AT STATUS 61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 44 seconds ago - {% endraw %} ``` The following removes containers created before `2017-01-04T13:10:00`: ```bash - {% raw %} $ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}' CONTAINER ID IMAGE COMMAND CREATED AT STATUS @@ -91,6 +88,5 @@ examples: |- CONTAINER ID IMAGE COMMAND CREATED AT STATUS 53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 9 minutes ago - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_container_run.yaml b/_data/engine-cli-edge/docker_container_run.yaml index 5245d571954..7fd17831565 100644 --- a/_data/engine-cli-edge/docker_container_run.yaml +++ b/_data/engine-cli-edge/docker_container_run.yaml @@ -6,11 +6,9 @@ pname: docker container plink: docker_container.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: attach shorthand: a - default_value: '[]' description: Attach to STDIN, STDOUT or STDERR - option: blkio-weight default_value: "0" @@ -20,10 +18,8 @@ options: default_value: '[]' description: Block IO weight (relative device weight) - option: cap-add - default_value: '[]' description: Add Linux capabilities - option: cap-drop - default_value: '[]' description: Drop Linux capabilities - option: cgroup-parent description: Optional parent cgroup for the container @@ -52,14 +48,11 @@ options: default_value: "0" description: CPU shares (relative weight) - option: cpus - default_value: "0.000" description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems description: MEMs in which to allow execution (0-3, 0,1) -- option: credentialspec - description: Credential spec for managed service account (Windows only) - option: detach shorthand: d default_value: "false" @@ -67,10 +60,8 @@ options: - option: detach-keys description: Override the key sequence for detaching a container - option: device - default_value: '[]' description: Add a host device to the container - option: device-cgroup-rule - default_value: '[]' description: Add a rule to the cgroup allowed devices list - option: device-read-bps default_value: '[]' @@ -88,31 +79,23 @@ options: default_value: "true" description: Skip image verification - option: dns - default_value: '[]' description: Set custom DNS servers - option: dns-opt - default_value: '[]' description: Set DNS options - option: dns-option - default_value: '[]' description: Set DNS options - option: dns-search - default_value: '[]' description: Set custom DNS search domains - option: entrypoint description: Overwrite the default ENTRYPOINT of the image - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: env-file - default_value: '[]' description: Read in a file of environment variables - option: expose - default_value: '[]' description: Expose a port or a range of ports - option: group-add - default_value: '[]' description: Add additional groups to join - option: health-cmd description: Command to run to check health @@ -122,6 +105,10 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + default_value: 0s + description: | + Start period for the container to initialize before starting health-retries countdown (ns|us|ms|s|m|h) (default 0s) - option: health-timeout default_value: 0s description: | @@ -162,21 +149,16 @@ options: description: Kernel memory limit - option: label shorthand: l - default_value: '[]' description: Set meta data on a container - option: label-file - default_value: '[]' description: Read in a line delimited file of labels - option: link - default_value: '[]' description: Add link to another container - option: link-local-ip - default_value: '[]' description: Container IPv4/IPv6 link-local addresses - option: log-driver description: Logging driver for the container - option: log-opt - default_value: '[]' description: Log driver options - option: mac-address description: Container MAC address (e.g., 92:d0:c6:0a:29:33) @@ -194,19 +176,19 @@ options: - option: memory-swappiness default_value: "-1" description: Tune container memory swappiness (0 to 100) +- option: mount + description: Attach a filesystem mount to the container - option: name description: Assign a name to the container - option: net default_value: default description: Connect a container to a network - option: net-alias - default_value: '[]' description: Add network-scoped alias for the container - option: network default_value: default description: Connect a container to a network - option: network-alias - default_value: '[]' description: Add network-scoped alias for the container - option: no-healthcheck default_value: "false" @@ -227,7 +209,6 @@ options: description: Give extended privileges to this container - option: publish shorthand: p - default_value: '[]' description: Publish a container's port(s) to the host - option: publish-all shorthand: P @@ -245,7 +226,6 @@ options: - option: runtime description: Runtime to use for this container - option: security-opt - default_value: '[]' description: Security Options - option: shm-size default_value: "0" @@ -260,13 +240,11 @@ options: default_value: "0" description: Timeout (in seconds) to stop a container - option: storage-opt - default_value: '[]' description: Storage driver options for the container - option: sysctl default_value: map[] description: Sysctl options - option: tmpfs - default_value: '[]' description: Mount a tmpfs directory - option: tty shorthand: t @@ -284,12 +262,10 @@ options: description: UTS namespace to use - option: volume shorthand: v - default_value: '[]' description: Bind mount a volume - option: volume-driver description: Optional volume driver for the container - option: volumes-from - default_value: '[]' description: Mount volumes from the specified container(s) - option: workdir shorthand: w diff --git a/_data/engine-cli-edge/docker_container_update.yaml b/_data/engine-cli-edge/docker_container_update.yaml index 744a520ff07..1c7137cd96d 100644 --- a/_data/engine-cli-edge/docker_container_update.yaml +++ b/_data/engine-cli-edge/docker_container_update.yaml @@ -25,6 +25,8 @@ options: shorthand: c default_value: "0" description: CPU shares (relative weight) +- option: cpus + description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems diff --git a/_data/engine-cli-edge/docker_create.yaml b/_data/engine-cli-edge/docker_create.yaml index 4898b804472..7964390d1e6 100644 --- a/_data/engine-cli-edge/docker_create.yaml +++ b/_data/engine-cli-edge/docker_create.yaml @@ -17,11 +17,9 @@ pname: docker plink: docker.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: attach shorthand: a - default_value: '[]' description: Attach to STDIN, STDOUT or STDERR - option: blkio-weight default_value: "0" @@ -31,10 +29,8 @@ options: default_value: '[]' description: Block IO weight (relative device weight) - option: cap-add - default_value: '[]' description: Add Linux capabilities - option: cap-drop - default_value: '[]' description: Drop Linux capabilities - option: cgroup-parent description: Optional parent cgroup for the container @@ -63,19 +59,14 @@ options: default_value: "0" description: CPU shares (relative weight) - option: cpus - default_value: "0.000" description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems description: MEMs in which to allow execution (0-3, 0,1) -- option: credentialspec - description: Credential spec for managed service account (Windows only) - option: device - default_value: '[]' description: Add a host device to the container - option: device-cgroup-rule - default_value: '[]' description: Add a rule to the cgroup allowed devices list - option: device-read-bps default_value: '[]' @@ -93,31 +84,23 @@ options: default_value: "true" description: Skip image verification - option: dns - default_value: '[]' description: Set custom DNS servers - option: dns-opt - default_value: '[]' description: Set DNS options - option: dns-option - default_value: '[]' description: Set DNS options - option: dns-search - default_value: '[]' description: Set custom DNS search domains - option: entrypoint description: Overwrite the default ENTRYPOINT of the image - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: env-file - default_value: '[]' description: Read in a file of environment variables - option: expose - default_value: '[]' description: Expose a port or a range of ports - option: group-add - default_value: '[]' description: Add additional groups to join - option: health-cmd description: Command to run to check health @@ -127,6 +110,10 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + default_value: 0s + description: | + Start period for the container to initialize before starting health-retries countdown (ns|us|ms|s|m|h) (default 0s) - option: health-timeout default_value: 0s description: | @@ -167,21 +154,16 @@ options: description: Kernel memory limit - option: label shorthand: l - default_value: '[]' description: Set meta data on a container - option: label-file - default_value: '[]' description: Read in a line delimited file of labels - option: link - default_value: '[]' description: Add link to another container - option: link-local-ip - default_value: '[]' description: Container IPv4/IPv6 link-local addresses - option: log-driver description: Logging driver for the container - option: log-opt - default_value: '[]' description: Log driver options - option: mac-address description: Container MAC address (e.g., 92:d0:c6:0a:29:33) @@ -199,19 +181,19 @@ options: - option: memory-swappiness default_value: "-1" description: Tune container memory swappiness (0 to 100) +- option: mount + description: Attach a filesystem mount to the container - option: name description: Assign a name to the container - option: net default_value: default description: Connect a container to a network - option: net-alias - default_value: '[]' description: Add network-scoped alias for the container - option: network default_value: default description: Connect a container to a network - option: network-alias - default_value: '[]' description: Add network-scoped alias for the container - option: no-healthcheck default_value: "false" @@ -232,7 +214,6 @@ options: description: Give extended privileges to this container - option: publish shorthand: p - default_value: '[]' description: Publish a container's port(s) to the host - option: publish-all shorthand: P @@ -250,7 +231,6 @@ options: - option: runtime description: Runtime to use for this container - option: security-opt - default_value: '[]' description: Security Options - option: shm-size default_value: "0" @@ -262,13 +242,11 @@ options: default_value: "0" description: Timeout (in seconds) to stop a container - option: storage-opt - default_value: '[]' description: Storage driver options for the container - option: sysctl default_value: map[] description: Sysctl options - option: tmpfs - default_value: '[]' description: Mount a tmpfs directory - option: tty shorthand: t @@ -286,12 +264,10 @@ options: description: UTS namespace to use - option: volume shorthand: v - default_value: '[]' description: Bind mount a volume - option: volume-driver description: Optional volume driver for the container - option: volumes-from - default_value: '[]' description: Mount volumes from the specified container(s) - option: workdir shorthand: w diff --git a/_data/engine-cli-edge/docker_deploy.yaml b/_data/engine-cli-edge/docker_deploy.yaml index 59557b35f01..fec5692689d 100644 --- a/_data/engine-cli-edge/docker_deploy.yaml +++ b/_data/engine-cli-edge/docker_deploy.yaml @@ -12,6 +12,9 @@ options: - option: compose-file shorthand: c description: Path to a Compose file +- option: prune + default_value: "false" + description: Prune services that are no longer referenced - option: with-registry-auth default_value: "false" description: Send registry authentication details to Swarm agents diff --git a/_data/engine-cli-edge/docker_exec.yaml b/_data/engine-cli-edge/docker_exec.yaml index 63d4cfec01d..044a6702ab1 100644 --- a/_data/engine-cli-edge/docker_exec.yaml +++ b/_data/engine-cli-edge/docker_exec.yaml @@ -18,7 +18,6 @@ options: description: Override the key sequence for detaching a container - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: interactive shorthand: i diff --git a/_data/engine-cli-edge/docker_image_build.yaml b/_data/engine-cli-edge/docker_image_build.yaml index 53db04daafb..9bf8e6ec1f0 100644 --- a/_data/engine-cli-edge/docker_image_build.yaml +++ b/_data/engine-cli-edge/docker_image_build.yaml @@ -6,10 +6,8 @@ pname: docker image plink: docker_image.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: build-arg - default_value: '[]' description: Set build-time variables - option: cache-from default_value: '[]' @@ -45,7 +43,6 @@ options: - option: isolation description: Container isolation technology - option: label - default_value: '[]' description: Set metadata for an image - option: memory shorthand: m @@ -83,8 +80,9 @@ options: description: Squash newly built layers into a single new layer - option: tag shorthand: t - default_value: '[]' description: Name and optionally a tag in the 'name:tag' format +- option: target + description: Set the target build stage to build. - option: ulimit default_value: '[]' description: Ulimit options diff --git a/_data/engine-cli-edge/docker_image_import.yaml b/_data/engine-cli-edge/docker_image_import.yaml index 1aa59203a7e..592be058b4b 100644 --- a/_data/engine-cli-edge/docker_image_import.yaml +++ b/_data/engine-cli-edge/docker_image_import.yaml @@ -7,7 +7,6 @@ plink: docker_image.yaml options: - option: change shorthand: c - default_value: '[]' description: Apply Dockerfile instruction to the created image - option: message shorthand: m diff --git a/_data/engine-cli-edge/docker_image_prune.yaml b/_data/engine-cli-edge/docker_image_prune.yaml index d44e8925a44..01f1342af34 100644 --- a/_data/engine-cli-edge/docker_image_prune.yaml +++ b/_data/engine-cli-edge/docker_image_prune.yaml @@ -76,7 +76,6 @@ examples: |2- The following removes images created before `2017-01-04T00:00:00`: ```bash - {% raw %} $ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}' REPOSITORY TAG IMAGE ID CREATED AT SIZE foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB @@ -99,7 +98,6 @@ examples: |2- REPOSITORY TAG IMAGE ID CREATED AT SIZE foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB - {% endraw %} ``` The following removes images created more than 10 days (`240h`) ago: diff --git a/_data/engine-cli-edge/docker_import.yaml b/_data/engine-cli-edge/docker_import.yaml index ab24c0268ff..b4c53995f6b 100644 --- a/_data/engine-cli-edge/docker_import.yaml +++ b/_data/engine-cli-edge/docker_import.yaml @@ -19,7 +19,6 @@ plink: docker.yaml options: - option: change shorthand: c - default_value: '[]' description: Apply Dockerfile instruction to the created image - option: message shorthand: m diff --git a/_data/engine-cli-edge/docker_inspect.yaml b/_data/engine-cli-edge/docker_inspect.yaml index 3c7619cbc07..aab32391596 100644 --- a/_data/engine-cli-edge/docker_inspect.yaml +++ b/_data/engine-cli-edge/docker_inspect.yaml @@ -1,12 +1,9 @@ command: docker inspect short: Return low-level information on Docker objects long: |- - By default, `docker inspect` will render all results in a JSON array. If the container and - image have the same name, this will return container JSON for unspecified type. - If a format is specified, the given template will be executed for each result. + ker inspect provides detailed information on constructs controlled by Docker. - Go's [text/template](http://golang.org/pkg/text/template/) package - describes all the details of the format. + By default, `docker inspect` will render results in a JSON array. usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...] pname: docker plink: docker.yaml diff --git a/_data/engine-cli-edge/docker_network.yaml b/_data/engine-cli-edge/docker_network.yaml index ce3dfb358b8..d5d9d7991d0 100644 --- a/_data/engine-cli-edge/docker_network.yaml +++ b/_data/engine-cli-edge/docker_network.yaml @@ -1,8 +1,8 @@ command: docker network short: Manage networks long: |- - Manage networks. You can use subcommand to create, list, inspect, remove, - connect and disconnect networks. + Manage networks. You can use subcommands to create, inspect, list, remove, + prune, connect, and disconnect networks. usage: docker network pname: docker plink: docker.yaml diff --git a/_data/engine-cli-edge/docker_network_connect.yaml b/_data/engine-cli-edge/docker_network_connect.yaml index 9408da49b02..3f1556cc43a 100644 --- a/_data/engine-cli-edge/docker_network_connect.yaml +++ b/_data/engine-cli-edge/docker_network_connect.yaml @@ -16,7 +16,6 @@ options: - option: ip6 description: IPv6 address (e.g., 2001:db8::33) - option: link - default_value: '[]' description: Add link to another container - option: link-local-ip default_value: '[]' diff --git a/_data/engine-cli-edge/docker_network_create.yaml b/_data/engine-cli-edge/docker_network_create.yaml index 3b564549053..5fef444c95c 100644 --- a/_data/engine-cli-edge/docker_network_create.yaml +++ b/_data/engine-cli-edge/docker_network_create.yaml @@ -65,6 +65,9 @@ options: - option: gateway default_value: '[]' description: IPv4 or IPv6 Gateway for the master subnet +- option: ingress + default_value: "false" + description: Create swarm routing-mesh network - option: internal default_value: "false" description: Restrict external access to the network @@ -81,7 +84,6 @@ options: default_value: "false" description: Enable IPv6 networking - option: label - default_value: '[]' description: Set metadata on a network - option: opt shorthand: o @@ -196,3 +198,20 @@ examples: |- to create an externally isolated `overlay` network, you can specify the `--internal` option. + ### Network ingress mode + + You can create the network which will be used to provide the routing-mesh in the + swarm cluster. You do so by specifying `--ingress` when creating the network. Only + one ingress network can be created at the time. The network can be removed only + if no services depend on it. Any option available when creating a overlay network + is also available when creating the ingress network, besides the `--attachable` option. + + ```bash + $ docker network create -d overlay \ + --subnet=10.11.0.0/16 \ + --ingress \ + --opt com.docker.network.mtu=9216 \ + --opt encrypted=true \ + my-ingress-network + ``` + diff --git a/_data/engine-cli-edge/docker_network_ls.yaml b/_data/engine-cli-edge/docker_network_ls.yaml index 59e1c0695bd..33f8f629a21 100644 --- a/_data/engine-cli-edge/docker_network_ls.yaml +++ b/_data/engine-cli-edge/docker_network_ls.yaml @@ -38,11 +38,11 @@ examples: "### List all networks\n\n```bash\n$ sudo docker network ls\nNETWORK I filter flags are combined as an `OR` filter. For example,\n`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks.\n\nThe currently supported filters are:\n\n* driver\n* id (network's id)\n* label (`label=` or `label==`)\n* - name (network's name)\n* type (`custom|builtin`)\n\n#### Driver\n\nThe `driver` - filter matches networks based on their driver.\n\nThe following example matches - networks with the `bridge` driver:\n\n```bash\n$ docker network ls --filter driver=bridge\nNETWORK - ID NAME DRIVER SCOPE\ndb9db329f835 test1 - \ bridge local\nf6e212da9dfd test2 bridge + name (network's name)\n* scope (`swarm|global|local`)\n* type (`custom|builtin`)\n\n#### + Driver\n\nThe `driver` filter matches networks based on their driver.\n\nThe following + example matches networks with the `bridge` driver:\n\n```bash\n$ docker network + ls --filter driver=bridge\nNETWORK ID NAME DRIVER SCOPE\ndb9db329f835 + \ test1 bridge local\nf6e212da9dfd test2 bridge \ local\n```\n\n#### ID\n\nThe `id` filter matches on all or part of a network's ID.\n\nThe following filter matches all networks with an ID containing the\n`63d1ff1f77b0...` string.\n\n```bash\n$ docker network ls --filter id=63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161\nNETWORK @@ -67,7 +67,17 @@ examples: "### List all networks\n\n```bash\n$ sudo docker network ls\nNETWORK I \ local\n```\n\nYou can also filter for a substring in a name as this shows:\n\n```bash\n$ docker network ls --filter name=foo\nNETWORK ID NAME DRIVER \ SCOPE\n95e74588f40d foo bridge local\n06e7eef0a170 - \ foobar bridge local\n```\n\n#### Type\n\nThe `type` filter + \ foobar bridge local\n```\n\n#### Scope\n\nThe `scope` + filter matches networks based on their scope.\n\nThe following example matches networks + with the `swarm` scope:\n\n```bash\n$ docker network ls --filter scope=swarm\nNETWORK + ID NAME DRIVER SCOPE\nxbtm0v4f1lfh ingress + \ overlay swarm\nic6r88twuu92 swarmnet overlay + \ swarm\n```\n\nThe following example matches networks with the `local` + scope:\n\n```bash\n$ docker network ls --filter scope=local\nNETWORK ID NAME + \ DRIVER SCOPE\ne85227439ac7 bridge bridge + \ local\n0ca0e19443ed host host local\nca13cc149a36 + \ localnet bridge local\nf9e115d2de35 none + \ null local\n```\n\n#### Type\n\nThe `type` filter supports two values; `builtin` displays predefined networks\n(`bridge`, `none`, `host`), whereas `custom` displays user defined networks.\n\nThe following filter matches all user defined networks:\n\n```bash\n$ docker network ls --filter type=custom\nNETWORK diff --git a/_data/engine-cli-edge/docker_node_ls.yaml b/_data/engine-cli-edge/docker_node_ls.yaml index 374bfe9cf32..e50f09cf3c1 100644 --- a/_data/engine-cli-edge/docker_node_ls.yaml +++ b/_data/engine-cli-edge/docker_node_ls.yaml @@ -12,6 +12,8 @@ options: - option: filter shorthand: f description: Filter output based on conditions provided +- option: format + description: Pretty-print nodes using a Go template - option: quiet shorthand: q default_value: "false" @@ -25,6 +27,11 @@ examples: |- 38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader ``` + > **Note**: + > In the above example output, there is a hidden column of `.Self` that indicates if the + > node is the same node as the current docker daemon. A `*` (e.g., `e216jshn25ckzbvmwlnh5jr3g *`) + > means this node is the current docker daemon. + ### Filtering @@ -104,3 +111,31 @@ examples: |- e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader ``` + ### Formatting + + The formatting options (`--format`) pretty-prints nodes output + using a Go template. + + Valid placeholders for the Go template are listed below: + + Placeholder | Description + -----------------|------------------------------------------------------------------------------------------ + `.ID` | Node ID + `.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon) + `.Hostname` | Node hostname + `.Status` | Node status + `.Availability` | Node availability ("active", "pause", or "drain") + `.ManagerStatus` | Manager status of the node + + When using the `--format` option, the `node ls` command will either + output the data exactly as the template declares or, when using the + `table` directive, includes column headers as well. + + The following example uses a template without headers and outputs the + `ID` and `Hostname` entries separated by a colon for all nodes: + + ```bash + $ docker node ls --format "{{.ID}}: {{.Hostname}}" + e216jshn25ckzbvmwlnh5jr3g: swarm-manager1 + `` + diff --git a/_data/engine-cli-edge/docker_node_update.yaml b/_data/engine-cli-edge/docker_node_update.yaml index 23a86d9466b..520e1573f5a 100644 --- a/_data/engine-cli-edge/docker_node_update.yaml +++ b/_data/engine-cli-edge/docker_node_update.yaml @@ -8,10 +8,8 @@ options: - option: availability description: Availability of the node ("active"|"pause"|"drain") - option: label-add - default_value: '[]' description: Add or update a node label (key=value) - option: label-rm - default_value: '[]' description: Remove a node label if exists - option: role description: Role of the node ("worker"|"manager") diff --git a/_data/engine-cli-edge/docker_plugin_inspect.yaml b/_data/engine-cli-edge/docker_plugin_inspect.yaml index ce875f2ccd5..48396e07556 100644 --- a/_data/engine-cli-edge/docker_plugin_inspect.yaml +++ b/_data/engine-cli-edge/docker_plugin_inspect.yaml @@ -126,10 +126,8 @@ examples: |- ### Formatting the output ```bash - {% raw %} $ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest 8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21 - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_plugin_ls.yaml b/_data/engine-cli-edge/docker_plugin_ls.yaml index 566920e23f3..4d95738d4e7 100644 --- a/_data/engine-cli-edge/docker_plugin_ls.yaml +++ b/_data/engine-cli-edge/docker_plugin_ls.yaml @@ -84,10 +84,8 @@ examples: |- `ID` and `Name` entries separated by a colon for all plugins: ```bash - {% raw %} $ docker plugin ls --format "{{.ID}}: {{.Name}}" 4be01827a72e: tiborvass/no-remove - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_plugin_set.yaml b/_data/engine-cli-edge/docker_plugin_set.yaml index c8813e5fdf4..9e94690a713 100644 --- a/_data/engine-cli-edge/docker_plugin_set.yaml +++ b/_data/engine-cli-edge/docker_plugin_set.yaml @@ -18,16 +18,13 @@ examples: |- `sample-volume-plugin` plugin. ```bash - {% raw %} $ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin - [DEBUG=0] $ docker plugin set tiborvass/sample-volume-plugin DEBUG=1 $ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin [DEBUG=1] - {% endraw %} ``` ### Change the source of a mount @@ -36,7 +33,6 @@ examples: |- the `myplugin` plugin. ```bash - {% raw %} $ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin /foo @@ -44,7 +40,6 @@ examples: |- $ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin /bar - {% endraw %} ``` > **Note**: Since only `source` is settable in `mymount`, @@ -56,7 +51,6 @@ examples: |- the `myplugin` plugin. ```bash - {% raw %} $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin /dev/foo @@ -64,7 +58,6 @@ examples: |- $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin /dev/bar - {% endraw %} ``` > **Note**: Since only `path` is settable in `mydevice`, @@ -72,17 +65,15 @@ examples: |- ### Change the source of the arguments - The following example change the source of the args on the `myplugin` plugin. + The following example change the value of the args on the `myplugin` plugin. ```bash - {% raw %} $ docker plugin inspect -f '{{.Settings.Args}}' myplugin ["foo", "bar"] - $ docker plugins set myplugin args="foo bar baz" + $ docker plugins set myplugin myargs="foo bar baz" $ docker plugin inspect -f '{{.Settings.Args}}' myplugin ["foo", "bar", "baz"] - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_run.yaml b/_data/engine-cli-edge/docker_run.yaml index caf5bcd2e0c..a006e45c15c 100644 --- a/_data/engine-cli-edge/docker_run.yaml +++ b/_data/engine-cli-edge/docker_run.yaml @@ -17,11 +17,9 @@ pname: docker plink: docker.yaml options: - option: add-host - default_value: '[]' description: Add a custom host-to-IP mapping (host:ip) - option: attach shorthand: a - default_value: '[]' description: Attach to STDIN, STDOUT or STDERR - option: blkio-weight default_value: "0" @@ -31,10 +29,8 @@ options: default_value: '[]' description: Block IO weight (relative device weight) - option: cap-add - default_value: '[]' description: Add Linux capabilities - option: cap-drop - default_value: '[]' description: Drop Linux capabilities - option: cgroup-parent description: Optional parent cgroup for the container @@ -63,14 +59,11 @@ options: default_value: "0" description: CPU shares (relative weight) - option: cpus - default_value: "0.000" description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems description: MEMs in which to allow execution (0-3, 0,1) -- option: credentialspec - description: Credential spec for managed service account (Windows only) - option: detach shorthand: d default_value: "false" @@ -78,10 +71,8 @@ options: - option: detach-keys description: Override the key sequence for detaching a container - option: device - default_value: '[]' description: Add a host device to the container - option: device-cgroup-rule - default_value: '[]' description: Add a rule to the cgroup allowed devices list - option: device-read-bps default_value: '[]' @@ -99,31 +90,23 @@ options: default_value: "true" description: Skip image verification - option: dns - default_value: '[]' description: Set custom DNS servers - option: dns-opt - default_value: '[]' description: Set DNS options - option: dns-option - default_value: '[]' description: Set DNS options - option: dns-search - default_value: '[]' description: Set custom DNS search domains - option: entrypoint description: Overwrite the default ENTRYPOINT of the image - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: env-file - default_value: '[]' description: Read in a file of environment variables - option: expose - default_value: '[]' description: Expose a port or a range of ports - option: group-add - default_value: '[]' description: Add additional groups to join - option: health-cmd description: Command to run to check health @@ -133,6 +116,10 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + default_value: 0s + description: | + Start period for the container to initialize before starting health-retries countdown (ns|us|ms|s|m|h) (default 0s) - option: health-timeout default_value: 0s description: | @@ -173,21 +160,16 @@ options: description: Kernel memory limit - option: label shorthand: l - default_value: '[]' description: Set meta data on a container - option: label-file - default_value: '[]' description: Read in a line delimited file of labels - option: link - default_value: '[]' description: Add link to another container - option: link-local-ip - default_value: '[]' description: Container IPv4/IPv6 link-local addresses - option: log-driver description: Logging driver for the container - option: log-opt - default_value: '[]' description: Log driver options - option: mac-address description: Container MAC address (e.g., 92:d0:c6:0a:29:33) @@ -205,19 +187,19 @@ options: - option: memory-swappiness default_value: "-1" description: Tune container memory swappiness (0 to 100) +- option: mount + description: Attach a filesystem mount to the container - option: name description: Assign a name to the container - option: net default_value: default description: Connect a container to a network - option: net-alias - default_value: '[]' description: Add network-scoped alias for the container - option: network default_value: default description: Connect a container to a network - option: network-alias - default_value: '[]' description: Add network-scoped alias for the container - option: no-healthcheck default_value: "false" @@ -238,7 +220,6 @@ options: description: Give extended privileges to this container - option: publish shorthand: p - default_value: '[]' description: Publish a container's port(s) to the host - option: publish-all shorthand: P @@ -256,7 +237,6 @@ options: - option: runtime description: Runtime to use for this container - option: security-opt - default_value: '[]' description: Security Options - option: shm-size default_value: "0" @@ -271,13 +251,11 @@ options: default_value: "0" description: Timeout (in seconds) to stop a container - option: storage-opt - default_value: '[]' description: Storage driver options for the container - option: sysctl default_value: map[] description: Sysctl options - option: tmpfs - default_value: '[]' description: Mount a tmpfs directory - option: tty shorthand: t @@ -295,12 +273,10 @@ options: description: UTS namespace to use - option: volume shorthand: v - default_value: '[]' description: Bind mount a volume - option: volume-driver description: Optional volume driver for the container - option: volumes-from - default_value: '[]' description: Mount volumes from the specified container(s) - option: workdir shorthand: w @@ -460,6 +436,29 @@ examples: |- For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/engine/tutorials/dockervolumes/) + + ### Add bind-mounts or volumes using the --mount flag + + The `--mount` flag allows you to mount volumes, host-directories and `tmpfs` + mounts in a container. + + The `--mount` flag supports most options that are supported by the `-v` or the + `--volume` flag, but uses a different syntax. For in-depth information on the + `--mount` flag, and a comparison between `--volume` and `--mount`, refer to + the [service create command reference](service_create.md#add-bind-mounts-or-volumes). + + Even though there is no plan to deprecate `--volume`, usage of `--mount` is recommended. + + Examples: + + ```bash + $ docker run --read-only --mount type=volume,target=/icanwrite busybox touch /icanwrite/here + ``` + + ```bash + $ docker run -t -i --mount type=bind,src=/data,dst=/data busybox sh + ``` + ### Publish or expose port (-p, --expose) ```bash diff --git a/_data/engine-cli-edge/docker_secret_create.yaml b/_data/engine-cli-edge/docker_secret_create.yaml index 6187463ebd9..e522ad4b10c 100644 --- a/_data/engine-cli-edge/docker_secret_create.yaml +++ b/_data/engine-cli-edge/docker_secret_create.yaml @@ -9,18 +9,19 @@ plink: docker_secret.yaml options: - option: label shorthand: l - default_value: '[]' description: Secret labels examples: |- ### Create a secret ```bash $ echo | docker secret create my_secret - - mhv17xfe3gh6xc4rij5orpfds + + onakdyv307se2tl7nl20anokv $ docker secret ls - ID NAME CREATED UPDATED SIZE - mhv17xfe3gh6xc4rij5orpfds my_secret 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679 + + ID NAME CREATED UPDATED + onakdyv307se2tl7nl20anokv my_secret 6 seconds ago 6 seconds ago ``` ### Create a secret with a file @@ -28,22 +29,22 @@ examples: |- ```bash $ docker secret create my_secret ./secret.json - mhv17xfe3gh6xc4rij5orpfds + dg426haahpi5ezmkkj5kyl3sn $ docker secret ls - ID NAME CREATED UPDATED SIZE - mhv17xfe3gh6xc4rij5orpfds my_secret 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679 + ID NAME CREATED UPDATED + dg426haahpi5ezmkkj5kyl3sn my_secret 7 seconds ago 7 seconds ago ``` ### Create a secret with labels ```bash $ docker secret create --label env=dev \ - --label rev=20161102 \ + --label rev=20170324 \ my_secret ./secret.json - jtn7g6aukl5ky7nr9gvwafoxh + eo7jnzguqgtpdah3cm5srfb97 ``` ```none @@ -51,22 +52,19 @@ examples: |- [ { - "ID": "jtn7g6aukl5ky7nr9gvwafoxh", + "ID": "eo7jnzguqgtpdah3cm5srfb97", "Version": { - "Index": 541 + "Index": 17 }, - "CreatedAt": "2016-11-03T20:54:12.924766548Z", - "UpdatedAt": "2016-11-03T20:54:12.924766548Z", + "CreatedAt": "2017-03-24T08:15:09.735271783Z", + "UpdatedAt": "2017-03-24T08:15:09.735271783Z", "Spec": { "Name": "my_secret", "Labels": { "env": "dev", - "rev": "20161102" - }, - "Data": null - }, - "Digest": "sha256:4212a44b14e94154359569333d3fc6a80f6b9959dfdaff26412f4b2796b1f387", - "SecretSize": 1679 + "rev": "20170324" + } + } } ] ``` diff --git a/_data/engine-cli-edge/docker_secret_inspect.yaml b/_data/engine-cli-edge/docker_secret_inspect.yaml index c9a1789bdb2..2a907441448 100644 --- a/_data/engine-cli-edge/docker_secret_inspect.yaml +++ b/_data/engine-cli-edge/docker_secret_inspect.yaml @@ -27,8 +27,9 @@ examples: |- ```bash $ docker secret ls - ID NAME CREATED UPDATED - mhv17xfe3gh6xc4rij5orpfds secret.json 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC + + ID NAME CREATED UPDATED + eo7jnzguqgtpdah3cm5srfb97 my_secret 3 minutes ago 3 minutes ago ``` ```none @@ -36,14 +37,18 @@ examples: |- [ { - "ID": "mhv17xfe3gh6xc4rij5orpfds", - "Version": { - "Index": 1198 + "ID": "eo7jnzguqgtpdah3cm5srfb97", + "Version": { + "Index": 17 }, - "CreatedAt": "2016-10-27T23:25:43.909181089Z", - "UpdatedAt": "2016-10-27T23:25:43.909181089Z", + "CreatedAt": "2017-03-24T08:15:09.735271783Z", + "UpdatedAt": "2017-03-24T08:15:09.735271783Z", "Spec": { - "Name": "secret.json" + "Name": "my_secret", + "Labels": { + "env": "dev", + "rev": "20170324" + } } } ] @@ -56,8 +61,8 @@ examples: |- secret. ```bash - $ docker secret inspect --format='{{.CreatedAt}}' mhv17xfe3gh6xc4rij5orpfds + $ docker secret inspect --format='{{.CreatedAt}}' eo7jnzguqgtpdah3cm5srfb97 - 2016-10-27 23:25:43.909181089 +0000 UTC + 2017-03-24 08:15:09.735271783 +0000 UTC ``` diff --git a/_data/engine-cli-edge/docker_secret_ls.yaml b/_data/engine-cli-edge/docker_secret_ls.yaml index ef6fa96a30c..5a9dd499aee 100644 --- a/_data/engine-cli-edge/docker_secret_ls.yaml +++ b/_data/engine-cli-edge/docker_secret_ls.yaml @@ -9,6 +9,11 @@ usage: docker secret ls [OPTIONS] pname: docker secret plink: docker_secret.yaml options: +- option: filter + shorthand: f + description: Filter output based on conditions provided +- option: format + description: Pretty-print secrets using a Go template - option: quiet shorthand: q default_value: "false" @@ -17,7 +22,112 @@ examples: |- ```bash $ docker secret ls - ID NAME CREATED UPDATED - mhv17xfe3gh6xc4rij5orpfds secret.json 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC + ID NAME CREATED UPDATED + 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago + 9u9hk4br2ej0wgngkga6rp4hq my_secret 5 weeks ago 5 weeks ago + mem02h8n73mybpgqjf0kfi1n0 test_secret 3 seconds ago 3 seconds ago + ``` + + ### Filtering + + The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more + than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) + + The currently supported filters are: + + * [id](secret_ls.md#id) (secret's ID) + * [label](secret_ls.md#label) (`label=` or `label==`) + * [name](secret_ls.md#name) (secret's name) + + #### id + + The `id` filter matches all or prefix of a secret's id. + + ```bash + $ docker secret ls -f "id=6697bflskwj1998km1gnnjr38" + + ID NAME CREATED UPDATED + 6697bflskwj1998km1gnnjr38 q5s5570vtvnimefos1fyeo2u2 6 weeks ago 6 weeks ago + ``` + + #### label + + The `label` filter matches secrets based on the presence of a `label` alone or + a `label` and a value. + + The following filter matches all secrets with a `project` label regardless of + its value: + + ```bash + $ docker secret ls --filter label=project + + ID NAME CREATED UPDATED + mem02h8n73mybpgqjf0kfi1n0 test_secret About an hour ago About an hour ago + ``` + + The following filter matches only services with the `project` label with the + `project-a` value. + + ```bash + $ docker service ls --filter label=project=test + + ID NAME CREATED UPDATED + mem02h8n73mybpgqjf0kfi1n0 test_secret About an hour ago About an hour ago + ``` + + #### name + + The `name` filter matches on all or prefix of a secret's name. + + The following filter matches secret with a name containing a prefix of `test`. + + ```bash + $ docker secret ls --filter name=test_secret + + ID NAME CREATED UPDATED + mem02h8n73mybpgqjf0kfi1n0 test_secret About an hour ago About an hour ago + ``` + + ### Format the output + + The formatting option (`--format`) pretty prints secrets output + using a Go template. + + Valid placeholders for the Go template are listed below: + + | Placeholder | Description | + | ------------ | ------------------------------------------------------------------------------------ | + | `.ID` | Secret ID | + | `.Name` | Secret name | + | `.CreatedAt` | Time when the secret was created | + | `.UpdatedAt` | Time when the secret was updated | + | `.Labels` | All labels assigned to the secret | + | `.Label` | Value of a specific label for this secret. For example `{{.Label "secret.ssh.key"}}` | + + When using the `--format` option, the `secret ls` command will either + output the data exactly as the template declares or, when using the + `table` directive, will include column headers as well. + + The following example uses a template without headers and outputs the + `ID` and `Name` entries separated by a colon for all images: + + ```bash + $ docker secret ls --format "{{.ID}}: {{.Name}}" + + 77af4d6b9913: secret-1 + b6fa739cedf5: secret-2 + 78a85c484f71: secret-3 + ``` + + To list all secrets with their name and created date in a table format you + can use: + + ```bash + $ docker secret ls --format "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}" + + ID NAME CREATED + 77af4d6b9913 secret-1 5 minutes ago + b6fa739cedf5 secret-2 3 hours ago + 78a85c484f71 secret-3 10 days ago ``` diff --git a/_data/engine-cli-edge/docker_service_create.yaml b/_data/engine-cli-edge/docker_service_create.yaml index 0bfde069596..16062d341f6 100644 --- a/_data/engine-cli-edge/docker_service_create.yaml +++ b/_data/engine-cli-edge/docker_service_create.yaml @@ -8,32 +8,33 @@ pname: docker service plink: docker_service.yaml options: - option: constraint - default_value: '[]' description: Placement constraints - option: container-label - default_value: '[]' description: Container labels +- option: credential-spec + description: Credential spec for managed service account (Windows only) +- option: detach + shorthand: d + default_value: "true" + description: | + Exit immediately instead of waiting for the service to converge - option: dns - default_value: '[]' description: Set custom DNS servers - option: dns-option - default_value: '[]' description: Set DNS options - option: dns-search - default_value: '[]' description: Set custom DNS search domains - option: endpoint-mode default_value: vip description: Endpoint mode (vip or dnsrr) +- option: entrypoint + description: Overwrite the default ENTRYPOINT of the image - option: env shorthand: e - default_value: '[]' description: Set environment variables - option: env-file - default_value: '[]' description: Read in a file of environment variables - option: group - default_value: '[]' description: Set one or more supplementary user groups for the container - option: health-cmd description: Command to run to check health @@ -42,19 +43,19 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + description: | + Start period for the container to initialize before counting retries towards unstable (ns|us|ms|s|m|h) - option: health-timeout description: Maximum time to allow one check to run (ns|us|ms|s|m|h) - option: host - default_value: '[]' description: Set one or more custom host-to-IP mappings (host:ip) - option: hostname description: Container hostname - option: label shorthand: l - default_value: '[]' description: Service labels - option: limit-cpu - default_value: "0.000" description: Limit CPUs - option: limit-memory default_value: "0" @@ -62,7 +63,6 @@ options: - option: log-driver description: Logging driver for service - option: log-opt - default_value: '[]' description: Logging driver options - option: mode default_value: replicated @@ -72,7 +72,6 @@ options: - option: name description: Service name - option: network - default_value: '[]' description: Network attachments - option: no-healthcheck default_value: "false" @@ -82,21 +81,25 @@ options: - option: publish shorthand: p description: Publish a port as a node port +- option: quiet + shorthand: q + default_value: "false" + description: Suppress progress output - option: read-only default_value: "false" description: Mount the container's root filesystem as read only - option: replicas description: Number of tasks - option: reserve-cpu - default_value: "0.000" description: Reserve CPUs - option: reserve-memory default_value: "0" description: Reserve Memory - option: restart-condition - description: Restart when condition is met ("none"|"on-failure"|"any") + description: | + Restart when condition is met ("none"|"on-failure"|"any") (default "any") - option: restart-delay - description: Delay between restart attempts (ns|us|ms|s|m|h) + description: Delay between restart attempts (ns|us|ms|s|m|h) (default 5s) - option: restart-max-attempts description: Maximum number of restarts before giving up - option: restart-window @@ -105,15 +108,18 @@ options: default_value: 0s description: Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s) - option: rollback-failure-action - default_value: pause - description: Action on rollback failure ("pause"|"continue") + description: | + Action on rollback failure ("pause"|"continue") (default "pause") - option: rollback-max-failure-ratio default_value: "0" - description: Failure rate to tolerate during a rollback + description: Failure rate to tolerate during a rollback (default 0) - option: rollback-monitor default_value: 0s description: | - Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 0s) + Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 5s) +- option: rollback-order + description: | + Rollback order ("start-first"|"stop-first") (default "stop-first") - option: rollback-parallelism default_value: "1" description: | @@ -122,7 +128,7 @@ options: description: Specify secrets to expose to the service - option: stop-grace-period description: | - Time to wait before force killing a container (ns|us|ms|s|m|h) + Time to wait before force killing a container (ns|us|ms|s|m|h) (default 10s) - option: stop-signal description: Signal to stop the container - option: tty @@ -133,15 +139,18 @@ options: default_value: 0s description: Delay between updates (ns|us|ms|s|m|h) (default 0s) - option: update-failure-action - default_value: pause - description: Action on update failure ("pause"|"continue"|"rollback") + description: | + Action on update failure ("pause"|"continue"|"rollback") (default "pause") - option: update-max-failure-ratio default_value: "0" - description: Failure rate to tolerate during an update + description: Failure rate to tolerate during an update (default 0) - option: update-monitor default_value: 0s description: | - Duration after each task update to monitor for failure (ns|us|ms|s|m|h) (default 0s) + Duration after each task update to monitor for failure (ns|us|ms|s|m|h) (default 5s) +- option: update-order + description: | + Update order ("start-first"|"stop-first") (default "stop-first") - option: update-parallelism default_value: "1" description: | @@ -495,7 +504,7 @@ examples: |- Options specific to a given volume driver, which will be passed to the driver when creating the volume. Options are provided as a comma-separated list of key/value pairs, for example, - volume-opt=some-option=some-value,some-other-option=some-other-value. + volume-opt=some-option=some-value,volume-opt=some-other-option=some-other-value. For available options for a given driver, refer to that driver's documentation. @@ -898,6 +907,5 @@ examples: |- $ docker inspect --format="{{.Config.Hostname}}" hosttempl.1.wo41w8hg8qanxwjwsg4kxpprj x3ti0erg11rjpg64m75kej2mz-hosttempl - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_service_logs.yaml b/_data/engine-cli-edge/docker_service_logs.yaml index 99db94fe331..ffe43ef0a16 100644 --- a/_data/engine-cli-edge/docker_service_logs.yaml +++ b/_data/engine-cli-edge/docker_service_logs.yaml @@ -1,8 +1,13 @@ command: docker service logs -short: Fetch the logs of a service +short: Fetch the logs of a service or task long: |- The `docker service logs` command batch-retrieves logs present at the time of execution. + The `docker service logs` command can be used with either the name or ID of a + service, or with the ID of a task. If a service is passed, it will display logs + for all of the containers in that service. If a task is passed, it will only + display logs from that particular task. + > **Note**: This command is only functional for services that are started with > the `json-file` or `journald` logging driver. @@ -36,7 +41,7 @@ long: |- seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a fraction of a second no more than nine digits long. You can combine the `--since` option with either or both of the `--follow` or `--tail` options. -usage: docker service logs [OPTIONS] SERVICE +usage: docker service logs [OPTIONS] SERVICE|TASK pname: docker service plink: docker_service.yaml options: @@ -46,10 +51,10 @@ options: description: Follow log output - option: no-resolve default_value: "false" - description: Do not map IDs to Names + description: Do not map IDs to Names in output - option: no-task-ids default_value: "false" - description: Do not include task IDs + description: Do not include task IDs in output - option: no-trunc default_value: "false" description: Do not truncate output diff --git a/_data/engine-cli-edge/docker_service_ls.yaml b/_data/engine-cli-edge/docker_service_ls.yaml index 988838f6640..e24dc6cea59 100644 --- a/_data/engine-cli-edge/docker_service_ls.yaml +++ b/_data/engine-cli-edge/docker_service_ls.yaml @@ -41,6 +41,7 @@ examples: |- * [id](service_ls.md#id) * [label](service_ls.md#label) + * [mode](service_ls.md#mode) * [name](service_ls.md#name) #### id @@ -79,6 +80,18 @@ examples: |- 74nzcxxjv6fq backend replicated 3/3 redis:3.0.6 ``` + #### mode + + The `mode` filter matches on the mode (either `replicated` or `global`) of a service. + + The following filter matches only `global` services. + + ```bash + $ docker service ls --filter mode=global + ID NAME MODE REPLICAS IMAGE + w7y0v2yrn620 top global 1/1 busybox + ``` + #### name The `name` filter matches on all or part of a service's name. @@ -105,6 +118,7 @@ examples: |- `.Mode` | Service mode (replicated, global) `.Replicas` | Service replicas `.Image` | Service image + `.Ports` | Service ports published in ingress mode When using the `--format` option, the `service ls` command will either output the data exactly as the template declares or, when using the @@ -114,11 +128,9 @@ examples: |- `ID`, `Mode`, and `Replicas` entries separated by a colon for all services: ```bash - {% raw %} $ docker service ls --format "{{.ID}}: {{.Mode}} {{.Replicas}}" 0zmvwuiu3vue: replicated 10/10 fm6uf97exkul: global 5/5 - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_service_update.yaml b/_data/engine-cli-edge/docker_service_update.yaml index 19e69bc5b59..38ed1ef19af 100644 --- a/_data/engine-cli-edge/docker_service_update.yaml +++ b/_data/engine-cli-edge/docker_service_update.yaml @@ -17,52 +17,46 @@ options: - option: args description: Service command args - option: constraint-add - default_value: '[]' description: Add or update a placement constraint - option: constraint-rm - default_value: '[]' description: Remove a constraint - option: container-label-add - default_value: '[]' description: Add or update a container label - option: container-label-rm - default_value: '[]' description: Remove a container label by its key +- option: credential-spec + description: Credential spec for managed service account (Windows only) +- option: detach + shorthand: d + default_value: "true" + description: | + Exit immediately instead of waiting for the service to converge - option: dns-add - default_value: '[]' description: Add or update a custom DNS server - option: dns-option-add - default_value: '[]' description: Add or update a DNS option - option: dns-option-rm - default_value: '[]' description: Remove a DNS option - option: dns-rm - default_value: '[]' description: Remove a custom DNS server - option: dns-search-add - default_value: '[]' description: Add or update a custom DNS search domain - option: dns-search-rm - default_value: '[]' description: Remove a DNS search domain - option: endpoint-mode - default_value: vip description: Endpoint mode (vip or dnsrr) +- option: entrypoint + description: Overwrite the default ENTRYPOINT of the image - option: env-add - default_value: '[]' description: Add or update an environment variable - option: env-rm - default_value: '[]' description: Remove an environment variable - option: force default_value: "false" description: Force update even if no changes require it - option: group-add - default_value: '[]' description: Add an additional supplementary user group to the container - option: group-rm - default_value: '[]' description: | Remove a previously added supplementary user group from the container - option: health-cmd @@ -72,26 +66,24 @@ options: - option: health-retries default_value: "0" description: Consecutive failures needed to report unhealthy +- option: health-start-period + description: | + Start period for the container to initialize before counting retries towards unstable (ns|us|ms|s|m|h) - option: health-timeout description: Maximum time to allow one check to run (ns|us|ms|s|m|h) - option: host-add - default_value: '[]' description: Add or update a custom host-to-IP mapping (host:ip) - option: host-rm - default_value: '[]' description: Remove a custom host-to-IP mapping (host:ip) - option: hostname description: Container hostname - option: image description: Service image tag - option: label-add - default_value: '[]' description: Add or update a service label - option: label-rm - default_value: '[]' description: Remove a label by its key - option: limit-cpu - default_value: "0.000" description: Limit CPUs - option: limit-memory default_value: "0" @@ -99,13 +91,15 @@ options: - option: log-driver description: Logging driver for service - option: log-opt - default_value: '[]' description: Logging driver options - option: mount-add description: Add or update a mount on a service - option: mount-rm - default_value: '[]' description: Remove a mount by its target path +- option: network-add + description: Add a network +- option: network-rm + description: Remove a network - option: no-healthcheck default_value: "false" description: Disable any container-specified HEALTHCHECK @@ -117,13 +111,16 @@ options: description: Add or update a published port - option: publish-rm description: Remove a published port by its target port +- option: quiet + shorthand: q + default_value: "false" + description: Suppress progress output - option: read-only default_value: "false" description: Mount the container's root filesystem as read only - option: replicas description: Number of tasks - option: reserve-cpu - default_value: "0.000" description: Reserve CPUs - option: reserve-memory default_value: "0" @@ -141,9 +138,8 @@ options: description: Rollback to previous specification - option: rollback-delay default_value: 0s - description: Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s) + description: Delay between task rollbacks (ns|us|ms|s|m|h) - option: rollback-failure-action - default_value: pause description: Action on rollback failure ("pause"|"continue") - option: rollback-max-failure-ratio default_value: "0" @@ -151,15 +147,16 @@ options: - option: rollback-monitor default_value: 0s description: | - Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 0s) + Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) +- option: rollback-order + description: Rollback order ("start-first"|"stop-first") - option: rollback-parallelism - default_value: "1" + default_value: "0" description: | Maximum number of tasks rolled back simultaneously (0 to roll back all at once) - option: secret-add description: Add or update a secret on a service - option: secret-rm - default_value: '[]' description: Remove a secret - option: stop-grace-period description: | @@ -172,9 +169,8 @@ options: description: Allocate a pseudo-TTY - option: update-delay default_value: 0s - description: Delay between updates (ns|us|ms|s|m|h) (default 0s) + description: Delay between updates (ns|us|ms|s|m|h) - option: update-failure-action - default_value: pause description: Action on update failure ("pause"|"continue"|"rollback") - option: update-max-failure-ratio default_value: "0" @@ -182,9 +178,11 @@ options: - option: update-monitor default_value: 0s description: | - Duration after each task update to monitor for failure (ns|us|ms|s|m|h) (default 0s) + Duration after each task update to monitor for failure (ns|us|ms|s|m|h) +- option: update-order + description: Update order ("start-first"|"stop-first") - option: update-parallelism - default_value: "1" + default_value: "0" description: | Maximum number of tasks updated simultaneously (0 to update all at once) - option: user @@ -219,13 +217,13 @@ examples: "### Update a service\n\n```bash\n$ docker service update --limit-cpu \ type=volume,source=other-volume,target=/somewhere-else \\\n myservice\n\nmyservice\n\n$ docker service update --mount-rm /somewhere myservice\n\nmyservice\n```\n\n### Rolling back to the previous version of a service \n\nUse the `--rollback` option to roll - back to the previous version of the service.\n\nThis will revert the service to + back to the previous version of the service. \n\nThis will revert the service to the configuration that was in place before the most recent `docker service update` command.\n\nThe following example updates the number of replicas for the service from 4 to 5, and then rolls back to the previous configuration.\n\n```bash\n$ docker service update --replicas=5 web\n\nweb\n\n$ docker service ls\n\nID NAME \ MODE REPLICAS IMAGE\n80bvrzp6vxf3 web replicated 0/5 nginx:alpine\n\n```\nRoll - back the `web` service...\n\n```bash\n$ docker service update --rollback web\n\nweb\n\n$ + back the `web` service... \n\n```bash\n$ docker service update --rollback web\n\nweb\n\n$ docker service ls\n\nID NAME MODE REPLICAS IMAGE\n80bvrzp6vxf3 \ web replicated 0/4 nginx:alpine\n\n```\n\nOther options can be combined with `--rollback` as well, for example, `--update-delay 0s` to execute the rollback diff --git a/_data/engine-cli-edge/docker_stack_deploy.yaml b/_data/engine-cli-edge/docker_stack_deploy.yaml index 859f5131a5f..96bb9a00632 100644 --- a/_data/engine-cli-edge/docker_stack_deploy.yaml +++ b/_data/engine-cli-edge/docker_stack_deploy.yaml @@ -13,6 +13,9 @@ options: - option: compose-file shorthand: c description: Path to a Compose file +- option: prune + default_value: "false" + description: Prune services that are no longer referenced - option: with-registry-auth default_value: "false" description: Send registry authentication details to Swarm agents diff --git a/_data/engine-cli-edge/docker_stack_rm.yaml b/_data/engine-cli-edge/docker_stack_rm.yaml index e2aa195e0e5..dcdd30420eb 100644 --- a/_data/engine-cli-edge/docker_stack_rm.yaml +++ b/_data/engine-cli-edge/docker_stack_rm.yaml @@ -1,10 +1,46 @@ command: docker stack rm aliases: remove, down -short: Remove the stack +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 +usage: docker stack rm STACK [STACK...] pname: docker stack plink: docker_stack.yaml +examples: |- + ### Remove a stack + + This will remove the stack with the name `myapp`. Services, networks, and secrets associated with the stack will be removed. + + ```bash + $ docker stack rm myapp + + Removing service myapp_redis + Removing service myapp_web + Removing service myapp_lb + Removing network myapp_default + Removing network myapp_frontend + ``` + + ### Remove multiple stacks + + This will remove all the specified stacks, `myapp` and `vossibility`. Services, networks, and secrets associated with all the specified stacks will be removed. + + ```bash + $ docker stack rm myapp vossibility + + Removing service myapp_redis + Removing service myapp_web + Removing service myapp_lb + Removing network myapp_default + Removing network myapp_frontend + Removing service vossibility_nsqd + Removing service vossibility_logstash + Removing service vossibility_elasticsearch + Removing service vossibility_kibana + Removing service vossibility_ghollector + Removing service vossibility_lookupd + Removing network vossibility_default + Removing network vossibility_vossibility + ``` diff --git a/_data/engine-cli-edge/docker_stack_services.yaml b/_data/engine-cli-edge/docker_stack_services.yaml index 622d33d1bf6..bfb96e05332 100644 --- a/_data/engine-cli-edge/docker_stack_services.yaml +++ b/_data/engine-cli-edge/docker_stack_services.yaml @@ -72,11 +72,9 @@ examples: |- `ID`, `Mode`, and `Replicas` entries separated by a colon for all services: ```bash - {% raw %} $ docker stack services --format "{{.ID}}: {{.Mode}} {{.Replicas}}" 0zmvwuiu3vue: replicated 10/10 fm6uf97exkul: global 5/5 - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_stats.yaml b/_data/engine-cli-edge/docker_stats.yaml index 754fb1da77a..23d95475dfe 100644 --- a/_data/engine-cli-edge/docker_stats.yaml +++ b/_data/engine-cli-edge/docker_stats.yaml @@ -103,26 +103,22 @@ examples: |- `Container` and `CPUPerc` entries separated by a colon for all images: ```bash - {% raw %} $ docker stats --format "{{.Container}}: {{.CPUPerc}}" 09d3bb5b1604: 6.61% 9db7aa4d986d: 9.19% 3f214c61ad1d: 0.00% - {% endraw %} ``` To list all containers statistics with their name, CPU percentage and memory usage in a table format you can use: ```bash - {% raw %} $ docker stats --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" CONTAINER CPU % PRIV WORKING SET 1285939c1fd3 0.07% 796 KiB / 64 MiB 9c76f7834ae2 0.07% 2.746 MiB / 64 MiB d1ea048f04e4 0.03% 4.583 MiB / 64 MiB - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_system.yaml b/_data/engine-cli-edge/docker_system.yaml index d3da32d99d8..12a585ecf80 100644 --- a/_data/engine-cli-edge/docker_system.yaml +++ b/_data/engine-cli-edge/docker_system.yaml @@ -1,6 +1,6 @@ command: docker system short: Manage Docker -long: Manage docker. +long: Manage Docker. usage: docker system pname: docker plink: docker.yaml diff --git a/_data/engine-cli-edge/docker_update.yaml b/_data/engine-cli-edge/docker_update.yaml index e9320f997fc..de5d4e2f0a5 100644 --- a/_data/engine-cli-edge/docker_update.yaml +++ b/_data/engine-cli-edge/docker_update.yaml @@ -35,6 +35,8 @@ options: shorthand: c default_value: "0" description: CPU shares (relative weight) +- option: cpus + description: Number of CPUs - option: cpuset-cpus description: CPUs in which to allow execution (0-3, 0,1) - option: cpuset-mems diff --git a/_data/engine-cli-edge/docker_volume.yaml b/_data/engine-cli-edge/docker_volume.yaml index 7df8a9b9270..ad5134eae00 100644 --- a/_data/engine-cli-edge/docker_volume.yaml +++ b/_data/engine-cli-edge/docker_volume.yaml @@ -1,8 +1,8 @@ command: docker volume short: Manage volumes long: |- - Manage volumes. You can use subcommand to create, list, inspect, remove - volumes. + Manage volumes. You can use subcommands to create, inspect, list, remove, or + prune volumes. usage: docker volume COMMAND pname: docker plink: docker.yaml diff --git a/_data/engine-cli-edge/docker_volume_create.yaml b/_data/engine-cli-edge/docker_volume_create.yaml index 929ac3cc908..8b774d254ba 100644 --- a/_data/engine-cli-edge/docker_volume_create.yaml +++ b/_data/engine-cli-edge/docker_volume_create.yaml @@ -12,7 +12,6 @@ options: default_value: local description: Specify volume driver name - option: label - default_value: '[]' description: Set metadata for a volume - option: name description: Specify volume name diff --git a/_data/engine-cli-edge/docker_volume_ls.yaml b/_data/engine-cli-edge/docker_volume_ls.yaml index 1344d6565aa..95499710c43 100644 --- a/_data/engine-cli-edge/docker_volume_ls.yaml +++ b/_data/engine-cli-edge/docker_volume_ls.yaml @@ -160,12 +160,10 @@ examples: |- `Name` and `Driver` entries separated by a colon for all volumes: ```bash - {% raw %} $ docker volume ls --format "{{.Name}}: {{.Driver}}" vol1: local vol2: local vol3: local - {% endraw %} ``` diff --git a/_data/engine-cli-edge/docker_volume_prune.yaml b/_data/engine-cli-edge/docker_volume_prune.yaml index 6462d7e9dd4..e18f78a6676 100644 --- a/_data/engine-cli-edge/docker_volume_prune.yaml +++ b/_data/engine-cli-edge/docker_volume_prune.yaml @@ -6,6 +6,8 @@ usage: docker volume prune [OPTIONS] pname: docker volume plink: docker_volume.yaml options: +- option: filter + description: Provide filter values (e.g. 'label=