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
This commit is contained in:
Misty Stanley-Jones 2017-05-05 12:50:22 -07:00 committed by John Mulhausen
parent 6456b4a54f
commit 9c648cf079
54 changed files with 1242 additions and 696 deletions

View File

@ -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

View File

@ -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

View File

@ -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=<value>` option sets a container's isolation
technology. On Linux, the only supported is the `default` option which uses
Linux namespaces. On Microsoft Windows, you can specify these values:
| Value | Description |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. |
| `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=<value>` option
sets a container's isolation\ntechnology. On Linux, the only supported is the `default`
option which uses\nLinux namespaces. On Microsoft Windows, you can specify these
values:\n\n\n| Value | Description |\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n|
`default` | Use the value specified by the Docker daemon's `--exec-opt` . If the
`daemon` does not specify an isolation technology, Microsoft Windows uses `process`
as its default value. |\n| `process` | Namespace isolation only. |\n|
`hyperv` | Hyper-V hypervisor partition-based isolation. |\n\nSpecifying
the `--isolation` flag without a value is the same as setting `--isolation=\"default\"`.\n\n###
Add entries to container hosts file (--add-host)\n\nYou can add other hosts into
a container's `/etc/hosts` file by using one or\nmore `--add-host` flags. This example
adds a static address for a host named\n`docker`:\n\n $ docker build --add-host=docker:10.180.0.1
.\n\n### 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<missing>
\ 5 minutes ago /bin/sh -c rm /remove_me 0
B\n<missing> 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0
B\n<missing> 5 minutes ago /bin/sh -c touch remove_me /remove_me
\ 0 B\n<missing> 5 minutes ago /bin/sh -c echo world >>
/hello 0 B\n<missing> 6 minutes ago /bin/sh -c echo
hello > /hello 0 B\n<missing> 7 weeks ago /bin/sh
-c #(nop) CMD [\"sh\"] 0 B\n<missing> 7 weeks ago /bin/sh
-c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB\n\n```\nWe could find that all
layer's name is `<missing>`, and there is a new layer with COMMENT `merge`.\n\nTest
the image, check for `/remove_me` being gone, make sure `hello\\nworld` is in `/hello`,
make sure the `HELLO` envvar's value is `world`."

View File

@ -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 <hannibal@a-team.com>")
- option: change
shorthand: c
default_value: '[]'
description: Apply Dockerfile instruction to the created image
- option: message
shorthand: m

View File

@ -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

View File

@ -10,7 +10,6 @@ options:
description: Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
- option: change
shorthand: c
default_value: '[]'
description: Apply Dockerfile instruction to the created image
- option: message
shorthand: m

View File

@ -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

View File

@ -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

View File

@ -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 %}
```

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: '[]'

View File

@ -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
```

View File

@ -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=<key>` or `label=<key>=<value>`)\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

View File

@ -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
``

View File

@ -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")

View File

@ -126,10 +126,8 @@ examples: |-
### Formatting the output
```bash
{% raw %}
$ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest
8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21
{% endraw %}
```

View File

@ -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 %}
```

View File

@ -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 %}
```

View File

@ -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

View File

@ -9,18 +9,19 @@ plink: docker_secret.yaml
options:
- option: label
shorthand: l
default_value: '[]'
description: Secret labels
examples: |-
### Create a secret
```bash
$ echo <secret> | 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"
}
}
}
]
```

View File

@ -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
```

View File

@ -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=<key>` or `label=<key>=<value>`)
* [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
```

View File

@ -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,
<tt>volume-opt=some-option=some-value,some-other-option=some-other-value</tt>.
<tt>volume-opt=some-option=some-value,volume-opt=some-other-option=some-other-value</tt>.
For available options for a given driver, refer to that driver's
documentation.
</td>
@ -898,6 +907,5 @@ examples: |-
$ docker inspect --format="{{.Config.Hostname}}" hosttempl.1.wo41w8hg8qanxwjwsg4kxpprj
x3ti0erg11rjpg64m75kej2mz-hosttempl
{% endraw %}
```

View File

@ -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

View File

@ -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 %}
```

View File

@ -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

View File

@ -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

View File

@ -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
```

View File

@ -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 %}
```

View File

@ -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 %}
```

View File

@ -1,6 +1,6 @@
command: docker system
short: Manage Docker
long: Manage docker.
long: Manage Docker.
usage: docker system
pname: docker
plink: docker.yaml

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 %}
```

View File

@ -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=<label>')
- option: force
shorthand: f
default_value: "false"

View File

@ -2,7 +2,7 @@ horizontalnav:
- title: Guides
path: /
node: guides
- title: Product manuals
- title: Product Manuals
path: /manuals/
node: manuals
- title: Glossary
@ -62,9 +62,9 @@ guides:
- path: /docker-for-aws/why/
title: Why Docker for AWS?
- path: /docker-for-aws/
title: Setup & prerequisites
title: Setup & Prerequisites
- path: /docker-for-aws/iam-permissions/
title: IAM permissions
title: IAM Permissions
- path: /docker-for-aws/scaling/
title: Scaling
- path: /docker-for-aws/upgrade/
@ -76,17 +76,17 @@ guides:
- path: /docker-for-aws/faqs/
title: FAQs
- path: /docker-for-aws/opensource/
title: Open source licensing
title: Open Source Licensing
- path: /docker-for-aws/release-notes/
title: Release notes
title: Release Notes
- path: /docker-for-aws/archive/
title: Template archive
title: Template Archive
- sectiontitle: Docker for Azure
section:
- path: /docker-for-azure/why/
title: Why Docker for Azure?
- path: /docker-for-azure/
title: Setup & prerequisites
title: Setup & Prerequisites
- path: /docker-for-azure/upgrade/
title: Upgrading
- path: /docker-for-azure/deploy/
@ -96,15 +96,15 @@ guides:
- path: /docker-for-azure/faqs/
title: FAQs
- path: /docker-for-azure/opensource/
title: Open source licensing
title: Open Source Licensing
- path: /docker-for-azure/release-notes/
title: Release notes
title: Release Notes
- path: /docker-for-azure/archive/
title: Template archive
- sectiontitle: Docker Toolbox (legacy)
title: Template Archive
- sectiontitle: Docker Toolbox (Legacy)
section:
- path: /toolbox/overview/
title: Toolbox overview
title: Toolbox Overview
- path: /toolbox/toolbox_install_mac/
title: Install Toolbox on Mac
- path: /toolbox/toolbox_install_windows/
@ -112,37 +112,59 @@ guides:
- sectiontitle: Kitematic
section:
- path: /kitematic/userguide/
title: "Kitematic user guide: intro &amp; overview"
title: "Kitematic User Guide: Intro &amp; Overview"
- path: /kitematic/nginx-web-server/
title: Set up an Nginx web server
- path: /kitematic/minecraft-server/
title: Set up a Minecraft Server
- path: /kitematic/rethinkdb-dev-database/
title: Creating a local RethinkDB database for development
title: Creating a Local RethinkDB Database for Development
- path: /kitematic/faq/
title: Frequently asked questions
title: Frequently Asked Questions
- path: /kitematic/known-issues/
title: Known issues
title: Known Issues
- path: /toolbox/faqs/troubleshoot/
title: Troubleshooting
- path: /release-notes/
title: Docker release notes
- sectiontitle: Get started
- sectiontitle: Get Started
section:
- sectiontitle: Get started with Docker
- path: /learn/
title: Learn Docker
- sectiontitle: Docker basics
section:
- title: "Part 1: Orientation"
path: /get-started/
- title: "Part 2: Containers"
path: /get-started/part2/
- title: "Part 3: Services"
path: /get-started/part3/
- title: "Part 4: Swarms"
path: /get-started/part4/
- title: "Part 5: Stacks"
path: /get-started/part5/
- title: "Part 6: Deploy your app"
path: /get-started/part6/
- path: /engine/getstarted/
title: Get Started with Docker
- path: /engine/getstarted/step_one/
title: Install Docker and run hello-world
- path: /engine/getstarted/step_two/
title: Understand images &amp; containers
- path: /engine/getstarted/step_three/
title: Find &amp; run the whalesay image
- path: /engine/getstarted/step_four/
title: Build your own image
- path: /engine/getstarted/step_five/
title: Create a Docker Hub account &amp; repository
- path: /engine/getstarted/step_six/
title: Tag, push, &amp; pull your image
- path: /engine/getstarted/last_page/
title: Learning more
- sectiontitle: Define and deploy your app
section:
- path: /engine/getstarted-voting-app/
title: Sample app overview
- path: /engine/getstarted-voting-app/node-setup/
title: Set up Dockerized machines
- path: /engine/getstarted-voting-app/create-swarm/
title: Create a swarm
- path: /engine/getstarted-voting-app/deploy-app/
title: Deploy the app
- path: /engine/getstarted-voting-app/test-drive/
title: Try out the voting app
- path: /engine/getstarted-voting-app/customize-app/
title: Customize the app and redeploy
- path: /engine/getstarted-voting-app/cleanup/
title: Graceful shutdown, reboot, and clean-up
- sectiontitle: Learn by example
section:
- path: /engine/tutorials/networkingcontainers/
@ -151,10 +173,10 @@ guides:
title: Manage data in containers
- path: /engine/docker-overview/
title: Docker overview
- sectiontitle: User guide
- sectiontitle: User Guide
section:
- path: /engine/userguide/
title: Overview
- path: /engine/userguide/intro/
title: Introduction
- sectiontitle: Work with images
section:
- path: /engine/userguide/eng-image/dockerfile_best-practices/
@ -163,6 +185,8 @@ guides:
title: Create a base image
- path: /engine/userguide/eng-image/image_management/
title: Image management
- path: /engine/userguide/eng-image/multistage-build/
title: Use multi-stage builds (edge only)
- sectiontitle: Docker storage drivers
section:
- path: /engine/userguide/storagedriver/imagesandcontainers/
@ -216,10 +240,10 @@ guides:
- path: /engine/breaking_changes/
title: Breaking changes
- path: /engine/deprecated/
title: Deprecated Engine features
title: Deprecated Engine Features
- path: /engine/faq/
title: FAQ
- sectiontitle: Admin guide
- sectiontitle: Admin Guide
section:
- path: /engine/admin/
title: Configuring and running Docker
@ -240,25 +264,25 @@ guides:
- path: /engine/admin/logging/view_container_logs/
title: View a container's logs
- path: /engine/admin/logging/overview/
title: Configuring logging drivers
title: Configuring Logging Drivers
- path: /engine/admin/logging/log_tags/
title: Log tags for logging driver
- path: /engine/admin/logging/logentries/
title: Logentries logging driver
- path: /engine/admin/logging/awslogs/
title: Amazon CloudWatch logs logging driver
title: Amazon CloudWatch Logs logging driver
- path: /engine/admin/logging/etwlogs/
title: ETW logging driver
- path: /engine/admin/logging/fluentd/
title: Fluentd logging driver
- path: /engine/admin/logging/gcplogs/
title: Google Cloud logging driver
title: Google Cloud Logging driver
- path: /engine/admin/logging/journald/
title: Journald logging driver
- path: /engine/admin/logging/splunk/
title: Splunk logging driver
- path: /engine/admin/dsc/
title: PowerShell DSC usage
title: PowerShell DSC Usage
- path: /engine/admin/ansible/
title: Using Ansible
- path: /engine/admin/chef/
@ -334,7 +358,7 @@ guides:
- path: /engine/security/security/
title: Docker security
- path: /engine/security/non-events/
title: Docker security non-events
title: Docker Security Non-events
- path: /engine/security/https/
title: Protect the Docker daemon socket
- path: /engine/security/certificates/
@ -373,11 +397,11 @@ guides:
path: /engine/extend/config/
- path: /engine/extend/plugin_api/
title: Plugins API
- sectiontitle: Open source at Docker
- sectiontitle: Open Source at Docker
section:
- path: /opensource/code/
title: Quickstart contribution
- sectiontitle: Set up for Engine development
- sectiontitle: Set up for Engine Development
section:
- path: /opensource/project/who-written-for/
title: README first
@ -410,7 +434,7 @@ guides:
- sectiontitle: Other ways to contribute
section:
- path: /opensource/ways/meetups/
title: Organize a Docker meetup
title: Organize a Docker Meetup
- path: /opensource/ways/issues/
title: Organize our issues
- path: /opensource/ways/community/
@ -434,7 +458,7 @@ guides:
- sectiontitle: Governance
section:
- path: /opensource/governance/dgab-info/
title: Docker governance advisory board
title: Docker Governance Advisory Board
- path: /opensource/governance/board-profiles/
title: Board member profiles
- path: /opensource/governance/conduct-code/
@ -473,10 +497,12 @@ reference:
title: Get started
- path: /engine/api/sdks/
title: SDKs
- path: /engine/api/v1.29/
title: v1.29 Reference
- path: /engine/api/v1.28/
title: v1.28 reference
title: v1.28 Reference
- path: /engine/api/v1.27/
title: v1.27 reference
title: v1.27 Reference
- sectiontitle: Previous API versions
section:
- path: /engine/api/version-history/
@ -827,7 +853,7 @@ reference:
title: docker volume rm
- path: /engine/reference/commandline/wait/
title: docker wait
- title: Edge daemon CLI reference (dockerd)
- title: Edge Daemon CLI reference (dockerd)
path: /edge/engine/reference/commandline/dockerd/
- sectiontitle: Docker Edge Engine (docker) CLI
section:
@ -1212,7 +1238,7 @@ manuals:
- path: /engine/installation/
title: Install Docker EE
nosync: true
- sectiontitle: Commercially supported Docker Engine
- sectiontitle: Commercially Supported Docker Engine
section:
- sectiontitle: 1.13
section:
@ -1239,14 +1265,14 @@ manuals:
- path: /docker-cloud/
title: About Docker Cloud
- path: /docker-cloud/dockerid/
title: Docker Cloud settings and Docker ID
title: Docker Cloud Settings and Docker ID
- path: /docker-cloud/orgs/
title: Organizations and teams
title: Organizations and Teams
- sectiontitle: Manage builds and images
- sectiontitle: Manage Builds and Images
section:
- path: /docker-cloud/builds/
title: Builds and images overview
title: Builds and Images Overview
- path: /docker-cloud/builds/repos/
title: Docker Cloud repositories
- path: /docker-cloud/builds/link-source/
@ -1254,19 +1280,19 @@ manuals:
- path: /docker-cloud/builds/push-images/
title: Push images to Docker Cloud
- path: /docker-cloud/builds/image-scan/
title: Docker security scanning
title: Docker Security Scanning
- path: /docker-cloud/builds/automated-build/
title: Automated builds
- path: /docker-cloud/builds/automated-testing/
title: Automated repository tests
- path: /docker-cloud/builds/advanced/
title: Advanced options for autobuild and autotest
- sectiontitle: Manage swarms (beta swarm mode)
title: Advanced options for Autobuild and Autotest
- sectiontitle: Manage Swarms (Beta Swarm Mode)
section:
- path: /docker-cloud/cloud-swarm/
title: Overview
- path: /docker-cloud/cloud-swarm/using-swarm-mode/
title: Using Swarm mode
title: Using Swarm Mode
- path: /docker-cloud/cloud-swarm/register-swarms/
title: Register existing swarms
- path: /docker-cloud/cloud-swarm/create-cloud-swarm-aws/
@ -1284,7 +1310,7 @@ manuals:
- sectiontitle: Manage Infrastructure (standard mode)
section:
- path: /docker-cloud/infrastructure/
title: Infrastructure overview
title: Infrastructure Overview
- path: /docker-cloud/infrastructure/deployment-strategies/
title: Container distribution strategies
- path: /docker-cloud/infrastructure/link-aws/
@ -1302,23 +1328,23 @@ manuals:
- path: /docker-cloud/infrastructure/docker-upgrade/
title: Upgrade Docker Engine on a node
- path: /docker-cloud/infrastructure/byoh/
title: Use the Docker Cloud agent
title: Use the Docker Cloud Agent
- path: /docker-cloud/infrastructure/cloud-on-packet.net-faq/
title: Using Docker Cloud and Packet.net
- path: /docker-cloud/infrastructure/cloud-on-aws-faq/
title: Using Docker Cloud on AWS
- sectiontitle: Manage nodes and apps (standard mode)
- sectiontitle: Manage Nodes and Apps (Standard Mode)
section:
- path: /docker-cloud/standard/
title: Overview
- sectiontitle: Getting started
- sectiontitle: Getting Started
section:
- path: /docker-cloud/getting-started/
title: Getting started with Docker Cloud
- path: /docker-cloud/getting-started/intro_cloud/
title: Introducing Docker Cloud
- path: /docker-cloud/getting-started/connect-infra/
title: Link to your infrastructure
title: Link to your Infrastructure
- path: /docker-cloud/getting-started/your_first_node/
title: Deploy your first node
- path: /docker-cloud/getting-started/your_first_service/
@ -1326,7 +1352,7 @@ manuals:
- sectiontitle: Deploy an application
section:
- path: /docker-cloud/getting-started/deploy-app/1_introduction/
title: Introduction to deploying an app in Docker Cloud
title: Introduction to Deploying an app in Docker Cloud
- path: /docker-cloud/getting-started/deploy-app/2_set_up/
title: Set up your environment
- path: /docker-cloud/getting-started/deploy-app/3_prepare_the_app/
@ -1348,13 +1374,13 @@ manuals:
- path: /docker-cloud/getting-started/deploy-app/11_service_stacks/
title: Stackfiles for your service
- path: /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/
title: Data management with volumes
- sectiontitle: Manage applications
title: Data management with Volumes
- sectiontitle: Manage Applications
section:
- path: /docker-cloud/apps/
title: Applications in Docker Cloud
- path: /docker-cloud/apps/deploy-to-cloud-btn/
title: Add a deploy to Docker Cloud button
title: Add a Deploy to Docker Cloud button
- path: /docker-cloud/apps/auto-destroy/
title: Automatic container destroy
- path: /docker-cloud/apps/autorestart/
@ -1374,7 +1400,7 @@ manuals:
- path: /docker-cloud/apps/service-scaling/
title: Scale your service
- path: /docker-cloud/apps/api-roles/
title: Service API roles
title: Service API Roles
- path: /docker-cloud/apps/service-links/
title: Service discovery and links
- path: /docker-cloud/apps/triggers/
@ -1391,9 +1417,9 @@ manuals:
- path: /docker-cloud/installing-cli/
title: The Docker Cloud CLI
- path: /docker-cloud/docker-errors-faq/
title: Known issues in Docker Cloud
title: Known Issues in Docker Cloud
- path: /docker-cloud/release-notes/
title: Release notes
title: Release Notes
- sectiontitle: Docker Compose
section:
- path: /compose/overview/
@ -1401,15 +1427,15 @@ manuals:
- path: /compose/install/
title: Install Compose
- path: /compose/gettingstarted/
title: Getting started
title: Getting Started
- sectiontitle: Compose (docker-compose) CLI reference
section:
- path: /compose/reference/overview/
title: Overview of docker-compose CLI
- path: /compose/reference/envvars/
title: CLI environment variables
title: CLI Environment Variables
- path: /compose/completion/
title: Command-line completion
title: Command-line Completion
- path: /compose/reference/build/
title: build
- path: /compose/reference/bundle/
@ -1458,7 +1484,7 @@ manuals:
title: unpause
- path: /compose/reference/up/
title: up
- sectiontitle: Compose file reference
- sectiontitle: Compose File Reference
section:
- path: /compose/compose-file/
title: Version 3
@ -1469,9 +1495,9 @@ manuals:
- path: /compose/compose-file/compose-versioning/
title: About versions and upgrading
- path: /compose/faq/
title: Frequently asked questions
title: Frequently Asked Questions
- path: /compose/bundles/
title: Docker stacks and distributed application bundles
title: Docker Stacks and Distributed Application Bundles
- path: /compose/swarm/
title: Using Compose with Swarm
- path: /compose/env-file/
@ -1485,7 +1511,7 @@ manuals:
- path: /compose/production/
title: Using Compose in production
- path: /compose/link-env-deprecated/
title: Link environment variables (deprecated)
title: Link Environment Variables (deprecated)
- path: /compose/startup-order/
title: Control startup order
- sectiontitle: Docker Datacenter
@ -1494,8 +1520,6 @@ manuals:
title: Deploy Datacenter on AWS
- path: /datacenter/install/linux/
title: Deploy Datacenter on Linux
- path: /datacenter/install/azure/
title: Deploy Datacenter on Azure
- sectiontitle: Universal Control Plane
section:
- path: /datacenter/ucp/2.1/guides/
@ -1875,7 +1899,7 @@ manuals:
- path: /datacenter/ucp/2.0/guides/support/
title: Get support
- path: /datacenter/ucp/2.0/guides/release-notes/
title: Release notes
title: Release Notes
- sectiontitle: Universal Control Plane 1.0
section:
- path: /datacenter/ucp/1.1/overview/
@ -1952,10 +1976,10 @@ manuals:
title: Deploy an app from the UI
- path: /datacenter/ucp/1.1/applications/deploy-app-cli/
title: Deploy an app from the CLI
- sectiontitle: UCP tool CLI
- sectiontitle: UCP Tool CLI
section:
- path: /datacenter/ucp/1.1/reference/
title: UCP tool v1.1 overview
title: UCP Tool v1.1 overview
- path: /datacenter/ucp/1.1/reference/backup/
title: backup
- path: /datacenter/ucp/1.1/reference/dump-certs/
@ -1991,7 +2015,7 @@ manuals:
- path: /datacenter/ucp/1.1/support/
title: Get support
- path: /datacenter/ucp/1.1/release_notes/
title: Release notes
title: Release Notes
- sectiontitle: Docker Trusted Registry 2.1
section:
- path: /datacenter/dtr/2.1/guides/
@ -2203,7 +2227,7 @@ manuals:
- path: /docker-for-mac/docker-toolbox/
title: Docker for Mac vs. Docker Toolbox
- path: /docker-for-mac/multi-arch/
title: Leveraging Multi-CPU architecture support
title: Leveraging Multi-CPU Architecture Support
- path: /docker-for-mac/networking/
title: Networking
- path: /docker-for-mac/osxfs/
@ -2211,31 +2235,31 @@ manuals:
- path: /docker-for-mac/osxfs-caching/
title: Performance tuning for volume mounts (shared filesystems)
- path: /docker-for-mac/troubleshoot/
title: Logs and troubleshooting
title: Logs and Troubleshooting
- path: /docker-for-mac/faqs/
title: FAQs
- path: /docker-for-mac/opensource/
title: Open source licensing
title: Open Source Licensing
- path: /docker-for-mac/release-notes/
title: Release notes
title: Release Notes
- sectiontitle: Docker for Windows
section:
- path: /docker-for-windows/
title: Getting started
- path: /docker-for-windows/troubleshoot/
title: Logs and troubleshooting
title: Logs and Troubleshooting
- path: /docker-for-windows/faqs/
title: FAQs
- path: /docker-for-windows/opensource/
title: Open source licensing
title: Open Source Licensing
- path: /docker-for-windows/release-notes/
title: Release notes
title: Release Notes
- title: Docker ID accounts
path: /docker-id/
- sectiontitle: Docker Machine
section:
- path: /machine/overview/
title: Machine overview
title: Machine Overview
- path: /machine/install-machine/
title: Install Machine
- path: /machine/get-started/
@ -2247,7 +2271,7 @@ manuals:
- path: /machine/examples/ocean/
title: Provision Digital Ocean Droplets
- path: /machine/examples/aws/
title: Provision AWS EC2 instances
title: Provision AWS EC2 Instances
- path: /machine/concepts/
title: Machine concepts and help
- sectiontitle: Machine (docker-machine) CLI
@ -2255,7 +2279,7 @@ manuals:
- path: /machine/reference/
title: Machine CLI overview
- path: /machine/completion/
title: Machine command-line completion
title: Machine command-line Completion
- path: /machine/reference/active/
title: active
- path: /machine/reference/config/
@ -2341,21 +2365,21 @@ manuals:
- path: /notary/running_a_service/
title: Running a Notary service
- path: /notary/changelog/
title: Notary changelog
title: Notary Changelog
- sectiontitle: Configuration files
section:
- path: /notary/reference/server-config/
title: Server configuration
title: Server Configuration
- path: /notary/reference/signer-config/
title: Signer configuration
title: Signer Configuration
- path: /notary/reference/client-config/
title: Client configuration
title: Client Configuration
- path: /notary/reference/common-configs/
title: Common Server and signer configurations
title: Common Server and Signer Configurations
- sectiontitle: Docker Registry
section:
- path: /registry/
title: Registry overview
title: Registry Overview
- path: /registry/introduction/
title: Understanding the Registry
- path: /registry/deploying/
@ -2367,7 +2391,7 @@ manuals:
- sectiontitle: Recipes
section:
- path: /registry/recipes/
title: Recipes overview
title: Recipes Overview
- path: /registry/recipes/apache/
title: Authenticating proxy with apache
- path: /registry/recipes/nginx/
@ -2377,11 +2401,11 @@ manuals:
- path: /registry/recipes/osx-setup-guide/
title: Running on macOS
- path: /registry/garbage-collection/
title: Garbage collection
title: Garbage Collection
- path: /registry/insecure/
title: Testing an insecure registry
- path: /registry/deprecated/
title: Deprecated features
title: Deprecated Features
- path: /registry/compatibility/
title: Compatibility
- path: /registry/help/
@ -2389,17 +2413,17 @@ manuals:
- sectiontitle: Registry reference
section:
- path: /registry/spec/api/
title: Registry HTTP API v2
title: Registry HTTP API V2
- sectiontitle: Registry image manifests
section:
- path: /registry/spec/manifest-v2-1/
title: Image manifest v 2, schema 1
title: Image Manifest V 2, Schema 1
- path: /registry/spec/manifest-v2-2/
title: Image manifest v 2, schema 2
title: Image Manifest V 2, Schema 2
- sectiontitle: Registry storage drivers
section:
- path: /registry/storage-drivers/
title: Storage driver overview
title: Storage Driver overview
- path: /registry/storage-drivers/oss/
title: Aliyun OSS storage driver
- path: /registry/storage-drivers/filesystem/
@ -2417,19 +2441,19 @@ manuals:
- sectiontitle: Registry specifications
section:
- path: /registry/spec/auth/
title: Docker Registry token authentication
title: Docker Registry Token Authentication
- path: /registry/spec/auth/jwt/
title: Token authentication implementation
title: Token Authentication Implementation
- path: /registry/spec/auth/oauth/
title: Oauth2 token authentication
title: Oauth2 Token Authentication
- path: /registry/spec/auth/scope/
title: Token scope documentation
title: Token Scope Documentation
- path: /registry/spec/auth/token/
title: Token authentication specification
title: Token Authentication Specification
- sectiontitle: Docker Store
section:
- path: /docker-store/
title: Docker Store overview
title: Docker Store Overview
- path: /docker-store/publish/
title: Submit a product to Docker Store
- path: /docker-store/faq/
@ -2443,23 +2467,23 @@ manuals:
- path: /docker-hub/accounts/
title: Use Docker Hub with Docker ID
- path: /docker-hub/orgs/
title: Teams &amp; organizations
title: Teams &amp; Organizations
- path: /docker-hub/repos/
title: Repositories on Docker Hub
- path: /docker-hub/builds/
title: Automated builds
title: Automated Builds
- path: /docker-hub/webhooks/
title: Webhooks for automated builds
- path: /docker-hub/bitbucket/
title: Automated builds with Bitbucket
title: Automated Builds with Bitbucket
- path: /docker-hub/github/
title: Automated builds from GitHub
title: Automated Builds from GitHub
- path: /docker-hub/official_repos/
title: Official repositories on Docker Hub
title: Official Repositories on Docker Hub
- sectiontitle: Docker Swarm
section:
- path: /swarm/overview/
title: Swarm overview
title: Swarm Overview
- path: /swarm/get-swarm/
title: How to get Swarm
- path: /swarm/install-w-machine/

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Fetches upstream resources from moby/moby and docker/distribution
# Fetches upstream resources from docker/docker and docker/distribution
# before handing off the site to Jekyll to build
# Relies on the following environment variables which are usually set by
# the Dockerfile. Uncomment them here to override for debugging
@ -14,30 +14,32 @@ DISTRIBUTION_SVN_BRANCH="branches/release/2.6"
DISTRIBUTION_BRANCH="release/2.6"
# Directories to get via SVN. We use this because you can't use git to clone just a portion of a repository
svn co https://github.com/moby/moby/"$ENGINE_SVN_BRANCH"/docs/extend md_source/engine/extend || (echo "Failed engine/extend download" && exit -1)
svn co https://github.com/moby/moby/"$ENGINE_SVN_BRANCH"/docs/api md_source/engine/api || (echo "Failed engine/api download" && exit -1) # This will only get you the old API MD files 1.18 through 1.24
svn co https://github.com/docker/docker/"$ENGINE_SVN_BRANCH"/docs/extend md_source/engine/extend || (echo "Failed engine/extend download" && exit -1)
svn co https://github.com/docker/docker/"$ENGINE_SVN_BRANCH"/docs/api md_source/engine/api || (echo "Failed engine/api download" && exit -1) # This will only get you the old API MD files 1.18 through 1.24
svn co https://github.com/docker/distribution/"$DISTRIBUTION_SVN_BRANCH"/docs/spec md_source/registry/spec || (echo "Failed registry/spec download" && exit -1)
# Get the Engine APIs that are in Swagger
# Be careful with the locations on Github for these
wget -O md_source/engine/api/v1.25/swagger.yaml https://raw.githubusercontent.com/moby/moby/v1.13.0/api/swagger.yaml || (echo "Failed 1.25 swagger download" && exit -1)
wget -O md_source/engine/api/v1.26/swagger.yaml https://raw.githubusercontent.com/moby/moby/v17.03.0-ce/api/swagger.yaml || (echo "Failed 1.26 swagger download" && exit -1)
wget -O md_source/engine/api/v1.27/swagger.yaml https://raw.githubusercontent.com/moby/moby/v17.03.1-ce/api/swagger.yaml || (echo "Failed 1.27 swagger download" && exit -1)
wget -O md_source/engine/api/v1.25/swagger.yaml https://raw.githubusercontent.com/docker/docker/v1.13.0/api/swagger.yaml || (echo "Failed 1.25 swagger download" && exit -1)
wget -O md_source/engine/api/v1.26/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.03.0-ce/api/swagger.yaml || (echo "Failed 1.26 swagger download" && exit -1)
wget -O md_source/engine/api/v1.27/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.03.1-ce/api/swagger.yaml || (echo "Failed 1.27 swagger download" && exit -1)
# Get the Edge API Swagger (we only keep the latest one of these
# When you change this you need to make sure to copy the previous
# directory into a new one in the docs git and change the index.html
wget -O md_source/engine/api/v1.28/swagger.yaml https://raw.githubusercontent.com/moby/moby/v17.04.0-ce/api/swagger.yaml || (echo "Failed 1.28 swagger download or the 1.28 directory doesn't exist" && exit -1)
wget -O md_source/engine/api/v1.28/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.04.0-ce/api/swagger.yaml || (echo "Failed 1.28 swagger download or the 1.28 directory doesn't exist" && exit -1)
wget -O md_source/engine/api/v1.29/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.05.x/api/swagger.yaml || (echo "Failed 1.28 swagger download or the 1.29 directory doesn't exist" && exit -1)
# Get a few one-off files that we use directly from upstream
wget -O md_source/engine/reference/builder.md https://raw.githubusercontent.com/moby/moby/"$ENGINE_BRANCH"/docs/reference/builder.md || (echo "Failed engine/reference/builder.md download" && exit -1)
wget -O md_source/engine/reference/run.md https://raw.githubusercontent.com/moby/moby/"$ENGINE_BRANCH"/docs/reference/run.md || (echo "Failed engine/reference/run.md download" && exit -1)
wget -O md_source/engine/reference/commandline/cli.md https://raw.githubusercontent.com/moby/moby/"$ENGINE_BRANCH"/docs/reference/commandline/cli.md || (echo "Failed engine/reference/commandline/cli.md download" && exit -1)
wget -O md_source/engine/deprecated.md https://raw.githubusercontent.com/moby/moby/"$ENGINE_BRANCH"/docs/deprecated.md || (echo "Failed engine/deprecated.md download" && exit -1)
wget -O md_source/engine/reference/builder.md https://raw.githubusercontent.com/docker/docker/"$ENGINE_BRANCH"/docs/reference/builder.md || (echo "Failed engine/reference/builder.md download" && exit -1)
wget -O md_source/engine/reference/run.md https://raw.githubusercontent.com/docker/docker/"$ENGINE_BRANCH"/docs/reference/run.md || (echo "Failed engine/reference/run.md download" && exit -1)
wget -O md_source/engine/reference/commandline/cli.md https://raw.githubusercontent.com/docker/docker/"$ENGINE_BRANCH"/docs/reference/commandline/cli.md || (echo "Failed engine/reference/commandline/cli.md download" && exit -1)
wget -O md_source/engine/deprecated.md https://raw.githubusercontent.com/docker/docker/"$ENGINE_BRANCH"/docs/deprecated.md || (echo "Failed engine/deprecated.md download" && exit -1)
wget -O md_source/registry/configuration.md https://raw.githubusercontent.com/docker/distribution/"$DISTRIBUTION_BRANCH"/docs/configuration.md || (echo "Failed registry/configuration.md download" && exit -1)
# Remove things we don't want in the build
rm md_source/registry/spec/api.md.tmpl
rm -rf md_source/apidocs/cloud-api-source
rm -rf md_source/tests
rm -rf md_source/tests

View File

@ -2,7 +2,7 @@
title: Docker CE Edge documentation
description: Information about current Docker Edge releases
keywords: engine, edge, installation
current_edge: 17.04
current_edge: 17.05
---
The current Docker CE Edge release is {{ page.current_edge }}. The Docker CE
@ -27,18 +27,153 @@ available until a Docker CE Stable release incorporates the feature**.
### Docker CE Edge new features
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" data-target="#1704">17.04</a></li>
<!--<li><a data-toggle="tab" data-target="#1705">17.05</a></li>-->
<li class="active"><a data-toggle="tab" data-target="#1705">17.05</a></li>
<li><a data-toggle="tab" data-target="#1704">17.04</a></li>
</ul>
<div markdown="1" class="tab-content">
<div markdown="1" id="1704" class="tab-pane fade in active">
<div markdown="1" id="1705" class="tab-pane fade in active">
#### Docker CE Edge 17.05
The following major features and changes are included in Docker CE Edge 17.05.
**Docker CE Edge 17.05 also includes the features from Docker CE Edge 17.04.**
Continue reading, or go straight to [API and CLI](#api-and-cli),
[Builder](#builder), [Daemon](#daemon), [Dockerfile](#dockerfile),
[Logging](#logging), [Networking](#networking),
[Operating system support](#operating-system-support), [Runtime](#runtime),
[Security](#security), [Services](#services), or [Stacks](#stacks).
[Read the full release notes](https://github.com/moby/moby/releases/tag/v17.05.0-ce){: target="_blank" class="_" }
##### API and CLI
- Add [version 1.29](/engine/reference/api/v1.29/) of the Docker API.
- Add `--mount` flag to `docker run` and `docker create`
{% include github-pr.md pr="32251" %}
- Add the ability to specify `--type=secret` in `docker inspect`
{% include github-pr.md pr="32124" %}
- Add `--format` and `--filter` options for `docker secret ls`
{% include github-pr.md pr="30810" %} and {% include github-pr.md pr="31552" %}
- Add the ability to only show local or swarm networks in `docker network ls`
{% include github-pr.md pr="31529" %}
- Add the ability to update the `--cpus` value for a running container
{% include github-pr.md pr="31148" %}
- Add label filtering to all `prune` commands
{% include github-pr.md pr="30740" %}
- Add the ability to remove multiple stacks with a single `docker stack rm`
invocation {% include github-pr.md pr="32110" %}
* Improve `docker version --format` option when the client has downgraded the
API version {% include github-pr.md pr="31022" %}
* You are now prompted when using an encrypted client certificate to connect to
a Docker daemon {% include github-pr.md pr="31364" %}
##### Builder
- Add support for multi-stage builds {% include github-pr.md pr="31257" %}
(see [Use multi-stage builds](/engine/userguide/eng-image/multistage-build.md))
- Add support for named build stages when using multi-stage builds
{% include github-pr.md pr="32063" %}
- Add support for using `ARG` variables in the `FROM` instruction in the
Dockerfile {% include github-pr.md pr="31352" %}
- `docker build` now reads the Dockerfile from `STDIN` when using the `-f` flag
{% include github-pr.md pr="31236" %}
- Default build arguments are no longer included in the image history
{% include github-pr.md pr="31584" %}
##### Daemon
- The `--api-cors-header` is no longer ignored if `--api-enable-cors` is not set
{% include github-pr.md pr="32174" %}
- The `--graph` flag is deprecated in favor or `--data-root`
{% include github-pr.md pr="28696" %}
- Document deprecation of the `--api-enable-cors` daemon flag. This flag was
marked as deprecated in Docker 1.6.0 but was inadvertently omitted from the
list of deprecated features. {% include github-pr.md pr="32352" %}
##### Logging
- You can now show the logs for an individual service task in the
`docker service logs` command or via the `/tasks/{id}/logs` REST endpoint
{% include github-pr.md pr="32015" %}
- Add support for logging driver plugins {% include github-pr.md pr="28403" %}
- Add the ability to set `--log-opt env-regex` to match an environment variable
using a regular expression {% include github-pr.md pr="27565" %}
- `docker service logs` is no longer experimental.
{% include github-pr.md pr="32462" %}
##### Networking
- Add the ability to replace, and customize the ingress network
{% include github-pr.md pr="31714" %}
- Files are now written to the correct directory if a custom data-root is set
{% include github-pr.md pr="32505" %}
##### Operating system support
- Ubuntu 12.04 (Precise Pangolin) is no longer supported.
{% include github-pr.md pr="32520" %}
- Ubuntu 17.04 (Zesty Zapus) is now supported.
{% include github-pr.md pr="32435" %}
##### Runtime
- The health probe is now consistently stopped when a container exits
{% include github-pr.md pr="32274" %}
- You can now specify "grace periods" on healthchecks using `--start-period` and `--health-start-period`
to support services and containers with an initial startup delay {% include github-pr.md pr="28938" %}
##### Security
- Add the ability to set SELinux type or MCS labels when using
`--ipc=container:` or `--ipc=host ` {% include github-pr.md pr="30652" %}
##### Services
- You can now show the logs for an individual service task in the
`docker service logs` command or via the `/tasks/{id}/logs` REST endpoint
{% include github-pr.md pr="32015" %}
- You can now specify the update or rollback order for services using
`--update-order` and `--rollback-order` {% include github-pr.md pr="30261" %}
- Add support for synchronous service creation and update {% include github-pr.md pr="31144" %}
- You can now specify "grace periods" on healthchecks using `--start-period` and `--health-start-period`
to support services and containers with an initial startup delay
{% include github-pr.md pr="28938" %}
- `docker service create` now omits fields that are not shown by the user, where
possible. In addition, `docker service inspect` now shows default values that
were not specified by the user. {% include github-pr.md pr="32284" %}
- `docker service logs` is no longer experimental.
{% include github-pr.md pr="32462" %}
- Add support for Credential Spec and SELinux to services
{% include github-pr.md pr="32339" %}
- You can override the entrypoint using the `--entrypoint` flag with
`docker service create` or `docker service update`
{% include github-pr.md pr="29228" %}
- Add `--network-add` and `--network-rm` flags to `docker service update`
{% include github-pr.md pr="32062" %}
- Add the ability to specify the credential specification to
`docker service create` and `docker service update`
{% include github-pr.md pr="32339" %}
- Add the ability to filter by service replication mode when listing services
{% include github-pr.md pr="31538" %}
- Add `--format` option to `docker node ls`
{% include github-pr.md pr="30424" %}
- Tasks are no longer re-deployed unnecessarily when environment-variables are
used {% include github-pr.md pr="32364" %}
##### Stacks
- Add the ability to update stacks to prune services that are no longer defined
in the stack file {% include github-pr.md pr="31302" %}
- `docker stack deploy` now supports `endpoint_mode` when deploying from a stack
file {% include github-pr.md pr="32333" %}
</div> <!-- 17.05 -->
<div markdown="1" id="1704" class="tab-pane fade">
#### Docker CE Edge 17.04
The following major features and changes are included in Docker CE Edge 17.04.
Continue reading, or go straight to [API and CLI](#api-and-cli),
[Daemon](#daemon), [Dockerfile](#dockerfile), [Services](#services), or
[Stacks](#stacks).
[Read the full release notes](https://github.com/moby/moby/releases/tag/v17.04.0-ce){: target="_blank" class="_" }
@ -185,5 +320,4 @@ Continue reading, or go straight to [API and CLI](#api-and-cli),
{% include github-pr.md pr="31795" %}
</div> <!-- 17.04 -->
<!--<div id="1705" class="tab-pane fade">TAB 2 CONTENT</div>-->
</div> <!-- tab-content -->

View File

@ -148,6 +148,7 @@ The `json-file` logging driver supports the following logging options:
| `max-file` | The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. **Only effective when `max-size` is also set.** A positive integer. | `--log-opt max-file=3` |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
> **Note**: If `max-size` and `max-file` are set, `docker logs` only returns the
> log lines from the newest log file.
@ -174,11 +175,12 @@ The following logging options are supported for the `syslog` logging driver:
| `syslog-tls-ca-cert` | The absolute path to the trust certificates signed by the CA. **Ignored if the address protocol is not `tcp+tls`.** | `--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem` |
| `syslog-tls-cert` | The absolute path to the TLS certificate file. **Ignored if the address protocol is not `tcp+tls`**. | `--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem` |
| `syslog-tls-key` | The absolute path to the TLS key file. **Ignored if the address protocol is not `tcp+tls`.** | `--log-opt syslog-tls-key=/etc/ca-certificates/custom/key.pem` |
| `syslog-tls-skip-verify` | If set to `true`, TLS verification is skipped when connecting to the `syslog` daemon. Defaults to `false`. **Ignored if the address protocol is not `tcp+tls`.** | `--log-opt syslog-tls-skip-verify=true` |
| `syslog-tls-skip` | If set to `true`, TLS verification is skipped when connecting to the `syslog` daemon. Defaults to `false`. **Ignored if the address protocol is not `tcp+tls`.** | `--log-opt syslog-tls-skip-verify=true` |
| `tag` | A string that is appended to the `APP-NAME` in the `syslog` message. By default, Docker uses the first 12 characters of the container ID to tag log messages. Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. | `--log-opt tag=mailer` |
| `syslog-format` | The `syslog` message format to use. If not specified the local UNIX syslog format is used, without a specified hostname. Specify `rfc3164` for the RFC-3164 compatible format, `rfc5424` for RFC-5424 compatible format, or `rfc5424micro` for RFC-5424 compatible format with microsecond timestamp resolution. | `--log-opt syslog-format=rfc5424micro` |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples
@ -219,6 +221,7 @@ driver, see [the journald logging driver](journald.md) reference documentation.
| `tag` | A template for setting the `CONTAINER_TAG` value in `journald` logs. Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. | `--log-opt tag=mailer` |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples
@ -243,6 +246,7 @@ The `gelf` logging driver supports the following options:
| `tag` | A string that is appended to the `APP-NAME` in the `gelf` message. By default, Docker uses the first 12 characters of the container ID to tag log messages. Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. | `--log-opt tag=mailer` |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples
@ -272,6 +276,7 @@ The `fluentd` logging driver supports the following options:
| `fluentd-max-retries` | The maximum number of connection attempts before the container stops due to failure to connect. Defaults to `1073741824`, which is effectively infinite. | `--log-opt fluentd-max-retries=200` |
| `fluentd-async-connect`| If set to `false`, Docker blocks on initial connection and the container stops if it cannot connect. Defaults to `false`. | `--log-opt fluentd-async-connect=false` |
| `tag` | A string that is appended to the `APP-NAME` in the `fluentd` message. By default, Docker uses the first 12 characters of the container ID to tag log messages. Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. | `--log-opt tag=mailer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples
@ -353,6 +358,7 @@ The `splunk` logging driver **allows** the following options:
| `tag` | Specify tag for message, which interpret some markup. Default value is {% raw %}`{{.ID}}`{% endraw %} (12 characters of the container ID). Refer to the [log tag option documentation](log_tags.md) for information about customizing the log tag format. | {% raw %}`--log-opt tag="{{.Name}}/{{.FullID}}"`{% endraw %} |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples
@ -412,6 +418,7 @@ options:
| `log-cmd` | | `--log-opt log-cmd=true` | Whether to log the command that started the container. Defaults to `false`. | `--log-opt log-cmd=false` |
| `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md).| `--log-opt labels=production_status,geo` |
| `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon will accept. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` |
| `env-regex`| Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` |
### Examples

View File

@ -0,0 +1,35 @@
---
layout: null
---
<!DOCTYPE html>
<html>
<head>
<title>Docker Engine API v1.29 Reference</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
</body>
</html>

44
engine/api/v1.29/redoc.1.11.0.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,159 @@
---
description: Keeping your images small with multi-stage images
keywords: images, containers, best practices
title: Use multi-stage builds
---
{% include edge_only.md section="page" %}
Multi-stage builds are a new feature in Docker 17.05, and they will be exciting
to anyone who has struggled to optimize Dockerfiles while keeping them easy to
read and maintain.
> **Acknowledgment**:
> Special thanks to [Alex Ellis](https://twitter.com/alexellisuk) for granting
> permission to use his blog post
> [Builder pattern vs. Multi-stage builds in Docker](http://blog.alexellis.io/mutli-stage-docker-builds/)
> as the basis of the examples below.
## Before multi-stage builds
One of the most challenging things about building images is keeping the image
size down. Each instruction in the Dockerfile adds a layer to the image, and you
need to remember to clean up any artifacts you don't need before moving on to
the next layer. To write a really efficient Dockerfile, you have traditionally
needed to employ shell tricks and other logic to keep the layers as small as
possible and to ensure that each layer has the artifacts it needs from the
previous layer and nothing else.
It was actually very common to have one Dockerfile to use for development (which
contained everything needed to build your application), and a slimmed-down one
to use for production, which only contained your application and exactly what
was needed to run it. This has been referred to as the "builder
pattern". Maintaining two Dockerfiles is not ideal.
Here's an example of a `Dockerfile.build` and `Dockerfile` which adhere to the
builder pattern above:
**`Dockerfile.build`**:
```conf
FROM golang:1.7.3
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN go get -d -v golang.org/x/net/html \
&& CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
```
Notice that this example also artificially compresses two `RUN` commands together
using the Bash `&&` operator, to avoid creating an additional layer in the image.
This is failure-prone and hard to maintain. It's easy to insert another command
and forget to continue the line using the `\` character, for example.
**`Dockerfile`**:
```conf
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY app .
CMD ["./app"]
```
**`build.sh`**:
```bash
#!/bin/sh
echo Building alexellis2/href-counter:build
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
-t alexellis2/href-counter:build . -f Dockerfile.build
docker create --name extract alexellis2/href-counter:build
docker cp extract:/go/src/github.com/alexellis/href-counter/app ./app
docker rm -f extract
echo Building alexellis2/href-counter:latest
docker build --no-cache -t alexellis2/href-counter:latest .
rm ./app
```
When you run the `build.sh` script, it needs to build the first image, create
a container from it in order to copy the artifact out, then build the second
image. Both images take up room on your system and you still have the `app`
artifact on your local disk as well.
Multi-stage builds vastly simplify this situation!
## Use multi-stage builds
With multi-stage builds, you use multiple `FROM` statements in your Dockerfile.
Each `FROM` instruction can use a different base, and each of them begins a new
stage of the build. You can selectively copy artifacts from one stage to
another, leaving behind everything you don't want in the final image. To show
how this works, Let's adapt the Dockerfile from the previous section to use
multi-stage builds.
**`Dockerfile`**:
```conf
FROM golang:1.7.3
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/alexellis/href-counter/app .
CMD ["./app"]
```
You only need the single Dockerfile. You don't need a separate build script,
either. Just run `docker build`.
```bash
$ docker build -t alexellis2/href-counter:latest .
```
The end result is the same tiny production image as before, with a
significant reduction in complexity. You don't need to create any intermediate
images and you don't need to extract any artifacts to your local system at all.
How does it work? The second `FROM` instruction starts a new build stage with
the `alpine:latest` image as its base. The `COPY --from=0` line copies just the
built artifact from the previous stage into this new stage. The Go SDK and any
intermediate artifacts are left behind, and not saved in the final image.
### Name your build stages
By default, the stages are not named, and you refer to them by their integer
number, starting with 0 for the first `FROM` instruction. However, you can
name your stages, by adding an `as <NAME>` to the `FROM` instruction. This
example improves the previous one by naming the stages and using the name in
the `COPY` instruction. This means that even if the instructions in your
Dockerfile are re-ordered later, the `COPY` won't break.
```conf
FROM golang:1.7.3 as builder
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/github.com/alexellis/href-counter/app .
CMD ["./app"]
```
## Next steps
- Check out the blog post
[Builder pattern vs. Multi-stage builds in Docker](http://blog.alexellis.io/mutli-stage-docker-builds/)
for full source code and a walk-through of these examples.
- Check out other features available in [Docker Edge](/edge/)

121
netlify.sh Executable file
View File

@ -0,0 +1,121 @@
#!/bin/bash
# Script to build master and edge docs on Netlify
# Replicates the non-archive functionality of the Dockerfile
# First build master
ENGINE_SVN_BRANCH="branches/17.03.x"
ENGINE_BRANCH="17.03.x"
DISTRIBUTION_SVN_BRANCH="branches/release/2.6"
DISTRIBUTION_BRANCH="release/2.6"
svn co https://github.com/docker/docker/$ENGINE_SVN_BRANCH/docs/extend engine/extend \
&& wget -O engine/api/v1.18.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.18.md \
&& wget -O engine/api/v1.19.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.19.md \
&& wget -O engine/api/v1.20.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.20.md \
&& wget -O engine/api/v1.21.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.21.md \
&& wget -O engine/api/v1.22.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.22.md \
&& wget -O engine/api/v1.23.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.23.md \
&& wget -O engine/api/v1.24.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.24.md \
&& wget -O engine/api/version-history.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/version-history.md \
&& wget -O engine/reference/glossary.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/glossary.md \
&& wget -O engine/reference/builder.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/builder.md \
&& wget -O engine/reference/run.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/run.md \
&& wget -O engine/reference/commandline/cli.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/commandline/cli.md \
&& wget -O engine/deprecated.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/deprecated.md \
&& svn co https://github.com/docker/distribution/$DISTRIBUTION_SVN_BRANCH/docs/spec registry/spec \
&& rm registry/spec/api.md.tmpl \
&& wget -O registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md \
&& rm -rf apidocs/cloud-api-source \
&& rm -rf tests \
&& wget -O engine/api/v1.25/swagger.yaml https://raw.githubusercontent.com/docker/docker/v1.13.0/api/swagger.yaml \
&& wget -O engine/api/v1.26/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.03.0-ce/api/swagger.yaml \
&& wget -O engine/api/v1.27/swagger.yaml https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/api/swagger.yaml \
&& jekyll build -d site --config _config.yml \
&& rm -rf site/apidocs/layouts \
&& find site -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g'
echo "Jekyll site in site/"
# Then build edge
ENGINE_SVN_BRANCH="branches/17.04.x"
ENGINE_BRANCH="17.04.x"
DISTRIBUTION_SVN_BRANCH="branches/release/2.6"
DISTRIBUTION_BRANCH="release/2.6"
svn co https://github.com/docker/docker/$ENGINE_SVN_BRANCH/docs/extend engine/extend \
&& wget -O engine/api/v1.18.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.18.md \
&& wget -O engine/api/v1.19.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.19.md \
&& wget -O engine/api/v1.20.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.20.md \
&& wget -O engine/api/v1.21.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.21.md \
&& wget -O engine/api/v1.22.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.22.md \
&& wget -O engine/api/v1.23.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.23.md \
&& wget -O engine/api/v1.24.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/v1.24.md \
&& wget -O engine/api/version-history.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/api/version-history.md \
&& wget -O engine/reference/glossary.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/glossary.md \
&& wget -O engine/reference/builder.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/builder.md \
&& wget -O engine/reference/run.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/run.md \
&& wget -O engine/reference/commandline/cli.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/reference/commandline/cli.md \
&& wget -O engine/deprecated.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/deprecated.md \
&& svn co https://github.com/docker/distribution/$DISTRIBUTION_SVN_BRANCH/docs/spec registry/spec \
&& rm registry/spec/api.md.tmpl \
&& wget -O registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md \
&& rm -rf apidocs/cloud-api-source \
&& rm -rf tests \
&& wget -O engine/api/v1.25/swagger.yaml https://raw.githubusercontent.com/docker/docker/v1.13.0/api/swagger.yaml \
&& wget -O engine/api/v1.26/swagger.yaml https://raw.githubusercontent.com/docker/docker/v17.03.0-ce/api/swagger.yaml \
&& wget -O engine/api/v1.27/swagger.yaml https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/api/swagger.yaml \
&& jekyll build -d site/edge --config _config-edge.yml \
&& echo "Jekyll site in site/edge"
&& rm -rf site/edge/apidocs/layouts \
&& find site/edge -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g'
# Replace / rewrite some URLs so that links in the edge directory go to the correct
# location. Note that the order in which these replacements are done is
# important. Changing the order may result in replacements being done
# multiple times.
# First, remove the domain from URLs that include the domain
VER="edge" \
&& BASEURL="$VER/" \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs-stage.docker.com/#href="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs-stage.docker.com/#src="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs.docker.com/#src="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs.docker.com/#href="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="http://docs.docker.com/#src="/#g'
# Substitute https:// for schema-less resources (src="//analytics.google.com")
# We're replacing them to prevent them being seen as absolute paths below
find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="//#href="https://#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="//#src="https://#g'
# And some archive versions already have URLs starting with '/version/'
find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/'"$BASEURL"'#href="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/'"$BASEURL"'#src="/#g'
# Archived versions 1.7 and under use some absolute links, and v1.10 uses
# "relative" links to sources (href="./css/"). Remove those to make them
# work :)
find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="\./#href="/#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="\./#src="/#g'
# Create permalinks for archived versions
find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/'"$BASEURL"'#g' \
&& find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/'"$BASEURL"'#g'
# Fix 'Back to Stable Docs' URL
find site/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#<li id="stable-cta"><a href="/edge/">Back to Stable docs</a></li>#<li id="stable-cta"><a href="/">Back to Stable docs</a></li>#g'
# Make sure we don't commit any changes to the actual source files
git reset --hard
if [ -d site/edge ]; then
echo "Edge is where it is supposed to be"
fi
if [ -d _site ]; then
rm -rf _site
fi
mv site _site
jekyll serve -d _site --skip-initial-build -D