mirror of https://github.com/docker/cli.git
reference docs: fix broken links and markdown touch-ups
- fix various broken links - fix incorrect anchors - updated links for content that moved, so that no redirect to the new location is needed. - touched-up Markdown; - re-format some JSON output - add blank line betweeen command and command output - format "note" blocks Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ae66898200
commit
8919c228bd
|
@ -396,13 +396,13 @@ the command line.
|
||||||
|
|
||||||
When `docker build` is run with the `--cgroup-parent` option the containers
|
When `docker build` is run with the `--cgroup-parent` option the containers
|
||||||
used in the build will be run with the [corresponding `docker run`
|
used in the build will be run with the [corresponding `docker run`
|
||||||
flag](../run.md#specifying-custom-cgroups).
|
flag](../run.md#specify-custom-cgroups).
|
||||||
|
|
||||||
### Set ulimits in container (--ulimit)
|
### Set ulimits in container (--ulimit)
|
||||||
|
|
||||||
Using the `--ulimit` option with `docker build` will cause each build step's
|
Using the `--ulimit` option with `docker build` will cause each build step's
|
||||||
container to be started using those [`--ulimit`
|
container to be started using those [`--ulimit`
|
||||||
flag values](./run.md#set-ulimits-in-container-ulimit).
|
flag values](run.md#set-ulimits-in-container---ulimit).
|
||||||
|
|
||||||
### Set build-time variables (--build-arg)
|
### Set build-time variables (--build-arg)
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ you must be explicit with a relative or absolute path, for example:
|
||||||
`/path/to/file:name.txt` or `./file:name.txt`
|
`/path/to/file:name.txt` or `./file:name.txt`
|
||||||
|
|
||||||
It is not possible to copy certain system files such as resources under
|
It is not possible to copy certain system files such as resources under
|
||||||
`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs-tmpfs), and mounts created by
|
`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs---tmpfs), and mounts created by
|
||||||
the user in the container. However, you can still copy such files by manually
|
the user in the container. However, you can still copy such files by manually
|
||||||
running `tar` in `docker exec`. Both of the following examples do the same thing
|
running `tar` in `docker exec`. Both of the following examples do the same thing
|
||||||
in different ways (consider `SRC_PATH` and `DEST_PATH` are directories):
|
in different ways (consider `SRC_PATH` and `DEST_PATH` are directories):
|
||||||
|
|
|
@ -60,7 +60,7 @@ $ docker import http://example.com/exampleimage.tgz
|
||||||
- Import to docker from a local archive.
|
- Import to docker from a local archive.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker import /path/to/exampleimage.tgz
|
$ docker import /path/to/exampleimage.tgz
|
||||||
```
|
```
|
||||||
|
|
||||||
### Import from a local directory
|
### Import from a local directory
|
||||||
|
@ -81,9 +81,12 @@ archiving with tar. If you are not root (or the sudo command) when you
|
||||||
tar, then the ownerships might not get preserved.
|
tar, then the ownerships might not get preserved.
|
||||||
|
|
||||||
## When the daemon supports multiple operating systems
|
## When the daemon supports multiple operating systems
|
||||||
|
|
||||||
If the daemon supports multiple operating systems, and the image being imported
|
If the daemon supports multiple operating systems, and the image being imported
|
||||||
does not match the default operating system, it may be necessary to add
|
does not match the default operating system, it may be necessary to add
|
||||||
`--platform`. This would be necessary when importing a Linux image into a Windows
|
`--platform`. This would be necessary when importing a Linux image into a Windows
|
||||||
daemon.
|
daemon.
|
||||||
|
|
||||||
# docker import --platform=linux .\linuximage.tar
|
```bash
|
||||||
|
$ docker import --platform=linux .\linuximage.tar
|
||||||
|
```
|
||||||
|
|
|
@ -23,7 +23,9 @@ inside the container is sent `SIGKILL` signal (default), or the signal that is
|
||||||
specified with the `--signal` option. You can kill a container using the
|
specified with the `--signal` option. You can kill a container using the
|
||||||
container's ID, ID-prefix, or name.
|
container's ID, ID-prefix, or name.
|
||||||
|
|
||||||
> **Note**: `ENTRYPOINT` and `CMD` in the *shell* form run as a subcommand of
|
> **Note**
|
||||||
|
>
|
||||||
|
> `ENTRYPOINT` and `CMD` in the *shell* form run as a child process of
|
||||||
> `/bin/sh -c`, which does not pass signals. This means that the executable is
|
> `/bin/sh -c`, which does not pass signals. This means that the executable is
|
||||||
> not the container’s PID 1 and does not receive Unix signals.
|
> not the container’s PID 1 and does not receive Unix signals.
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ to two images -- one for windows on amd64, and one for darwin on amd64.
|
||||||
|
|
||||||
### manifest inspect
|
### manifest inspect
|
||||||
|
|
||||||
```
|
```bash
|
||||||
manifest inspect --help
|
manifest inspect --help
|
||||||
|
|
||||||
Usage: docker manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST
|
Usage: docker manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST
|
||||||
|
@ -275,9 +275,10 @@ $ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1
|
||||||
$ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag
|
$ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: the `--insecure` flag is not required to annotate a manifest list,
|
> **Note**
|
||||||
|
>
|
||||||
|
> The `--insecure` flag is not required to annotate a manifest list,
|
||||||
> since annotations are to a locally-stored copy of a manifest list. You may also
|
> since annotations are to a locally-stored copy of a manifest list. You may also
|
||||||
> skip the `--insecure` flag if you are performing a `docker manifest inspect`
|
> skip the `--insecure` flag if you are performing a `docker manifest inspect`
|
||||||
> on a locally-stored manifest list. Be sure to keep in mind that locally-stored
|
> on a locally-stored manifest list. Be sure to keep in mind that locally-stored
|
||||||
> manifest lists are never used by the engine on a `docker pull`.
|
> manifest lists are never used by the engine on a `docker pull`.
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ prune, connect, and disconnect networks.
|
||||||
|
|
||||||
* [network create](network_create.md)
|
* [network create](network_create.md)
|
||||||
* [network inspect](network_inspect.md)
|
* [network inspect](network_inspect.md)
|
||||||
* [network list](network_list.md)
|
* [network list](network_ls.md)
|
||||||
* [network rm](network_rm.md)
|
* [network rm](network_rm.md)
|
||||||
* [network prune](network_prune.md)
|
* [network prune](network_prune.md)
|
||||||
* [network connect](network_connect.md)
|
* [network connect](network_connect.md)
|
||||||
|
|
|
@ -24,7 +24,7 @@ disconnect it from the network.
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker network disconnect multi-host-network container1
|
$ docker network disconnect multi-host-network container1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ f949d337b1f5 none null local
|
||||||
* [network ls](network_ls.md)
|
* [network ls](network_ls.md)
|
||||||
* [network inspect](network_inspect.md)
|
* [network inspect](network_inspect.md)
|
||||||
* [network rm](network_rm.md)
|
* [network rm](network_rm.md)
|
||||||
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
|
* [Understand Docker container networks](https://docs.docker.com/network/)
|
||||||
* [system df](system_df.md)
|
* [system df](system_df.md)
|
||||||
* [container prune](container_prune.md)
|
* [container prune](container_prune.md)
|
||||||
* [image prune](image_prune.md)
|
* [image prune](image_prune.md)
|
||||||
|
|
|
@ -56,4 +56,4 @@ deletion.
|
||||||
* [network ls](network_ls.md)
|
* [network ls](network_ls.md)
|
||||||
* [network inspect](network_inspect.md)
|
* [network inspect](network_inspect.md)
|
||||||
* [network prune](network_prune.md)
|
* [network prune](network_prune.md)
|
||||||
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
|
* [Understand Docker container networks](https://docs.docker.com/network/)
|
||||||
|
|
|
@ -54,11 +54,11 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
|
||||||
* [id](node_ls.md#id)
|
* [id](#id)
|
||||||
* [label](node_ls.md#label)
|
* [label](#label)
|
||||||
* [membership](node_ls.md#membership)
|
* [membership](#membership)
|
||||||
* [name](node_ls.md#name)
|
* [name](#name)
|
||||||
* [role](node_ls.md#role)
|
* [role](#role)
|
||||||
|
|
||||||
#### id
|
#### id
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ $ docker node update --label-add type=queue worker1
|
||||||
|
|
||||||
The labels you set for nodes using `docker node update` apply only to the node
|
The labels you set for nodes using `docker node update` apply only to the node
|
||||||
entity within the swarm. Do not confuse them with the docker daemon labels for
|
entity within the swarm. Do not confuse them with the docker daemon labels for
|
||||||
[dockerd](https://docs.docker.com/engine/userguide/labels-custom-metadata/#daemon-labels).
|
[dockerd](dockerd.md).
|
||||||
|
|
||||||
For more information about labels, refer to [apply custom
|
For more information about labels, refer to [apply custom
|
||||||
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
|
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
|
||||||
|
|
|
@ -23,10 +23,17 @@ in a JSON array.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
### Inspect a plugin
|
||||||
|
|
||||||
```none
|
The following example example inspects the `tiborvass/sample-volume-plugin` plugin:
|
||||||
|
|
||||||
|
```bash
|
||||||
$ docker plugin inspect tiborvass/sample-volume-plugin:latest
|
$ docker plugin inspect tiborvass/sample-volume-plugin:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Output is in JSON format (output below is formatted for readability):
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
|
"Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
|
||||||
"Name": "tiborvass/sample-volume-plugin:latest",
|
"Name": "tiborvass/sample-volume-plugin:latest",
|
||||||
|
@ -134,7 +141,6 @@ $ docker plugin inspect tiborvass/sample-volume-plugin:latest
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
(output formatted for readability)
|
|
||||||
|
|
||||||
### Formatting the output
|
### Formatting the output
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ using a Go template.
|
||||||
|
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
Placeholder | Description
|
||||||
---------------|------------------------------------------------------------------------------------------
|
-------------------|------------------------------------------------------------
|
||||||
`.ID` | Plugin ID
|
`.ID` | Plugin ID
|
||||||
`.Name` | Plugin name
|
`.Name` | Plugin name
|
||||||
`.Description` | Plugin description
|
`.Description` | Plugin description
|
||||||
|
|
|
@ -32,45 +32,43 @@ by looking at the `Settable` field.
|
||||||
|
|
||||||
Here is an extract of a plugin manifest:
|
Here is an extract of a plugin manifest:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
...
|
"args": {
|
||||||
"args": {
|
"name": "myargs",
|
||||||
"name": "myargs",
|
"settable": ["value"],
|
||||||
"settable": ["value"],
|
"value": ["foo", "bar"]
|
||||||
"value": ["foo", "bar"]
|
},
|
||||||
},
|
"env": [
|
||||||
"env": [
|
{
|
||||||
{
|
"name": "DEBUG",
|
||||||
"name": "DEBUG",
|
"settable": ["value"],
|
||||||
"settable": ["value"],
|
"value": "0"
|
||||||
"value": "0"
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "LOGGING",
|
||||||
"name": "LOGGING",
|
"value": "1"
|
||||||
"value": "1"
|
}
|
||||||
}
|
],
|
||||||
],
|
"devices": [
|
||||||
"devices": [
|
{
|
||||||
{
|
"name": "mydevice",
|
||||||
"name": "mydevice",
|
"path": "/dev/foo",
|
||||||
"path": "/dev/foo",
|
"settable": ["path"]
|
||||||
"settable": ["path"]
|
}
|
||||||
}
|
],
|
||||||
],
|
"mounts": [
|
||||||
"mounts": [
|
{
|
||||||
{
|
"destination": "/baz",
|
||||||
"destination": "/baz",
|
"name": "mymount",
|
||||||
"name": "mymount",
|
"options": ["rbind"],
|
||||||
"options": ["rbind"],
|
"settable": ["source"],
|
||||||
"settable": ["source"],
|
"source": "/foo",
|
||||||
"source": "/foo",
|
"type": "bind"
|
||||||
"type": "bind"
|
}
|
||||||
}
|
]
|
||||||
],
|
}
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -24,15 +24,24 @@ just a specific mapping:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker ps
|
$ docker ps
|
||||||
|
|
||||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||||
b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234->9876/tcp, 0.0.0.0:4321->7890/tcp test
|
b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234->9876/tcp, 0.0.0.0:4321->7890/tcp test
|
||||||
|
|
||||||
$ docker port test
|
$ docker port test
|
||||||
|
|
||||||
7890/tcp -> 0.0.0.0:4321
|
7890/tcp -> 0.0.0.0:4321
|
||||||
9876/tcp -> 0.0.0.0:1234
|
9876/tcp -> 0.0.0.0:1234
|
||||||
|
|
||||||
$ docker port test 7890/tcp
|
$ docker port test 7890/tcp
|
||||||
|
|
||||||
0.0.0.0:4321
|
0.0.0.0:4321
|
||||||
|
|
||||||
$ docker port test 7890/udp
|
$ docker port test 7890/udp
|
||||||
|
|
||||||
2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
|
2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
|
||||||
|
|
||||||
$ docker port test 7890
|
$ docker port test 7890
|
||||||
|
|
||||||
0.0.0.0:4321
|
0.0.0.0:4321
|
||||||
```
|
```
|
||||||
|
|
|
@ -72,6 +72,7 @@ The `docker ps -s` command displays two different on-disk-sizes for each contain
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker ps -s
|
$ docker ps -s
|
||||||
|
|
||||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE
|
||||||
e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB)
|
e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB)
|
||||||
00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB)
|
00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB)
|
||||||
|
@ -310,10 +311,12 @@ a volume mounted in a specific path:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
|
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
|
||||||
|
|
||||||
CONTAINER ID MOUNTS
|
CONTAINER ID MOUNTS
|
||||||
9c3527ed70ce remote-volume
|
9c3527ed70ce remote-volume
|
||||||
|
|
||||||
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
|
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
|
||||||
|
|
||||||
CONTAINER ID MOUNTS
|
CONTAINER ID MOUNTS
|
||||||
9c3527ed70ce remote-volume
|
9c3527ed70ce remote-volume
|
||||||
```
|
```
|
||||||
|
|
|
@ -35,7 +35,7 @@ If you are behind an HTTP proxy server, for example in corporate settings,
|
||||||
before open a connect to registry, you may need to configure the Docker
|
before open a connect to registry, you may need to configure the Docker
|
||||||
daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
|
daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
|
||||||
environment variables. To set these environment variables on a host using
|
environment variables. To set these environment variables on a host using
|
||||||
`systemd`, refer to the [control and configure Docker with systemd](https://docs.docker.com/engine/admin/systemd/#http-proxy)
|
`systemd`, refer to the [control and configure Docker with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
|
||||||
for variables configuration.
|
for variables configuration.
|
||||||
|
|
||||||
### Concurrent downloads
|
### Concurrent downloads
|
||||||
|
@ -101,7 +101,7 @@ same image, their layers are stored only once and do not consume extra disk
|
||||||
space.
|
space.
|
||||||
|
|
||||||
For more information about images, layers, and the content-addressable store,
|
For more information about images, layers, and the content-addressable store,
|
||||||
refer to [understand images, containers, and storage drivers](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/).
|
refer to [understand images, containers, and storage drivers](https://docs.docker.com/storage/storagedriver/).
|
||||||
|
|
||||||
|
|
||||||
### Pull an image by digest (immutable identifier)
|
### Pull an image by digest (immutable identifier)
|
||||||
|
@ -240,7 +240,9 @@ a3ed95caeb02: Pulling fs layer
|
||||||
^C
|
^C
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: Technically, the Engine terminates a pull operation when the
|
> **Note**
|
||||||
> connection between the Docker Engine daemon and the Docker Engine client
|
>
|
||||||
> initiating the pull is lost. If the connection with the Engine daemon is
|
> The Engine terminates a pull operation when the connection between the Docker
|
||||||
> lost for other reasons than a manual interaction, the pull is also aborted.
|
> Engine daemon and the Docker Engine client initiating the pull is lost. If the
|
||||||
|
> connection with the Engine daemon is lost for other reasons than a manual
|
||||||
|
> interaction, the pull is also aborted.
|
||||||
|
|
|
@ -22,8 +22,7 @@ Options:
|
||||||
|
|
||||||
### Remove a container
|
### Remove a container
|
||||||
|
|
||||||
This will remove the container referenced under the link
|
This removes the container referenced under the link `/redis`.
|
||||||
`/redis`.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker rm /redis
|
$ docker rm /redis
|
||||||
|
@ -33,7 +32,7 @@ $ docker rm /redis
|
||||||
|
|
||||||
### Remove a link specified with `--link` on the default bridge network
|
### Remove a link specified with `--link` on the default bridge network
|
||||||
|
|
||||||
This will remove the underlying link between `/webapp` and the `/redis`
|
This removes the underlying link between `/webapp` and the `/redis`
|
||||||
containers on the default bridge network, removing all network communication
|
containers on the default bridge network, removing all network communication
|
||||||
between the two containers. This does not apply when `--link` is used with
|
between the two containers. This does not apply when `--link` is used with
|
||||||
user-specified networks.
|
user-specified networks.
|
||||||
|
@ -46,7 +45,7 @@ $ docker rm --link /webapp/redis
|
||||||
|
|
||||||
### Force-remove a running container
|
### Force-remove a running container
|
||||||
|
|
||||||
This command will force-remove a running container.
|
This command force-removes a running container.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker rm --force redis
|
$ docker rm --force redis
|
||||||
|
@ -63,10 +62,9 @@ The main process inside the container referenced under the link `redis` will rec
|
||||||
$ docker rm $(docker ps -a -q)
|
$ docker rm $(docker ps -a -q)
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will delete all stopped containers. The command
|
This command deletes all stopped containers. The command
|
||||||
`docker ps -a -q` will return all existing container IDs and pass them to
|
`docker ps -a -q` above returns all existing container IDs and passes them to
|
||||||
the `rm` command which will delete them. Any running containers will not be
|
the `rm` command which deletes them. Running containers are not deleted.
|
||||||
deleted.
|
|
||||||
|
|
||||||
### Remove a container and its volumes
|
### Remove a container and its volumes
|
||||||
|
|
||||||
|
@ -75,7 +73,7 @@ $ docker rm -v redis
|
||||||
redis
|
redis
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will remove the container and any volumes associated with it.
|
This command removes the container and any volumes associated with it.
|
||||||
Note that if a volume was specified with a name, it will not be removed.
|
Note that if a volume was specified with a name, it will not be removed.
|
||||||
|
|
||||||
### Remove a container and selectively remove volumes
|
### Remove a container and selectively remove volumes
|
||||||
|
@ -83,9 +81,10 @@ Note that if a volume was specified with a name, it will not be removed.
|
||||||
```bash
|
```bash
|
||||||
$ docker create -v awesome:/foo -v /bar --name hello redis
|
$ docker create -v awesome:/foo -v /bar --name hello redis
|
||||||
hello
|
hello
|
||||||
|
|
||||||
$ docker rm -v hello
|
$ docker rm -v hello
|
||||||
```
|
```
|
||||||
|
|
||||||
In this example, the volume for `/foo` will remain intact, but the volume for
|
In this example, the volume for `/foo` remains intact, but the volume for
|
||||||
`/bar` will be removed. The same behavior holds for volumes inherited with
|
`/bar` is removed. The same behavior holds for volumes inherited with
|
||||||
`--volumes-from`.
|
`--volumes-from`.
|
||||||
|
|
|
@ -155,7 +155,7 @@ of all containers.
|
||||||
The `docker run` command can be used in combination with `docker commit` to
|
The `docker run` command can be used in combination with `docker commit` to
|
||||||
[*change the command that a container runs*](commit.md). There is additional detailed information about `docker run` in the [Docker run reference](../run.md).
|
[*change the command that a container runs*](commit.md). There is additional detailed information about `docker run` in the [Docker run reference](../run.md).
|
||||||
|
|
||||||
For information on connecting a container to a network, see the ["*Docker network overview*"](https://docs.docker.com/engine/userguide/networking/).
|
For information on connecting a container to a network, see the ["*Docker network overview*"](https://docs.docker.com/network/).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -282,8 +282,7 @@ $ docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/stat
|
||||||
```
|
```
|
||||||
|
|
||||||
By bind-mounting the docker unix socket and statically linked docker
|
By bind-mounting the docker unix socket and statically linked docker
|
||||||
binary (refer to [get the linux binary](
|
binary (refer to [get the linux binary](https://docs.docker.com/engine/install/binaries/#install-static-binaries)),
|
||||||
https://docs.docker.com/engine/installation/binaries/#/get-the-linux-binary)),
|
|
||||||
you give the container the full access to create and manipulate the host's
|
you give the container the full access to create and manipulate the host's
|
||||||
Docker daemon.
|
Docker daemon.
|
||||||
|
|
||||||
|
@ -311,7 +310,7 @@ docker run -v c:\foo:c: ...
|
||||||
docker run -v c:\foo:c:\existing-directory-with-contents ...
|
docker run -v c:\foo:c:\existing-directory-with-contents ...
|
||||||
```
|
```
|
||||||
|
|
||||||
For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
||||||
|
|
||||||
### Add bind mounts or volumes using the --mount flag
|
### Add bind mounts or volumes using the --mount flag
|
||||||
|
@ -322,7 +321,7 @@ mounts in a container.
|
||||||
The `--mount` flag supports most options that are supported by the `-v` or the
|
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
|
`--volume` flag, but uses a different syntax. For in-depth information on the
|
||||||
`--mount` flag, and a comparison between `--volume` and `--mount`, refer to
|
`--mount` flag, and a comparison between `--volume` and `--mount`, refer to
|
||||||
the [service create command reference](service_create.md#add-bind-mounts-or-volumes).
|
the [service create command reference](service_create.md#add-bind-mounts-volumes-or-memory-filesystems).
|
||||||
|
|
||||||
Even though there is no plan to deprecate `--volume`, usage of `--mount` is recommended.
|
Even though there is no plan to deprecate `--volume`, usage of `--mount` is recommended.
|
||||||
|
|
||||||
|
@ -344,7 +343,7 @@ $ docker run -p 127.0.0.1:80:8080/tcp ubuntu bash
|
||||||
|
|
||||||
This binds port `8080` of the container to TCP port `80` on `127.0.0.1` of the host
|
This binds port `8080` of the container to TCP port `80` on `127.0.0.1` of the host
|
||||||
machine. You can also specify `udp` and `sctp` ports.
|
machine. You can also specify `udp` and `sctp` ports.
|
||||||
The [Docker User Guide](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/)
|
The [Docker User Guide](https://docs.docker.com/network/links/)
|
||||||
explains in detail how to manipulate ports in Docker.
|
explains in detail how to manipulate ports in Docker.
|
||||||
|
|
||||||
Note that ports which are not bound to the host (i.e., `-p 80:80` instead of
|
Note that ports which are not bound to the host (i.e., `-p 80:80` instead of
|
||||||
|
@ -449,8 +448,8 @@ com.example.label3
|
||||||
You can load multiple label-files by supplying multiple `--label-file` flags.
|
You can load multiple label-files by supplying multiple `--label-file` flags.
|
||||||
|
|
||||||
For additional information on working with labels, see [*Labels - custom
|
For additional information on working with labels, see [*Labels - custom
|
||||||
metadata in Docker*](https://docs.docker.com/engine/userguide/labels-custom-metadata/) in the Docker User
|
metadata in Docker*](https://docs.docker.com/config/labels-custom-metadata/) in
|
||||||
Guide.
|
the Docker User Guide.
|
||||||
|
|
||||||
### Connect a container to a network (--network)
|
### Connect a container to a network (--network)
|
||||||
|
|
||||||
|
@ -476,9 +475,11 @@ or name. For `overlay` networks or custom plugins that support multi-host
|
||||||
connectivity, containers connected to the same multi-host network but launched
|
connectivity, containers connected to the same multi-host network but launched
|
||||||
from different Engines can also communicate in this way.
|
from different Engines can also communicate in this way.
|
||||||
|
|
||||||
> **Note**: Service discovery is unavailable on the default bridge network.
|
> **Note**
|
||||||
> Containers can communicate via their IP addresses by default. To communicate
|
>
|
||||||
> by name, they must be linked.
|
> Service discovery is unavailable on the default bridge network. Containers can
|
||||||
|
> communicate via their IP addresses by default. To communicate by name, they
|
||||||
|
> must be linked.
|
||||||
|
|
||||||
You can disconnect a container from a network using the `docker network
|
You can disconnect a container from a network using the `docker network
|
||||||
disconnect` command.
|
disconnect` command.
|
||||||
|
@ -580,9 +581,10 @@ $ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc
|
||||||
fdisk: unable to open /dev/xvdc: Operation not permitted
|
fdisk: unable to open /dev/xvdc: Operation not permitted
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: `--device` cannot be safely used with ephemeral devices. Block devices
|
> **Note**
|
||||||
> that may be removed should not be added to untrusted containers with
|
>
|
||||||
> `--device`.
|
> The `--device` option cannot be safely used with ephemeral devices. Block devices
|
||||||
|
> that may be removed should not be added to untrusted containers with `--device`.
|
||||||
|
|
||||||
For Windows, the format of the string passed to the `--device` option is in
|
For Windows, the format of the string passed to the `--device` option is in
|
||||||
the form of `--device=<IdType>/<Id>`. Beginning with Windows Server 2019
|
the form of `--device=<IdType>/<Id>`. Beginning with Windows Server 2019
|
||||||
|
@ -602,9 +604,11 @@ ports on the host visible in the container.
|
||||||
PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.microsoft.com/windows/servercore:ltsc2019
|
PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.microsoft.com/windows/servercore:ltsc2019
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: the `--device` option is only supported on process-isolated
|
> **Note**
|
||||||
> Windows containers. This option fails if the container isolation is `hyperv`
|
>
|
||||||
> or when running Linux Containers on Windows (LCOW).
|
> The `--device` option is only supported on process-isolated Windows containers.
|
||||||
|
> This option fails if the container isolation is `hyperv` or when running Linux
|
||||||
|
> Containers on Windows (LCOW).
|
||||||
|
|
||||||
### Access an NVIDIA GPU
|
### Access an NVIDIA GPU
|
||||||
|
|
||||||
|
@ -705,9 +709,11 @@ $ docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n"
|
||||||
1024
|
1024
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: If you do not provide a `hard limit`, the `soft limit` will be used
|
> **Note**
|
||||||
> for both values. If no `ulimits` are set, they will be inherited from
|
>
|
||||||
> the default `ulimits` set on the daemon. `as` option is disabled now.
|
> If you do not provide a `hard limit`, the `soft limit` is used
|
||||||
|
> for both values. If no `ulimits` are set, they are inherited from
|
||||||
|
> the default `ulimits` set on the daemon. The `as` option is disabled now.
|
||||||
> In other words, the following script is not supported:
|
> In other words, the following script is not supported:
|
||||||
>
|
>
|
||||||
> ```bash
|
> ```bash
|
||||||
|
@ -845,23 +851,22 @@ network namespace, run this command:
|
||||||
$ docker run --sysctl net.ipv4.ip_forward=1 someimage
|
$ docker run --sysctl net.ipv4.ip_forward=1 someimage
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: Not all sysctls are namespaced. Docker does not support changing sysctls
|
> **Note**
|
||||||
|
>
|
||||||
|
> Not all sysctls are namespaced. Docker does not support changing sysctls
|
||||||
> inside of a container that also modify the host system. As the kernel
|
> inside of a container that also modify the host system. As the kernel
|
||||||
> evolves we expect to see more sysctls become namespaced.
|
> evolves we expect to see more sysctls become namespaced.
|
||||||
|
|
||||||
#### Currently supported sysctls
|
#### Currently supported sysctls
|
||||||
|
|
||||||
- `IPC Namespace`:
|
IPC Namespace:
|
||||||
|
|
||||||
```none
|
- `kernel.msgmax`, `kernel.msgmnb`, `kernel.msgmni`, `kernel.sem`,
|
||||||
kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced
|
`kernel.shmall`, `kernel.shmmax`, `kernel.shmmni`, `kernel.shm_rmid_forced`.
|
||||||
Sysctls beginning with fs.mqueue.*
|
- Sysctls beginning with `fs.mqueue.*`
|
||||||
```
|
- If you use the `--ipc=host` option these sysctls are not allowed.
|
||||||
|
|
||||||
If you use the `--ipc=host` option these sysctls will not be allowed.
|
Network Namespace:
|
||||||
|
|
||||||
- `Network Namespace`:
|
- Sysctls beginning with `net.*`
|
||||||
|
- If you use the `--network=host` option using these sysctls are not allowed.
|
||||||
Sysctls beginning with net.*
|
|
||||||
|
|
||||||
If you use the `--network=host` option using these sysctls will not be allowed.
|
|
||||||
|
|
|
@ -26,11 +26,6 @@ Options:
|
||||||
|
|
||||||
Search [Docker Hub](https://hub.docker.com) for images
|
Search [Docker Hub](https://hub.docker.com) for images
|
||||||
|
|
||||||
See [*Find Public Images on Docker Hub*](https://docs.docker.com/engine/tutorials/dockerrepos/#searching-for-images) for
|
|
||||||
more details on finding shared images from the command line.
|
|
||||||
|
|
||||||
> **Note**: Search queries return a maximum of 25 results.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Search images by name
|
### Search images by name
|
||||||
|
@ -93,9 +88,9 @@ than one filter, then pass multiple flags (e.g. `--filter is-automated=true --fi
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
|
||||||
* stars (int - number of stars the image has)
|
- stars (int - number of stars the image has)
|
||||||
* is-automated (boolean - true or false) - is the image automated or not
|
- is-automated (boolean - true or false) - is the image automated or not
|
||||||
* is-official (boolean - true or false) - is the image official or not
|
- is-official (boolean - true or false) - is the image official or not
|
||||||
|
|
||||||
#### stars
|
#### stars
|
||||||
|
|
||||||
|
@ -160,7 +155,6 @@ The following example uses a template without headers and outputs the
|
||||||
`Name` and `StarCount` entries separated by a colon for all images:
|
`Name` and `StarCount` entries separated by a colon for all images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
{% raw %}
|
|
||||||
$ docker search --format "{{.Name}}: {{.StarCount}}" nginx
|
$ docker search --format "{{.Name}}: {{.StarCount}}" nginx
|
||||||
|
|
||||||
nginx: 5441
|
nginx: 5441
|
||||||
|
@ -173,13 +167,11 @@ bitnami/nginx: 23
|
||||||
evild/alpine-nginx: 14
|
evild/alpine-nginx: 14
|
||||||
million12/nginx: 9
|
million12/nginx: 9
|
||||||
maxexcloo/nginx: 7
|
maxexcloo/nginx: 7
|
||||||
{% endraw %}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This example outputs a table format:
|
This example outputs a table format:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
{% raw %}
|
|
||||||
$ docker search --format "table {{.Name}}\t{{.IsAutomated}}\t{{.IsOfficial}}" nginx
|
$ docker search --format "table {{.Name}}\t{{.IsAutomated}}\t{{.IsOfficial}}" nginx
|
||||||
|
|
||||||
NAME AUTOMATED OFFICIAL
|
NAME AUTOMATED OFFICIAL
|
||||||
|
@ -189,5 +181,4 @@ richarvey/nginx-php-fpm [OK]
|
||||||
jrcs/letsencrypt-nginx-proxy-companion [OK]
|
jrcs/letsencrypt-nginx-proxy-companion [OK]
|
||||||
million12/nginx-php [OK]
|
million12/nginx-php [OK]
|
||||||
webdevops/php-nginx [OK]
|
webdevops/php-nginx [OK]
|
||||||
{% endraw %}
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -32,5 +32,5 @@ Manage secrets.
|
||||||
|
|
||||||
* [secret create](secret_create.md)
|
* [secret create](secret_create.md)
|
||||||
* [secret inspect](secret_inspect.md)
|
* [secret inspect](secret_inspect.md)
|
||||||
* [secret list](secret_list.md)
|
* [secret list](secret_ls.md)
|
||||||
* [secret rm](secret_rm.md)
|
* [secret rm](secret_rm.md)
|
||||||
|
|
|
@ -49,9 +49,9 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
|
||||||
* [id](secret_ls.md#id) (secret's ID)
|
- [id](#id) (secret's ID)
|
||||||
* [label](secret_ls.md#label) (`label=<key>` or `label=<key>=<value>`)
|
- [label](#label) (`label=<key>` or `label=<key>=<value>`)
|
||||||
* [name](secret_ls.md#name) (secret's name)
|
- [name](#name) (secret's name)
|
||||||
|
|
||||||
#### id
|
#### id
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,10 @@ $ docker secret rm secret.json
|
||||||
sapth4csdo5b6wz2p5uimh5xg
|
sapth4csdo5b6wz2p5uimh5xg
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Warning**: Unlike `docker rm`, this command does not ask for confirmation
|
> **Warning**
|
||||||
> before removing a secret.
|
>
|
||||||
|
> Unlike `docker rm`, this command does not ask for confirmation before removing
|
||||||
|
> a secret.
|
||||||
|
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
|
|
@ -289,7 +289,7 @@ $ docker service create \
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information about labels, refer to [apply custom
|
For more information about labels, refer to [apply custom
|
||||||
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
|
metadata](https://docs.docker.com/config/labels-custom-metadata/).
|
||||||
|
|
||||||
### Add bind mounts, volumes or memory filesystems
|
### Add bind mounts, volumes or memory filesystems
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ your web server containers when they start. To update the website, you just
|
||||||
update the named volume.
|
update the named volume.
|
||||||
|
|
||||||
For more information about named volumes, see
|
For more information about named volumes, see
|
||||||
[Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/).
|
[Data Volumes](https://docs.docker.com/storage/volumes/).
|
||||||
|
|
||||||
The following table describes options which apply to both bind mounts and named
|
The following table describes options which apply to both bind mounts and named
|
||||||
volumes in a service:
|
volumes in a service:
|
||||||
|
@ -342,14 +342,14 @@ volumes in a service:
|
||||||
<td><b>type</b></td>
|
<td><b>type</b></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<p>The type of mount, can be either <tt>volume</tt>, <tt>bind</tt>, <tt>tmpfs</tt>, or <tt>npipe</tt>. Defaults to <tt>volume</tt> if no type is specified.
|
<p>The type of mount, can be either <tt>volume</tt>, <tt>bind</tt>, <tt>tmpfs</tt>, or <tt>npipe</tt>. Defaults to <tt>volume</tt> if no type is specified.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><tt>volume</tt>: mounts a <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">managed volume</a>
|
<li><tt>volume</tt>: mounts a <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">managed volume</a>
|
||||||
into the container.</li> <li><tt>bind</tt>:
|
into the container.</li> <li><tt>bind</tt>:
|
||||||
bind-mounts a directory or file from the host into the container.</li>
|
bind-mounts a directory or file from the host into the container.</li>
|
||||||
<li><tt>tmpfs</tt>: mount a tmpfs in the container</li>
|
<li><tt>tmpfs</tt>: mount a tmpfs in the container</li>
|
||||||
<li><tt>npipe</tt>: mounts named pipe from the host into the container (Windows containers only).</li>
|
<li><tt>npipe</tt>: mounts named pipe from the host into the container (Windows containers only).</li>
|
||||||
</ul></p>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -389,11 +389,11 @@ volumes in a service:
|
||||||
<td>
|
<td>
|
||||||
<p>The Engine mounts binds and volumes <tt>read-write</tt> unless <tt>readonly</tt> option
|
<p>The Engine mounts binds and volumes <tt>read-write</tt> unless <tt>readonly</tt> option
|
||||||
is given when mounting the bind or volume. Note that setting <tt>readonly</tt> for a
|
is given when mounting the bind or volume. Note that setting <tt>readonly</tt> for a
|
||||||
bind-mount does not make its submounts <tt>readonly</tt> on the current Linux implementation. See also <tt>bind-nonrecursive</tt>.
|
bind-mount does not make its submounts <tt>readonly</tt> on the current Linux implementation. See also <tt>bind-nonrecursive</tt>.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><tt>true</tt> or <tt>1</tt> or no value: Mounts the bind or volume read-only.</li>
|
<li><tt>true</tt> or <tt>1</tt> or no value: Mounts the bind or volume read-only.</li>
|
||||||
<li><tt>false</tt> or <tt>0</tt>: Mounts the bind or volume read-write.</li>
|
<li><tt>false</tt> or <tt>0</tt>: Mounts the bind or volume read-write.</li>
|
||||||
</ul></p>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -417,14 +417,13 @@ The following options can only be used for bind mounts (`type=bind`):
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>consistency</b></td>
|
<td><b>consistency</b></td>
|
||||||
<td>
|
<td>
|
||||||
<p>The consistency requirements for the mount; one of
|
<p>The consistency requirements for the mount; one of </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><tt>default</tt>: Equivalent to <tt>consistent</tt>.</li>
|
<li><tt>default</tt>: Equivalent to <tt>consistent</tt>.</li>
|
||||||
<li><tt>consistent</tt>: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.</li>
|
<li><tt>consistent</tt>: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.</li>
|
||||||
<li><tt>cached</tt>: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.</li>
|
<li><tt>cached</tt>: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.</li>
|
||||||
<li><tt>delegated</tt>: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.</li>
|
<li><tt>delegated</tt>: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -506,7 +505,7 @@ The following options can only be used for named volumes (`type=volume`):
|
||||||
creation. For example,
|
creation. For example,
|
||||||
<tt>volume-label=mylabel=hello-world,my-other-label=hello-mars</tt>. For more
|
<tt>volume-label=mylabel=hello-world,my-other-label=hello-mars</tt>. For more
|
||||||
information about labels, refer to
|
information about labels, refer to
|
||||||
<a href="https://docs.docker.com/engine/userguide/labels-custom-metadata/">apply custom metadata</a>.
|
<a href="https://docs.docker.com/config/labels-custom-metadata/">apply custom metadata</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -914,7 +913,7 @@ $ docker service create \
|
||||||
The swarm extends my-network to each node running the service.
|
The swarm extends my-network to each node running the service.
|
||||||
|
|
||||||
Containers on the same network can access each other using
|
Containers on the same network can access each other using
|
||||||
[service discovery](https://docs.docker.com/engine/swarm/networking/#use-swarm-mode-service-discovery).
|
[service discovery](https://docs.docker.com/network/overlay/#container-discovery).
|
||||||
|
|
||||||
Long form syntax of `--network` allows to specify list of aliases and driver options:
|
Long form syntax of `--network` allows to specify list of aliases and driver options:
|
||||||
`--network name=my-network,alias=web1,driver-opt=field1=value1`
|
`--network name=my-network,alias=web1,driver-opt=field1=value1`
|
||||||
|
@ -1068,9 +1067,10 @@ In this example, we are going to set the template of the created containers base
|
||||||
service's name, the node's ID and hostname where it sits.
|
service's name, the node's ID and hostname where it sits.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker service create --name hosttempl \
|
$ docker service create \
|
||||||
--hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\
|
--name hosttempl \
|
||||||
busybox top
|
--hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\
|
||||||
|
busybox top
|
||||||
|
|
||||||
va8ew30grofhjoychbr6iot8c
|
va8ew30grofhjoychbr6iot8c
|
||||||
|
|
||||||
|
@ -1105,10 +1105,11 @@ You can narrow the kind of nodes your task can land on through the using the
|
||||||
`--generic-resource` flag (if the nodes advertise these resources):
|
`--generic-resource` flag (if the nodes advertise these resources):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker service create --name cuda \
|
$ docker service create \
|
||||||
--generic-resource "NVIDIA-GPU=2" \
|
--name cuda \
|
||||||
--generic-resource "SSD=1" \
|
--generic-resource "NVIDIA-GPU=2" \
|
||||||
nvidia/cuda
|
--generic-resource "SSD=1" \
|
||||||
|
nvidia/cuda
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
|
|
@ -48,47 +48,47 @@ dmu1ept4cxcf redis replicated 3/3 redis:3.0.6
|
||||||
Both `docker service inspect redis`, and `docker service inspect dmu1ept4cxcf`
|
Both `docker service inspect redis`, and `docker service inspect dmu1ept4cxcf`
|
||||||
produce the same result:
|
produce the same result:
|
||||||
|
|
||||||
```none
|
```bash
|
||||||
$ docker service inspect redis
|
$ docker service inspect redis
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": "dmu1ept4cxcfe8k8lhtux3ro3",
|
"ID": "dmu1ept4cxcfe8k8lhtux3ro3",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Index": 12
|
"Index": 12
|
||||||
|
},
|
||||||
|
"CreatedAt": "2016-06-17T18:44:02.558012087Z",
|
||||||
|
"UpdatedAt": "2016-06-17T18:44:02.558012087Z",
|
||||||
|
"Spec": {
|
||||||
|
"Name": "redis",
|
||||||
|
"TaskTemplate": {
|
||||||
|
"ContainerSpec": {
|
||||||
|
"Image": "redis:3.0.6"
|
||||||
},
|
},
|
||||||
"CreatedAt": "2016-06-17T18:44:02.558012087Z",
|
"Resources": {
|
||||||
"UpdatedAt": "2016-06-17T18:44:02.558012087Z",
|
"Limits": {},
|
||||||
"Spec": {
|
"Reservations": {}
|
||||||
"Name": "redis",
|
|
||||||
"TaskTemplate": {
|
|
||||||
"ContainerSpec": {
|
|
||||||
"Image": "redis:3.0.6"
|
|
||||||
},
|
|
||||||
"Resources": {
|
|
||||||
"Limits": {},
|
|
||||||
"Reservations": {}
|
|
||||||
},
|
|
||||||
"RestartPolicy": {
|
|
||||||
"Condition": "any",
|
|
||||||
"MaxAttempts": 0
|
|
||||||
},
|
|
||||||
"Placement": {}
|
|
||||||
},
|
|
||||||
"Mode": {
|
|
||||||
"Replicated": {
|
|
||||||
"Replicas": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"UpdateConfig": {},
|
|
||||||
"EndpointSpec": {
|
|
||||||
"Mode": "vip"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Endpoint": {
|
"RestartPolicy": {
|
||||||
"Spec": {}
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
|
},
|
||||||
|
"Placement": {}
|
||||||
|
},
|
||||||
|
"Mode": {
|
||||||
|
"Replicated": {
|
||||||
|
"Replicas": 1
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"UpdateConfig": {},
|
||||||
|
"EndpointSpec": {
|
||||||
|
"Mode": "vip"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Endpoint": {
|
||||||
|
"Spec": {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -96,13 +96,13 @@ $ docker service inspect redis
|
||||||
$ docker service inspect dmu1ept4cxcf
|
$ docker service inspect dmu1ept4cxcf
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": "dmu1ept4cxcfe8k8lhtux3ro3",
|
"ID": "dmu1ept4cxcfe8k8lhtux3ro3",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Index": 12
|
"Index": 12
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,13 @@ 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
|
for all of the containers in that service. If a task is passed, it will only
|
||||||
display logs from that particular task.
|
display logs from that particular task.
|
||||||
|
|
||||||
> **Note**: This command is only functional for services that are started with
|
> **Note**
|
||||||
|
>
|
||||||
|
> This command is only functional for services that are started with
|
||||||
> the `json-file` or `journald` logging driver.
|
> the `json-file` or `journald` logging driver.
|
||||||
|
|
||||||
For more information about selecting and configuring logging drivers, refer to
|
For more information about selecting and configuring logging drivers, refer to
|
||||||
[Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/).
|
[Configure logging drivers](https://docs.docker.com/config/containers/logging/configure/).
|
||||||
|
|
||||||
The `docker service logs --follow` command will continue streaming the new output from
|
The `docker service logs --follow` command will continue streaming the new output from
|
||||||
the service's `STDOUT` and `STDERR`.
|
the service's `STDOUT` and `STDERR`.
|
||||||
|
|
|
@ -40,8 +40,10 @@ $ docker service ls
|
||||||
ID NAME MODE REPLICAS IMAGE
|
ID NAME MODE REPLICAS IMAGE
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Warning**: Unlike `docker rm`, this command does not ask for confirmation
|
> **Warning**
|
||||||
> before removing a running service.
|
>
|
||||||
|
> Unlike `docker rm`, this command does not ask for confirmation before removing
|
||||||
|
> a running service.
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
|
||||||
|
|
|
@ -147,9 +147,8 @@ point, effectively removing the `test-data` volume. Each command returns the
|
||||||
service name.
|
service name.
|
||||||
|
|
||||||
- The `--mount-add` flag takes the same parameters as the `--mount` flag on
|
- The `--mount-add` flag takes the same parameters as the `--mount` flag on
|
||||||
`service create`. Refer to the [volumes and
|
`service create`. Refer to the [volumes and bind mounts](service_create.md#add-bind-mounts-volumes-or-memory-filesystems)
|
||||||
bind mounts](service_create.md#volumes-and-bind-mounts-mount) section in the
|
section in the `service create` reference for details.
|
||||||
`service create` reference for details.
|
|
||||||
|
|
||||||
- The `--mount-rm` flag takes the `target` path of the mount.
|
- The `--mount-rm` flag takes the `target` path of the mount.
|
||||||
|
|
||||||
|
@ -179,7 +178,7 @@ myservice
|
||||||
|
|
||||||
Use the `--publish-add` or `--publish-rm` flags to add or remove a published
|
Use the `--publish-add` or `--publish-rm` flags to add or remove a published
|
||||||
port for a service. You can use the short or long syntax discussed in the
|
port for a service. You can use the short or long syntax discussed in the
|
||||||
[docker service create](service_create/#publish-service-ports-externally-to-the-swarm)
|
[docker service create](service_create.md#publish-service-ports-externally-to-the-swarm--p---publish)
|
||||||
reference.
|
reference.
|
||||||
|
|
||||||
The following example adds a published service port to an existing service.
|
The following example adds a published service port to an existing service.
|
||||||
|
@ -194,7 +193,7 @@ $ docker service update \
|
||||||
|
|
||||||
Use the `--network-add` or `--network-rm` flags to add or remove a network for
|
Use the `--network-add` or `--network-rm` flags to add or remove a network for
|
||||||
a service. You can use the short or long syntax discussed in the
|
a service. You can use the short or long syntax discussed in the
|
||||||
[docker service create](service_create/#attach-a-service-to-an-existing-network-network)
|
[docker service create](service_create.md#attach-a-service-to-an-existing-network---network)
|
||||||
reference.
|
reference.
|
||||||
|
|
||||||
The following example adds a new alias name to an existing service already connected to network my-network:
|
The following example adds a new alias name to an existing service already connected to network my-network:
|
||||||
|
@ -288,13 +287,13 @@ $ docker service update \
|
||||||
### Update services using templates
|
### Update services using templates
|
||||||
|
|
||||||
Some flags of `service update` support the use of templating.
|
Some flags of `service update` support the use of templating.
|
||||||
See [`service create`](./service_create.md#templating) for the reference.
|
See [`service create`](service_create.md#create-services-using-templates) for the reference.
|
||||||
|
|
||||||
|
|
||||||
### Specify isolation mode (Windows)
|
### Specify isolation mode (Windows)
|
||||||
|
|
||||||
`service update` supports the same `--isolation` flag as `service create`
|
`service update` supports the same `--isolation` flag as `service create`
|
||||||
See [`service create`](./service_create.md) for the reference.
|
See [`service create`](service_create.md) for the reference.
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ using a Go template.
|
||||||
Valid placeholders for the Go template are listed below:
|
Valid placeholders for the Go template are listed below:
|
||||||
|
|
||||||
Placeholder | Description
|
Placeholder | Description
|
||||||
------------|------------------------------------------------------------------------------------------
|
------------|-------------------------------------------------------------------
|
||||||
`.ID` | Service ID
|
`.ID` | Service ID
|
||||||
`.Name` | Service name
|
`.Name` | Service name
|
||||||
`.Mode` | Service mode (replicated, global)
|
`.Mode` | Service mode (replicated, global)
|
||||||
|
|
|
@ -21,16 +21,33 @@ Options:
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data.
|
The `docker stats` command returns a live data stream for running containers. To
|
||||||
|
limit data to one or more specific containers, specify a list of container names
|
||||||
|
or ids separated by a space. You can specify a stopped container but stopped
|
||||||
|
containers do not return any data.
|
||||||
|
|
||||||
If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint.
|
If you need more detailed information about a container's resource usage, use
|
||||||
|
the `/containers/(id)/stats` API endpoint.
|
||||||
|
|
||||||
> **Note**: On Linux, the Docker CLI reports memory usage by subtracting cache usage from the total memory usage. The API does not perform such a calculation but rather provides the total memory usage and the amount from the cache so that clients can use the data as needed.
|
> **Note**
|
||||||
The cache usage is defined as the value of `total_inactive_file` field in the `memory.stat` file on cgroup v1 hosts.
|
>
|
||||||
On Docker 19.03 and older, the cache usage was defined as the value of `cache` field.
|
> On Linux, the Docker CLI reports memory usage by subtracting cache usage from
|
||||||
On cgroup v2 hosts, the cache usage is defined as the value of `inactive_file` field.
|
> the total memory usage. The API does not perform such a calculation but rather
|
||||||
|
> provides the total memory usage and the amount from the cache so that clients
|
||||||
|
> can use the data as needed. The cache usage is defined as the value of
|
||||||
|
> `total_inactive_file` field in the `memory.stat` file on cgroup v1 hosts.
|
||||||
|
>
|
||||||
|
> On Docker 19.03 and older, the cache usage was defined as the value of `cache`
|
||||||
|
> field. On cgroup v2 hosts, the cache usage is defined as the value of
|
||||||
|
> `inactive_file` field.
|
||||||
|
|
||||||
> **Note**: The `PIDS` column contains the number of processes and kernel threads created by that container. Threads is the term used by Linux kernel. Other equivalent terms are "lightweight process" or "kernel task", etc. A large number in the `PIDS` column combined with a small number of processes (as reported by `ps` or `top`) may indicate that something in the container is creating many threads.
|
> **Note**
|
||||||
|
>
|
||||||
|
> The `PIDS` column contains the number of processes and kernel threads created
|
||||||
|
> by that container. Threads is the term used by Linux kernel. Other equivalent
|
||||||
|
> terms are "lightweight process" or "kernel task", etc. A large number in the
|
||||||
|
> `PIDS` column combined with a small number of processes (as reported by `ps`
|
||||||
|
> or `top`) may indicate that something in the container is creating many threads.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -164,6 +181,3 @@ On Windows:
|
||||||
|
|
||||||
"table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
|
"table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
|
||||||
|
|
||||||
|
|
||||||
> **Note**: On Docker 17.09 and older, the `{{.Container}}` column was used,
|
|
||||||
> instead of `{{.ID}}\t{{.Name}}`.
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ progress of the rotation.
|
||||||
|
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
|
|
|
@ -55,7 +55,7 @@ a new node to the swarm, the node joins as a worker or manager node based upon t
|
||||||
to [swarm join](swarm_join.md).
|
to [swarm join](swarm_join.md).
|
||||||
|
|
||||||
After you create the swarm, you can display or rotate the token using
|
After you create the swarm, you can display or rotate the token using
|
||||||
[swarm join-token](swarm_join_token.md).
|
[swarm join-token](swarm_join-token.md).
|
||||||
|
|
||||||
### `--autolock`
|
### `--autolock`
|
||||||
|
|
||||||
|
@ -189,8 +189,8 @@ by passing `--availability=drain` to `docker swarm init`.
|
||||||
|
|
||||||
* [swarm ca](swarm_ca.md)
|
* [swarm ca](swarm_ca.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -39,6 +39,7 @@ the swarm:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker swarm join-token worker
|
$ docker swarm join-token worker
|
||||||
|
|
||||||
To add a worker to this swarm, run the following command:
|
To add a worker to this swarm, run the following command:
|
||||||
|
|
||||||
docker swarm join \
|
docker swarm join \
|
||||||
|
@ -46,6 +47,7 @@ To add a worker to this swarm, run the following command:
|
||||||
172.17.0.2:2377
|
172.17.0.2:2377
|
||||||
|
|
||||||
$ docker swarm join-token manager
|
$ docker swarm join-token manager
|
||||||
|
|
||||||
To add a manager to this swarm, run the following command:
|
To add a manager to this swarm, run the following command:
|
||||||
|
|
||||||
docker swarm join \
|
docker swarm join \
|
||||||
|
@ -57,6 +59,7 @@ Use the `--rotate` flag to generate a new join token for the specified role:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker swarm join-token --rotate worker
|
$ docker swarm join-token --rotate worker
|
||||||
|
|
||||||
Successfully rotated worker join token.
|
Successfully rotated worker join token.
|
||||||
|
|
||||||
To add a worker to this swarm, run the following command:
|
To add a worker to this swarm, run the following command:
|
||||||
|
@ -106,5 +109,5 @@ Only print the token. Do not print a complete command for joining.
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -117,8 +117,8 @@ by passing `--availability=drain` to `docker swarm join`.
|
||||||
|
|
||||||
* [swarm ca](swarm_ca.md)
|
* [swarm ca](swarm_ca.md)
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -33,6 +33,7 @@ Consider the following swarm, as seen from the manager:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker node ls
|
$ docker node ls
|
||||||
|
|
||||||
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
|
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
|
||||||
7ln70fl22uw2dvjn2ft53m3q5 worker2 Ready Active
|
7ln70fl22uw2dvjn2ft53m3q5 worker2 Ready Active
|
||||||
dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active
|
dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active
|
||||||
|
@ -43,6 +44,7 @@ To remove `worker2`, issue the following command from `worker2` itself:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker swarm leave
|
$ docker swarm leave
|
||||||
|
|
||||||
Node left the default swarm.
|
Node left the default swarm.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -57,7 +59,7 @@ command.
|
||||||
* [node rm](node_rm.md)
|
* [node rm](node_rm.md)
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -49,6 +49,7 @@ key:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker swarm unlock-key --rotate
|
$ docker swarm unlock-key --rotate
|
||||||
|
|
||||||
Successfully rotated manager unlock key.
|
Successfully rotated manager unlock key.
|
||||||
|
|
||||||
To unlock a swarm manager after it restarts, run the `docker swarm unlock`
|
To unlock a swarm manager after it restarts, run the `docker swarm unlock`
|
||||||
|
@ -64,6 +65,7 @@ The `-q` (or `--quiet`) flag only prints the key:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker swarm unlock-key -q
|
$ docker swarm unlock-key -q
|
||||||
|
|
||||||
SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8
|
SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -81,7 +83,7 @@ Only print the unlock key, without instructions.
|
||||||
* [swarm ca](swarm_ca.md)
|
* [swarm ca](swarm_ca.md)
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -38,7 +38,7 @@ Please enter unlock key:
|
||||||
* [swarm ca](swarm_ca.md)
|
* [swarm ca](swarm_ca.md)
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
* [swarm update](swarm_update.md)
|
* [swarm update](swarm_update.md)
|
||||||
|
|
|
@ -41,7 +41,7 @@ $ docker swarm update --cert-expiry 720h
|
||||||
* [swarm ca](swarm_ca.md)
|
* [swarm ca](swarm_ca.md)
|
||||||
* [swarm init](swarm_init.md)
|
* [swarm init](swarm_init.md)
|
||||||
* [swarm join](swarm_join.md)
|
* [swarm join](swarm_join.md)
|
||||||
* [swarm join-token](swarm_join_token.md)
|
* [swarm join-token](swarm_join-token.md)
|
||||||
* [swarm leave](swarm_leave.md)
|
* [swarm leave](swarm_leave.md)
|
||||||
* [swarm unlock](swarm_unlock.md)
|
* [swarm unlock](swarm_unlock.md)
|
||||||
* [swarm unlock-key](swarm_unlock_key.md)
|
* [swarm unlock-key](swarm_unlock-key.md)
|
||||||
|
|
|
@ -66,8 +66,9 @@ my-named-vol 0
|
||||||
* `UNIQUE SIZE` is the amount of space that is only used by a given image
|
* `UNIQUE SIZE` is the amount of space that is only used by a given image
|
||||||
* `SIZE` is the virtual size of the image, it is the sum of `SHARED SIZE` and `UNIQUE SIZE`
|
* `SIZE` is the virtual size of the image, it is the sum of `SHARED SIZE` and `UNIQUE SIZE`
|
||||||
|
|
||||||
> **Note**: Network information is not shown because it doesn't consume the disk
|
> **Note**
|
||||||
> space.
|
>
|
||||||
|
> Network information is not shown because it does not consume disk space.
|
||||||
|
|
||||||
## Performance
|
## Performance
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ $ docker stop test
|
||||||
|
|
||||||
**Shell 1: (Again .. now showing events):**
|
**Shell 1: (Again .. now showing events):**
|
||||||
|
|
||||||
```none
|
```console
|
||||||
2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test)
|
2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test)
|
||||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||||
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
|
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
|
||||||
|
@ -194,6 +194,7 @@ machine, using the following different time syntaxes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker system events --since 1483283804
|
$ docker system events --since 1483283804
|
||||||
|
|
||||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||||
|
@ -204,6 +205,7 @@ $ docker system events --since 1483283804
|
||||||
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
||||||
|
|
||||||
$ docker system events --since '2017-01-05'
|
$ docker system events --since '2017-01-05'
|
||||||
|
|
||||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||||
|
@ -214,6 +216,7 @@ $ docker system events --since '2017-01-05'
|
||||||
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
||||||
|
|
||||||
$ docker system events --since '2013-09-03T15:49:29'
|
$ docker system events --since '2013-09-03T15:49:29'
|
||||||
|
|
||||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||||
|
@ -224,6 +227,7 @@ $ docker system events --since '2013-09-03T15:49:29'
|
||||||
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
|
||||||
|
|
||||||
$ docker system events --since '10m'
|
$ docker system events --since '10m'
|
||||||
|
|
||||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||||
|
@ -325,12 +329,12 @@ Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299
|
||||||
|
|
||||||
#### Format as JSON
|
#### Format as JSON
|
||||||
|
|
||||||
```none
|
```bash
|
||||||
$ docker system events --format '{{json .}}'
|
$ docker system events --format '{{json .}}'
|
||||||
|
|
||||||
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||||
{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||||
{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
|
{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
|
||||||
{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
|
{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
|
||||||
{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||||
```
|
```
|
||||||
|
|
|
@ -97,11 +97,13 @@ deleted: sha256:3a88a5c81eb5c283e72db2dbc6d65cbfd8e80b6c89bb6e714cfaaa0eed99c548
|
||||||
Total reclaimed space: 13.5 MB
|
Total reclaimed space: 13.5 MB
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: The `--volumes` option was added in Docker 17.06.1. Older versions
|
> **Note**
|
||||||
> of Docker prune volumes by default, along with other Docker objects. On older
|
>
|
||||||
> versions, run `docker container prune`, `docker network prune`, and
|
> The `--volumes` option was added in Docker 17.06.1. Older versions of Docker
|
||||||
> `docker image prune` separately to remove unused containers, networks, and
|
> prune volumes by default, along with other Docker objects. On older versions,
|
||||||
> images, without removing volumes.
|
> run `docker container prune`, `docker network prune`, and `docker image prune`
|
||||||
|
> separately to remove unused containers, networks, and images, without removing
|
||||||
|
> volumes.
|
||||||
|
|
||||||
|
|
||||||
### Filtering
|
### Filtering
|
||||||
|
@ -138,7 +140,7 @@ containers, images, networks, and volumes without the specified labels.
|
||||||
* [volume inspect](volume_inspect.md)
|
* [volume inspect](volume_inspect.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
* [system df](system_df.md)
|
* [system df](system_df.md)
|
||||||
* [container prune](container_prune.md)
|
* [container prune](container_prune.md)
|
||||||
* [image prune](image_prune.md)
|
* [image prune](image_prune.md)
|
||||||
|
|
|
@ -31,7 +31,7 @@ digits, underscores, periods and dashes. A tag name may not start with a
|
||||||
period or a dash and may contain a maximum of 128 characters.
|
period or a dash and may contain a maximum of 128 characters.
|
||||||
|
|
||||||
You can group your images together using names and tags, and then upload them
|
You can group your images together using names and tags, and then upload them
|
||||||
to [*Share Images via Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos/#/contributing-to-docker-hub).
|
to [*Share images on Docker Hub*](https://docs.docker.com/get-started/part3/).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,7 @@ display any signed tags.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect unsigned-img
|
$ docker trust inspect unsigned-img
|
||||||
|
|
||||||
No signatures or cannot access unsigned-img
|
No signatures or cannot access unsigned-img
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -157,6 +158,7 @@ However, if other tags are signed in the same image repository,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect alpine:unsigned
|
$ docker trust inspect alpine:unsigned
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Name": "alpine:unsigned",
|
"Name": "alpine:unsigned",
|
||||||
|
@ -165,17 +167,17 @@ $ docker trust inspect alpine:unsigned
|
||||||
{
|
{
|
||||||
"Name": "Repository",
|
"Name": "Repository",
|
||||||
"Keys": [
|
"Keys": [
|
||||||
{
|
{
|
||||||
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Root",
|
"Name": "Root",
|
||||||
"Keys": [
|
"Keys": [
|
||||||
{
|
{
|
||||||
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -190,59 +192,60 @@ signed tags in the repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect alpine
|
$ docker trust inspect alpine
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Name": "alpine",
|
"Name": "alpine",
|
||||||
"SignedTags": [
|
"SignedTags": [
|
||||||
{
|
{
|
||||||
"SignedTag": "3.5",
|
"SignedTag": "3.5",
|
||||||
"Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
|
"Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
|
||||||
"Signers": [
|
"Signers": [
|
||||||
"Repo Admin"
|
"Repo Admin"
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "3.6",
|
|
||||||
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "edge",
|
|
||||||
"Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "latest",
|
|
||||||
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Signers": [],
|
|
||||||
"AdministrativeKeys": [
|
|
||||||
{
|
|
||||||
"Name": "Repository",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Root",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "3.6",
|
||||||
|
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "edge",
|
||||||
|
"Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "latest",
|
||||||
|
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Signers": [],
|
||||||
|
"AdministrativeKeys": [
|
||||||
|
{
|
||||||
|
"Name": "Repository",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Root",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -254,104 +257,105 @@ and reports the results in an ordered list:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect alpine notary
|
$ docker trust inspect alpine notary
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Name": "alpine",
|
"Name": "alpine",
|
||||||
"SignedTags": [
|
"SignedTags": [
|
||||||
{
|
{
|
||||||
"SignedTag": "3.5",
|
"SignedTag": "3.5",
|
||||||
"Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
|
"Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
|
||||||
"Signers": [
|
"Signers": [
|
||||||
"Repo Admin"
|
"Repo Admin"
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "3.6",
|
|
||||||
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "edge",
|
|
||||||
"Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "integ-test-base",
|
|
||||||
"Digest": "3952dc48dcc4136ccdde37fbef7e250346538a55a0366e3fccc683336377e372",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "latest",
|
|
||||||
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Signers": [],
|
|
||||||
"AdministrativeKeys": [
|
|
||||||
{
|
|
||||||
"Name": "Repository",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Root",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "notary",
|
"SignedTag": "3.6",
|
||||||
"SignedTags": [
|
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
||||||
{
|
"Signers": [
|
||||||
"SignedTag": "server",
|
"Repo Admin"
|
||||||
"Digest": "71f64ab718a3331dee103bc5afc6bc492914738ce37c2d2f127a8133714ecf5c",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SignedTag": "signer",
|
|
||||||
"Digest": "a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8",
|
|
||||||
"Signers": [
|
|
||||||
"Repo Admin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Signers": [],
|
|
||||||
"AdministrativeKeys": [
|
|
||||||
{
|
|
||||||
"Name": "Root",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Repository",
|
|
||||||
"Keys": [
|
|
||||||
{
|
|
||||||
"ID": "85bfd031017722f950d480a721f845a2944db26a3dc084040a70f1b0d9bbb3df"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "edge",
|
||||||
|
"Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "integ-test-base",
|
||||||
|
"Digest": "3952dc48dcc4136ccdde37fbef7e250346538a55a0366e3fccc683336377e372",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "latest",
|
||||||
|
"Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Signers": [],
|
||||||
|
"AdministrativeKeys": [
|
||||||
|
{
|
||||||
|
"Name": "Repository",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Root",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "notary",
|
||||||
|
"SignedTags": [
|
||||||
|
{
|
||||||
|
"SignedTag": "server",
|
||||||
|
"Digest": "71f64ab718a3331dee103bc5afc6bc492914738ce37c2d2f127a8133714ecf5c",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"SignedTag": "signer",
|
||||||
|
"Digest": "a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8",
|
||||||
|
"Signers": [
|
||||||
|
"Repo Admin"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Signers": [],
|
||||||
|
"AdministrativeKeys": [
|
||||||
|
{
|
||||||
|
"Name": "Root",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Repository",
|
||||||
|
"Keys": [
|
||||||
|
{
|
||||||
|
"ID": "85bfd031017722f950d480a721f845a2944db26a3dc084040a70f1b0d9bbb3df"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -386,6 +390,7 @@ and specify their `KEYS`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect --pretty my-image:purple
|
$ docker trust inspect --pretty my-image:purple
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
purple 941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557 alice, bob, carol
|
purple 941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557 alice, bob, carol
|
||||||
|
|
||||||
|
@ -419,6 +424,7 @@ Root Key: a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect --pretty alpine
|
$ docker trust inspect --pretty alpine
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
2.6 9ace551613070689a12857d62c30ef0daa9a376107ec0fff0e34786cedb3399b (Repo Admin)
|
2.6 9ace551613070689a12857d62c30ef0daa9a376107ec0fff0e34786cedb3399b (Repo Admin)
|
||||||
2.7 9f08005dff552038f0ad2f46b8e65ff3d25641747d3912e3ea8da6785046561a (Repo Admin)
|
2.7 9f08005dff552038f0ad2f46b8e65ff3d25641747d3912e3ea8da6785046561a (Repo Admin)
|
||||||
|
@ -440,6 +446,7 @@ Here's an example with signers that are set up by `docker trust` commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust inspect --pretty my-image
|
$ docker trust inspect --pretty my-image
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||||
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
||||||
|
|
|
@ -28,7 +28,7 @@ Here's an example of a repo with two signed tags:
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||||
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
||||||
|
@ -55,7 +55,7 @@ Successfully deleted signature for example/trust-demo:red
|
||||||
After revocation, the tag is removed from the list of released tags:
|
After revocation, the tag is removed from the list of released tags:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
When no tag is specified, `docker trust` revokes all signatures that you have a signing key for.
|
When no tag is specified, `docker trust` revokes all signatures that you have a signing key for.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||||
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
||||||
|
@ -103,7 +103,7 @@ Successfully deleted signature for example/trust-demo
|
||||||
All tags that have `alice`'s signature on them are removed from the list of released tags:
|
All tags that have `alice`'s signature on them are removed from the list of released tags:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ Options:
|
||||||
Given an image:
|
Given an image:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ Sign a new tag with `docker trust sign`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust sign example/trust-demo:v2
|
$ docker trust sign example/trust-demo:v2
|
||||||
|
|
||||||
Signing and pushing trust metadata for example/trust-demo:v2
|
Signing and pushing trust metadata for example/trust-demo:v2
|
||||||
The push refers to a repository [docker.io/example/trust-demo]
|
The push refers to a repository [docker.io/example/trust-demo]
|
||||||
eed4e566104a: Layer already exists
|
eed4e566104a: Layer already exists
|
||||||
|
@ -56,10 +58,11 @@ Enter passphrase for repository key with ID 36d4c36:
|
||||||
Successfully signed docker.io/example/trust-demo:v2
|
Successfully signed docker.io/example/trust-demo:v2
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `docker trust view` to list the new signature:
|
Use `docker trust inspect --pretty` to list the new signature:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
||||||
v2 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 (Repo Admin)
|
v2 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 (Repo Admin)
|
||||||
|
@ -74,7 +77,7 @@ Root Key: 246d360f7c53a9021ee7d4259e3c5692f3f1f7ad4737b1ea8c7b8da741ad980b
|
||||||
Given an image:
|
Given an image:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -94,6 +97,7 @@ Sign a new tag with `docker trust sign`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust sign example/trust-demo:v1
|
$ docker trust sign example/trust-demo:v1
|
||||||
|
|
||||||
Signing and pushing trust metadata for example/trust-demo:v1
|
Signing and pushing trust metadata for example/trust-demo:v1
|
||||||
The push refers to a repository [docker.io/example/trust-demo]
|
The push refers to a repository [docker.io/example/trust-demo]
|
||||||
26b126eb8632: Layer already exists
|
26b126eb8632: Layer already exists
|
||||||
|
@ -107,10 +111,11 @@ Enter passphrase for delegation key with ID 27d42a8:
|
||||||
Successfully signed docker.io/example/trust-demo:v1
|
Successfully signed docker.io/example/trust-demo:v1
|
||||||
```
|
```
|
||||||
|
|
||||||
`docker trust view` lists the new signature:
|
`docker trust inspect --pretty` lists the new signature:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice
|
||||||
|
|
||||||
|
@ -130,12 +135,14 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
When signing an image on a repo for the first time, `docker trust sign` sets up new keys before signing the image.
|
When signing an image on a repo for the first time, `docker trust sign` sets up new keys before signing the image.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures or cannot access example/trust-demo
|
No signatures or cannot access example/trust-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust sign example/trust-demo:v1
|
$ docker trust sign example/trust-demo:v1
|
||||||
|
|
||||||
Signing and pushing trust metadata for example/trust-demo:v1
|
Signing and pushing trust metadata for example/trust-demo:v1
|
||||||
Enter passphrase for root key with ID 36cac18:
|
Enter passphrase for root key with ID 36cac18:
|
||||||
Enter passphrase for new repository key with ID 731396b:
|
Enter passphrase for new repository key with ID 731396b:
|
||||||
|
@ -159,7 +166,8 @@ Successfully signed docker.io/example/trust-demo:v1
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 alice
|
v1 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 alice
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ Options:
|
||||||
To add a new signer, `alice`, to this repository:
|
To add a new signer, `alice`, to this repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ $ docker trust signer add alice example/trust-demo --key alice.crt
|
||||||
Successfully added signer: alice to example/trust-demo
|
Successfully added signer: alice to example/trust-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
`docker trust view` now lists `alice` as a valid signer:
|
`docker trust inspect --pretty` now lists `alice` as a valid signer:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -75,24 +75,26 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
When adding a signer on a repo for the first time, `docker trust signer add` sets up a new repo if it doesn't exist.
|
When adding a signer on a repo for the first time, `docker trust signer add` sets up a new repo if it doesn't exist.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures or cannot access example/trust-demo
|
No signatures or cannot access example/trust-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust signer add alice example/trust-demo --key alice.crt
|
$ docker trust signer add alice example/trust-demo --key alice.crt
|
||||||
Initializing signed repository for example/trust-demo...
|
|
||||||
Enter passphrase for root key with ID 748121c:
|
Initializing signed repository for example/trust-demo...
|
||||||
|
Enter passphrase for root key with ID 748121c:
|
||||||
Enter passphrase for new repository key with ID 95b9e55:
|
Enter passphrase for new repository key with ID 95b9e55:
|
||||||
Repeat passphrase for new repository key with ID 95b9e55:
|
Repeat passphrase for new repository key with ID 95b9e55:
|
||||||
Successfully initialized "example/trust-demo"
|
Successfully initialized "example/trust-demo"
|
||||||
|
|
||||||
Adding signer "alice" to example/trust-demo...
|
Adding signer "alice" to example/trust-demo...
|
||||||
Successfully added signer: alice to example/trust-demo
|
Successfully added signer: alice to example/trust-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -112,7 +114,8 @@ Root Key: 748121c14bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103
|
||||||
## Add a signer to multiple repos
|
## Add a signer to multiple repos
|
||||||
To add a signer, `alice`, to multiple repositories:
|
To add a signer, `alice`, to multiple repositories:
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
@ -126,7 +129,8 @@ Repository Key: ecc457614c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
|
||||||
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo2
|
$ docker trust inspect --pretty example/trust-demo2
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
@ -143,6 +147,7 @@ Add `alice` to both repositories with a single `docker trust signer add` command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust signer add alice example/trust-demo example/trust-demo2 --key alice.crt
|
$ docker trust signer add alice example/trust-demo example/trust-demo2 --key alice.crt
|
||||||
|
|
||||||
Adding signer "alice" to example/trust-demo...
|
Adding signer "alice" to example/trust-demo...
|
||||||
Enter passphrase for repository key with ID 95b9e55:
|
Enter passphrase for repository key with ID 95b9e55:
|
||||||
Successfully added signer: alice to example/trust-demo
|
Successfully added signer: alice to example/trust-demo
|
||||||
|
@ -151,11 +156,13 @@ Adding signer "alice" to example/trust-demo2...
|
||||||
Enter passphrase for repository key with ID ece554f:
|
Enter passphrase for repository key with ID ece554f:
|
||||||
Successfully added signer: alice to example/trust-demo2
|
Successfully added signer: alice to example/trust-demo2
|
||||||
```
|
```
|
||||||
`docker trust view` now lists `alice` as a valid signer of both `example/trust-demo` and `example/trust-demo2`:
|
|
||||||
|
`docker trust inspect --pretty` now lists `alice` as a valid signer of both `example/trust-demo` and `example/trust-demo2`:
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
@ -169,8 +176,10 @@ Administrative keys for example/trust-demo:
|
||||||
Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
|
Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
|
||||||
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo2
|
$ docker trust inspect --pretty example/trust-demo2
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
@ -190,6 +199,7 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust signer add alice example/unauthorized example/authorized --key alice.crt
|
$ docker trust signer add alice example/unauthorized example/authorized --key alice.crt
|
||||||
|
|
||||||
Adding signer "alice" to example/unauthorized...
|
Adding signer "alice" to example/unauthorized...
|
||||||
you are not authorized to perform this operation: server returned 401.
|
you are not authorized to perform this operation: server returned 401.
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ Options:
|
||||||
|
|
||||||
To remove an existing signer, `alice`, from this repository:
|
To remove an existing signer, `alice`, from this repository:
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ Enter passphrase for repository key with ID 642692c:
|
||||||
Successfully removed alice from example/trust-demo
|
Successfully removed alice from example/trust-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
`docker trust view` now does not list `alice` as a valid signer:
|
`docker trust inspect --pretty` now does not list `alice` as a valid signer:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
No signatures for example/trust-demo
|
No signatures for example/trust-demo
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
To remove an existing signer, `alice`, from multiple repositories:
|
To remove an existing signer, `alice`, from multiple repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
||||||
|
|
||||||
|
@ -91,7 +92,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo2
|
$ docker trust inspect --pretty example/trust-demo2
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
||||||
|
|
||||||
|
@ -120,11 +122,12 @@ Enter passphrase for repository key with ID ece554f:
|
||||||
Successfully removed alice from example/trust-demo2
|
Successfully removed alice from example/trust-demo2
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `docker trust view` to confirm that `alice` is no longer listed as a valid
|
Run `docker trust inspect --pretty` to confirm that `alice` is no longer listed as a valid
|
||||||
signer of either `example/trust-demo` or `example/trust-demo2`:
|
signer of either `example/trust-demo` or `example/trust-demo2`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo
|
$ docker trust inspect --pretty example/trust-demo
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
@ -139,7 +142,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker trust view example/trust-demo2
|
$ docker trust inspect --pretty example/trust-demo2
|
||||||
|
|
||||||
SIGNED TAG DIGEST SIGNERS
|
SIGNED TAG DIGEST SIGNERS
|
||||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,10 @@ options on a running or a stopped container. On kernel version older than
|
||||||
4.6, you can only update `--kernel-memory` on a stopped container or on
|
4.6, you can only update `--kernel-memory` on a stopped container or on
|
||||||
a running container with kernel memory initialized.
|
a running container with kernel memory initialized.
|
||||||
|
|
||||||
> **Warning**: The `docker update` and `docker container update` commands are
|
> **Warning**
|
||||||
> not supported for Windows containers.
|
>
|
||||||
|
> The `docker update` and `docker container update` commands are not supported
|
||||||
|
> for Windows containers.
|
||||||
{: .warning }
|
{: .warning }
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
|
@ -33,20 +33,32 @@ describes all the details of the format.
|
||||||
$ docker version
|
$ docker version
|
||||||
|
|
||||||
Client:
|
Client:
|
||||||
Version: 1.8.0
|
Version: 19.03.8
|
||||||
API version: 1.20
|
API version: 1.40
|
||||||
Go version: go1.4.2
|
Go version: go1.12.17
|
||||||
Git commit: f5bae0a
|
Git commit: afacb8b
|
||||||
Built: Tue Jun 23 17:56:00 UTC 2015
|
Built: Wed Mar 11 01:21:11 2020
|
||||||
OS/Arch: linux/amd64
|
OS/Arch: darwin/amd64
|
||||||
|
Experimental: true
|
||||||
|
|
||||||
Server:
|
Server:
|
||||||
Version: 1.8.0
|
Engine:
|
||||||
API version: 1.20
|
Version: 19.03.8
|
||||||
Go version: go1.4.2
|
API version: 1.40 (minimum version 1.12)
|
||||||
Git commit: f5bae0a
|
Go version: go1.12.17
|
||||||
Built: Tue Jun 23 17:56:00 UTC 2015
|
Git commit: afacb8b
|
||||||
OS/Arch: linux/amd64
|
Built: Wed Mar 11 01:29:16 2020
|
||||||
|
OS/Arch: linux/amd64
|
||||||
|
Experimental: true
|
||||||
|
containerd:
|
||||||
|
Version: v1.2.13
|
||||||
|
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
|
||||||
|
runc:
|
||||||
|
Version: 1.0.0-rc10
|
||||||
|
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
|
||||||
|
docker-init:
|
||||||
|
Version: 0.18.0
|
||||||
|
GitCommit: fec3683
|
||||||
```
|
```
|
||||||
|
|
||||||
### Get the server version
|
### Get the server version
|
||||||
|
@ -54,7 +66,7 @@ OS/Arch: linux/amd64
|
||||||
```bash
|
```bash
|
||||||
$ docker version --format '{{.Server.Version}}'
|
$ docker version --format '{{.Server.Version}}'
|
||||||
|
|
||||||
1.8.0
|
19.03.8
|
||||||
```
|
```
|
||||||
|
|
||||||
### Dump raw JSON data
|
### Dump raw JSON data
|
||||||
|
@ -62,5 +74,5 @@ $ docker version --format '{{.Server.Version}}'
|
||||||
```bash
|
```bash
|
||||||
$ docker version --format '{{json .}}'
|
$ docker version --format '{{json .}}'
|
||||||
|
|
||||||
{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}}
|
{"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"19.03.8","ApiVersion":"1.40","DefaultAPIVersion":"1.40","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"darwin","Arch":"amd64","BuildTime":"Wed Mar 11 01:21:11 2020","Experimental":true},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"19.03.8","Details":{"ApiVersion":"1.40","Arch":"amd64","BuildTime":"Wed Mar 11 01:29:16 2020","Experimental":"true","GitCommit":"afacb8b","GoVersion":"go1.12.17","KernelVersion":"4.19.76-linuxkit","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"v1.2.13","Details":{"GitCommit":"7ad184331fa3e55e52b890ea95e65ba581ae3429"}},{"Name":"runc","Version":"1.0.0-rc10","Details":{"GitCommit":"dc9208a3303feef5b3839f4323d9beb36df0a9dd"}},{"Name":"docker-init","Version":"0.18.0","Details":{"GitCommit":"fec3683"}}],"Version":"19.03.8","ApiVersion":"1.40","MinAPIVersion":"1.12","GitCommit":"afacb8b","GoVersion":"go1.12.17","Os":"linux","Arch":"amd64","KernelVersion":"4.19.76-linuxkit","Experimental":true,"BuildTime":"2020-03-11T01:29:16.000000000+00:00"}}
|
||||||
```
|
```
|
||||||
|
|
|
@ -33,7 +33,7 @@ prune volumes.
|
||||||
|
|
||||||
* [volume create](volume_create.md)
|
* [volume create](volume_create.md)
|
||||||
* [volume inspect](volume_inspect.md)
|
* [volume inspect](volume_inspect.md)
|
||||||
* [volume list](volume_list.md)
|
* [volume list](volume_ls.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
|
@ -113,4 +113,4 @@ $ docker volume create --driver local \
|
||||||
* [volume ls](volume_ls.md)
|
* [volume ls](volume_ls.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
|
@ -28,19 +28,26 @@ details of the format.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker volume create
|
$ docker volume create
|
||||||
85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
|
||||||
|
8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5
|
||||||
|
|
||||||
$ docker volume inspect 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
$ docker volume inspect 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Name": "85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d",
|
"CreatedAt": "2020-04-19T11:00:21Z",
|
||||||
"Driver": "local",
|
"Driver": "local",
|
||||||
"Mountpoint": "/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data",
|
"Labels": {},
|
||||||
"Status": null
|
"Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
|
||||||
|
"Name": "8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5",
|
||||||
|
"Options": {},
|
||||||
|
"Scope": "local"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
$ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
$ docker volume inspect --format '{{ .Mountpoint }}' 8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5
|
||||||
/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data
|
|
||||||
|
/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
@ -49,4 +56,4 @@ $ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc
|
||||||
* [volume ls](volume_ls.md)
|
* [volume ls](volume_ls.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
|
@ -57,10 +57,10 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
|
||||||
* dangling (boolean - true or false, 0 or 1)
|
- dangling (boolean - true or false, 0 or 1)
|
||||||
* driver (a volume driver's name)
|
- driver (a volume driver's name)
|
||||||
* label (`label=<key>` or `label=<key>=<value>`)
|
- label (`label=<key>` or `label=<key>=<value>`)
|
||||||
* name (a volume's name)
|
- name (a volume's name)
|
||||||
|
|
||||||
#### dangling
|
#### dangling
|
||||||
|
|
||||||
|
@ -187,4 +187,4 @@ vol3: local
|
||||||
* [volume inspect](volume_inspect.md)
|
* [volume inspect](volume_inspect.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
|
@ -56,7 +56,7 @@ volumes without the specified labels.
|
||||||
* [volume ls](volume_ls.md)
|
* [volume ls](volume_ls.md)
|
||||||
* [volume inspect](volume_inspect.md)
|
* [volume inspect](volume_inspect.md)
|
||||||
* [volume rm](volume_rm.md)
|
* [volume rm](volume_rm.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
* [system df](system_df.md)
|
* [system df](system_df.md)
|
||||||
* [container prune](container_prune.md)
|
* [container prune](container_prune.md)
|
||||||
* [image prune](image_prune.md)
|
* [image prune](image_prune.md)
|
||||||
|
|
|
@ -26,8 +26,9 @@ Remove one or more volumes. You cannot remove a volume that is in use by a conta
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker volume rm hello
|
$ docker volume rm hello
|
||||||
hello
|
|
||||||
|
hello
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related commands
|
## Related commands
|
||||||
|
@ -36,4 +37,4 @@ Remove one or more volumes. You cannot remove a volume that is in use by a conta
|
||||||
* [volume inspect](volume_inspect.md)
|
* [volume inspect](volume_inspect.md)
|
||||||
* [volume ls](volume_ls.md)
|
* [volume ls](volume_ls.md)
|
||||||
* [volume prune](volume_prune.md)
|
* [volume prune](volume_prune.md)
|
||||||
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
* [Understand Data Volumes](https://docs.docker.com/storage/volumes/)
|
||||||
|
|
|
@ -15,8 +15,10 @@ Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: `docker wait` returns `0` when run against a container which had
|
> **Note**
|
||||||
> already exited before the `docker wait` command was run.
|
>
|
||||||
|
> `docker wait` returns `0` when run against a container which had already
|
||||||
|
> exited before the `docker wait` command was run.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue