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>
(cherry picked from commit 8919c228bd
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
2676c603fb
commit
96eb0888fa
|
@ -396,13 +396,13 @@ the command line.
|
|||
|
||||
When `docker build` is run with the `--cgroup-parent` option the containers
|
||||
used in the build will be run with the [corresponding `docker run`
|
||||
flag](../run.md#specifying-custom-cgroups).
|
||||
flag](../run.md#specify-custom-cgroups).
|
||||
|
||||
### Set ulimits in container (--ulimit)
|
||||
|
||||
Using the `--ulimit` option with `docker build` will cause each build step's
|
||||
container to be started using those [`--ulimit`
|
||||
flag values](./run.md#set-ulimits-in-container-ulimit).
|
||||
flag values](run.md#set-ulimits-in-container---ulimit).
|
||||
|
||||
### 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`
|
||||
|
||||
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
|
||||
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):
|
||||
|
|
|
@ -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.
|
||||
|
||||
## When the daemon supports multiple operating systems
|
||||
|
||||
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
|
||||
`--platform`. This would be necessary when importing a Linux image into a Windows
|
||||
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
|
||||
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
|
||||
> 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
|
||||
|
||||
```
|
||||
```bash
|
||||
manifest inspect --help
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
> **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
|
||||
> 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
|
||||
> 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 inspect](network_inspect.md)
|
||||
* [network list](network_list.md)
|
||||
* [network list](network_ls.md)
|
||||
* [network rm](network_rm.md)
|
||||
* [network prune](network_prune.md)
|
||||
* [network connect](network_connect.md)
|
||||
|
|
|
@ -24,7 +24,7 @@ disconnect it from the network.
|
|||
## Examples
|
||||
|
||||
```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 inspect](network_inspect.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)
|
||||
* [container prune](container_prune.md)
|
||||
* [image prune](image_prune.md)
|
||||
|
|
|
@ -56,4 +56,4 @@ deletion.
|
|||
* [network ls](network_ls.md)
|
||||
* [network inspect](network_inspect.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:
|
||||
|
||||
* [id](node_ls.md#id)
|
||||
* [label](node_ls.md#label)
|
||||
* [membership](node_ls.md#membership)
|
||||
* [name](node_ls.md#name)
|
||||
* [role](node_ls.md#role)
|
||||
* [id](#id)
|
||||
* [label](#label)
|
||||
* [membership](#membership)
|
||||
* [name](#name)
|
||||
* [role](#role)
|
||||
|
||||
#### 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
|
||||
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
|
||||
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
|
||||
|
|
|
@ -23,10 +23,17 @@ in a JSON array.
|
|||
|
||||
## 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
|
||||
```
|
||||
|
||||
Output is in JSON format (output below is formatted for readability):
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
|
||||
"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
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ using a Go template.
|
|||
Valid placeholders for the Go template are listed below:
|
||||
|
||||
Placeholder | Description
|
||||
---------------|------------------------------------------------------------------------------------------
|
||||
-------------------|------------------------------------------------------------
|
||||
`.ID` | Plugin ID
|
||||
`.Name` | Plugin name
|
||||
`.Description` | Plugin description
|
||||
|
|
|
@ -32,10 +32,9 @@ by looking at the `Settable` field.
|
|||
|
||||
Here is an extract of a plugin manifest:
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"config": {
|
||||
...
|
||||
"args": {
|
||||
"name": "myargs",
|
||||
"settable": ["value"],
|
||||
|
@ -68,8 +67,7 @@ Here is an extract of a plugin manifest:
|
|||
"source": "/foo",
|
||||
"type": "bind"
|
||||
}
|
||||
],
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -24,15 +24,24 @@ just a specific mapping:
|
|||
|
||||
```bash
|
||||
$ docker ps
|
||||
|
||||
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
|
||||
|
||||
$ docker port test
|
||||
|
||||
7890/tcp -> 0.0.0.0:4321
|
||||
9876/tcp -> 0.0.0.0:1234
|
||||
|
||||
$ docker port test 7890/tcp
|
||||
|
||||
0.0.0.0:4321
|
||||
|
||||
$ docker port test 7890/udp
|
||||
|
||||
2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
|
||||
|
||||
$ docker port test 7890
|
||||
|
||||
0.0.0.0:4321
|
||||
```
|
||||
|
|
|
@ -72,6 +72,7 @@ The `docker ps -s` command displays two different on-disk-sizes for each contain
|
|||
|
||||
```bash
|
||||
$ docker ps -s
|
||||
|
||||
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)
|
||||
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
|
||||
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
|
||||
|
||||
CONTAINER ID MOUNTS
|
||||
9c3527ed70ce remote-volume
|
||||
|
||||
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
|
||||
|
||||
CONTAINER ID MOUNTS
|
||||
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
|
||||
daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
|
||||
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.
|
||||
|
||||
### Concurrent downloads
|
||||
|
@ -101,7 +101,7 @@ same image, their layers are stored only once and do not consume extra disk
|
|||
space.
|
||||
|
||||
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)
|
||||
|
@ -240,7 +240,9 @@ a3ed95caeb02: Pulling fs layer
|
|||
^C
|
||||
```
|
||||
|
||||
> **Note**: Technically, the Engine terminates a pull operation when the
|
||||
> connection between the Docker 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.
|
||||
> **Note**
|
||||
>
|
||||
> The Engine terminates a pull operation when the connection between the Docker
|
||||
> 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
|
||||
|
||||
This will remove the container referenced under the link
|
||||
`/redis`.
|
||||
This removes the container referenced under the link `/redis`.
|
||||
|
||||
```bash
|
||||
$ docker rm /redis
|
||||
|
@ -33,7 +32,7 @@ $ docker rm /redis
|
|||
|
||||
### 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
|
||||
between the two containers. This does not apply when `--link` is used with
|
||||
user-specified networks.
|
||||
|
@ -46,7 +45,7 @@ $ docker rm --link /webapp/redis
|
|||
|
||||
### Force-remove a running container
|
||||
|
||||
This command will force-remove a running container.
|
||||
This command force-removes a running container.
|
||||
|
||||
```bash
|
||||
$ 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)
|
||||
```
|
||||
|
||||
This command will delete all stopped containers. The command
|
||||
`docker ps -a -q` will return all existing container IDs and pass them to
|
||||
the `rm` command which will delete them. Any running containers will not be
|
||||
deleted.
|
||||
This command deletes all stopped containers. The command
|
||||
`docker ps -a -q` above returns all existing container IDs and passes them to
|
||||
the `rm` command which deletes them. Running containers are not deleted.
|
||||
|
||||
### Remove a container and its volumes
|
||||
|
||||
|
@ -75,7 +73,7 @@ $ docker rm -v 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.
|
||||
|
||||
### 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
|
||||
$ docker create -v awesome:/foo -v /bar --name hello redis
|
||||
hello
|
||||
|
||||
$ docker rm -v hello
|
||||
```
|
||||
|
||||
In this example, the volume for `/foo` will remain intact, but the volume for
|
||||
`/bar` will be removed. The same behavior holds for volumes inherited with
|
||||
In this example, the volume for `/foo` remains intact, but the volume for
|
||||
`/bar` is removed. The same behavior holds for volumes inherited with
|
||||
`--volumes-from`.
|
||||
|
|
|
@ -151,7 +151,7 @@ of all containers.
|
|||
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).
|
||||
|
||||
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
|
||||
|
||||
|
@ -278,8 +278,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
|
||||
binary (refer to [get the linux binary](
|
||||
https://docs.docker.com/engine/installation/binaries/#/get-the-linux-binary)),
|
||||
binary (refer to [get the linux binary](https://docs.docker.com/engine/install/binaries/#install-static-binaries)),
|
||||
you give the container the full access to create and manipulate the host's
|
||||
Docker daemon.
|
||||
|
||||
|
@ -307,7 +306,7 @@ docker run -v c:\foo:c: ...
|
|||
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
|
||||
|
@ -318,7 +317,7 @@ mounts in a container.
|
|||
The `--mount` flag supports most options that are supported by the `-v` or the
|
||||
`--volume` flag, but uses a different syntax. For in-depth information on the
|
||||
`--mount` flag, and a comparison between `--volume` and `--mount`, refer to
|
||||
the [service create command reference](service_create.md#add-bind-mounts-or-volumes).
|
||||
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.
|
||||
|
||||
|
@ -340,7 +339,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
|
||||
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.
|
||||
|
||||
Note that ports which are not bound to the host (i.e., `-p 80:80` instead of
|
||||
|
@ -445,8 +444,8 @@ com.example.label3
|
|||
You can load multiple label-files by supplying multiple `--label-file` flags.
|
||||
|
||||
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
|
||||
Guide.
|
||||
metadata in Docker*](https://docs.docker.com/config/labels-custom-metadata/) in
|
||||
the Docker User Guide.
|
||||
|
||||
### Connect a container to a network (--network)
|
||||
|
||||
|
@ -472,9 +471,11 @@ or name. For `overlay` networks or custom plugins that support multi-host
|
|||
connectivity, containers connected to the same multi-host network but launched
|
||||
from different Engines can also communicate in this way.
|
||||
|
||||
> **Note**: 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.
|
||||
> **Note**
|
||||
>
|
||||
> 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
|
||||
disconnect` command.
|
||||
|
@ -575,9 +576,10 @@ $ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc
|
|||
fdisk: unable to open /dev/xvdc: Operation not permitted
|
||||
```
|
||||
|
||||
> **Note**: `--device` cannot be safely used with ephemeral devices. Block devices
|
||||
> that may be removed should not be added to untrusted containers with
|
||||
> `--device`.
|
||||
> **Note**
|
||||
>
|
||||
> 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
|
||||
the form of `--device=<IdType>/<Id>`. Beginning with Windows Server 2019
|
||||
|
@ -597,9 +599,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
|
||||
```
|
||||
|
||||
> **Note**: 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).
|
||||
> **Note**
|
||||
>
|
||||
> 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
|
||||
|
||||
|
@ -700,9 +704,11 @@ $ docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n"
|
|||
1024
|
||||
```
|
||||
|
||||
> **Note**: If you do not provide a `hard limit`, the `soft limit` will be used
|
||||
> 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.
|
||||
> **Note**
|
||||
>
|
||||
> 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:
|
||||
>
|
||||
> ```bash
|
||||
|
@ -840,23 +846,22 @@ network namespace, run this command:
|
|||
$ 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
|
||||
> evolves we expect to see more sysctls become namespaced.
|
||||
|
||||
#### Currently supported sysctls
|
||||
|
||||
- `IPC Namespace`:
|
||||
IPC Namespace:
|
||||
|
||||
```none
|
||||
kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced
|
||||
Sysctls beginning with fs.mqueue.*
|
||||
```
|
||||
- `kernel.msgmax`, `kernel.msgmnb`, `kernel.msgmni`, `kernel.sem`,
|
||||
`kernel.shmall`, `kernel.shmmax`, `kernel.shmmni`, `kernel.shm_rmid_forced`.
|
||||
- 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 will not be allowed.
|
||||
- Sysctls beginning with `net.*`
|
||||
- If you use the `--network=host` option using these sysctls are not allowed.
|
||||
|
|
|
@ -26,11 +26,6 @@ Options:
|
|||
|
||||
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
|
||||
|
||||
### 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:
|
||||
|
||||
* stars (int - number of stars the image has)
|
||||
* is-automated (boolean - true or false) - is the image automated or not
|
||||
* is-official (boolean - true or false) - is the image official or not
|
||||
- stars (int - number of stars the image has)
|
||||
- is-automated (boolean - true or false) - is the image automated or not
|
||||
- is-official (boolean - true or false) - is the image official or not
|
||||
|
||||
#### 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:
|
||||
|
||||
```bash
|
||||
{% raw %}
|
||||
$ docker search --format "{{.Name}}: {{.StarCount}}" nginx
|
||||
|
||||
nginx: 5441
|
||||
|
@ -173,13 +167,11 @@ bitnami/nginx: 23
|
|||
evild/alpine-nginx: 14
|
||||
million12/nginx: 9
|
||||
maxexcloo/nginx: 7
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
This example outputs a table format:
|
||||
|
||||
```bash
|
||||
{% raw %}
|
||||
$ docker search --format "table {{.Name}}\t{{.IsAutomated}}\t{{.IsOfficial}}" nginx
|
||||
|
||||
NAME AUTOMATED OFFICIAL
|
||||
|
@ -189,5 +181,4 @@ richarvey/nginx-php-fpm [OK]
|
|||
jrcs/letsencrypt-nginx-proxy-companion [OK]
|
||||
million12/nginx-php [OK]
|
||||
webdevops/php-nginx [OK]
|
||||
{% endraw %}
|
||||
```
|
||||
|
|
|
@ -32,5 +32,5 @@ Manage secrets.
|
|||
|
||||
* [secret create](secret_create.md)
|
||||
* [secret inspect](secret_inspect.md)
|
||||
* [secret list](secret_list.md)
|
||||
* [secret list](secret_ls.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:
|
||||
|
||||
* [id](secret_ls.md#id) (secret's ID)
|
||||
* [label](secret_ls.md#label) (`label=<key>` or `label=<key>=<value>`)
|
||||
* [name](secret_ls.md#name) (secret's name)
|
||||
- [id](#id) (secret's ID)
|
||||
- [label](#label) (`label=<key>` or `label=<key>=<value>`)
|
||||
- [name](#name) (secret's name)
|
||||
|
||||
#### id
|
||||
|
||||
|
|
|
@ -37,8 +37,10 @@ $ docker secret rm secret.json
|
|||
sapth4csdo5b6wz2p5uimh5xg
|
||||
```
|
||||
|
||||
> **Warning**: Unlike `docker rm`, this command does not ask for confirmation
|
||||
> before removing a secret.
|
||||
> **Warning**
|
||||
>
|
||||
> Unlike `docker rm`, this command does not ask for confirmation before removing
|
||||
> a secret.
|
||||
|
||||
|
||||
## Related commands
|
||||
|
|
|
@ -289,7 +289,7 @@ $ docker service create \
|
|||
```
|
||||
|
||||
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
|
||||
|
||||
|
@ -327,7 +327,7 @@ your web server containers when they start. To update the website, you just
|
|||
update the named volume.
|
||||
|
||||
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
|
||||
volumes in a service:
|
||||
|
@ -342,14 +342,14 @@ volumes in a service:
|
|||
<td><b>type</b></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>
|
||||
<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>:
|
||||
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>npipe</tt>: mounts named pipe from the host into the container (Windows containers only).</li>
|
||||
</ul></p>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -389,11 +389,11 @@ volumes in a service:
|
|||
<td>
|
||||
<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
|
||||
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>
|
||||
<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>
|
||||
</ul></p>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -417,14 +417,13 @@ The following options can only be used for bind mounts (`type=bind`):
|
|||
<tr>
|
||||
<td><b>consistency</b></td>
|
||||
<td>
|
||||
<p>The consistency requirements for the mount; one of
|
||||
<p>The consistency requirements for the mount; one of </p>
|
||||
<ul>
|
||||
<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>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>
|
||||
</ul>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -506,7 +505,7 @@ The following options can only be used for named volumes (`type=volume`):
|
|||
creation. For example,
|
||||
<tt>volume-label=mylabel=hello-world,my-other-label=hello-mars</tt>. For more
|
||||
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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -914,7 +913,7 @@ $ docker service create \
|
|||
The swarm extends my-network to each node running the service.
|
||||
|
||||
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:
|
||||
`--network name=my-network,alias=web1,driver-opt=field1=value1`
|
||||
|
@ -1068,7 +1067,8 @@ 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.
|
||||
|
||||
```bash
|
||||
$ docker service create --name hosttempl \
|
||||
$ docker service create \
|
||||
--name hosttempl \
|
||||
--hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\
|
||||
busybox top
|
||||
|
||||
|
@ -1105,7 +1105,8 @@ 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):
|
||||
|
||||
```bash
|
||||
$ docker service create --name cuda \
|
||||
$ docker service create \
|
||||
--name cuda \
|
||||
--generic-resource "NVIDIA-GPU=2" \
|
||||
--generic-resource "SSD=1" \
|
||||
nvidia/cuda
|
||||
|
|
|
@ -48,7 +48,7 @@ dmu1ept4cxcf redis replicated 3/3 redis:3.0.6
|
|||
Both `docker service inspect redis`, and `docker service inspect dmu1ept4cxcf`
|
||||
produce the same result:
|
||||
|
||||
```none
|
||||
```bash
|
||||
$ docker service inspect redis
|
||||
|
||||
[
|
||||
|
|
|
@ -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
|
||||
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.
|
||||
|
||||
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 service's `STDOUT` and `STDERR`.
|
||||
|
|
|
@ -40,8 +40,10 @@ $ docker service ls
|
|||
ID NAME MODE REPLICAS IMAGE
|
||||
```
|
||||
|
||||
> **Warning**: Unlike `docker rm`, this command does not ask for confirmation
|
||||
> before removing a running service.
|
||||
> **Warning**
|
||||
>
|
||||
> Unlike `docker rm`, this command does not ask for confirmation before removing
|
||||
> a running service.
|
||||
|
||||
## Related commands
|
||||
|
||||
|
|
|
@ -147,9 +147,8 @@ point, effectively removing the `test-data` volume. Each command returns the
|
|||
service name.
|
||||
|
||||
- The `--mount-add` flag takes the same parameters as the `--mount` flag on
|
||||
`service create`. Refer to the [volumes and
|
||||
bind mounts](service_create.md#volumes-and-bind-mounts-mount) section in the
|
||||
`service create` reference for details.
|
||||
`service create`. Refer to the [volumes and bind mounts](service_create.md#add-bind-mounts-volumes-or-memory-filesystems)
|
||||
section in the `service create` reference for details.
|
||||
|
||||
- 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
|
||||
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.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
|
||||
`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
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ using a Go template.
|
|||
Valid placeholders for the Go template are listed below:
|
||||
|
||||
Placeholder | Description
|
||||
------------|------------------------------------------------------------------------------------------
|
||||
------------|-------------------------------------------------------------------
|
||||
`.ID` | Service ID
|
||||
`.Name` | Service name
|
||||
`.Mode` | Service mode (replicated, global)
|
||||
|
|
|
@ -21,13 +21,28 @@ Options:
|
|||
|
||||
## 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 page cache usage from the total memory usage. The API does not perform such a calculation but rather provides the total memory usage and the amount from the page cache so that clients can use the data as needed.
|
||||
> **Note**
|
||||
>
|
||||
> On Linux, the Docker CLI reports memory usage by subtracting page cache usage
|
||||
> from the total memory usage. The API does not perform such a calculation but
|
||||
> rather provides the total memory usage and the amount from the page cache so
|
||||
> that clients can use the data as needed.
|
||||
|
||||
> **Note**: The `PIDS` column contains the number of processes and kernel threads created by that container. Threads is the term used by Linux kernel. Other equivalent terms are "lightweight process" or "kernel task", etc. A large number in the `PIDS` column combined with a small number of processes (as reported by `ps` or `top`) may indicate that something in the container is creating many threads.
|
||||
> **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
|
||||
|
||||
|
@ -161,6 +176,3 @@ On Windows:
|
|||
|
||||
"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 join](swarm_join.md)
|
||||
* [swarm join-token](swarm_join_token.md)
|
||||
* [swarm join-token](swarm_join-token.md)
|
||||
* [swarm leave](swarm_leave.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).
|
||||
|
||||
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`
|
||||
|
||||
|
@ -189,8 +189,8 @@ by passing `--availability=drain` to `docker swarm init`.
|
|||
|
||||
* [swarm ca](swarm_ca.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 unlock](swarm_unlock.md)
|
||||
* [swarm unlock-key](swarm_unlock_key.md)
|
||||
* [swarm unlock-key](swarm_unlock-key.md)
|
||||
* [swarm update](swarm_update.md)
|
||||
|
|
|
@ -39,6 +39,7 @@ the swarm:
|
|||
|
||||
```bash
|
||||
$ docker swarm join-token worker
|
||||
|
||||
To add a worker to this swarm, run the following command:
|
||||
|
||||
docker swarm join \
|
||||
|
@ -46,6 +47,7 @@ To add a worker to this swarm, run the following command:
|
|||
172.17.0.2:2377
|
||||
|
||||
$ docker swarm join-token manager
|
||||
|
||||
To add a manager to this swarm, run the following command:
|
||||
|
||||
docker swarm join \
|
||||
|
@ -57,6 +59,7 @@ Use the `--rotate` flag to generate a new join token for the specified role:
|
|||
|
||||
```bash
|
||||
$ docker swarm join-token --rotate worker
|
||||
|
||||
Successfully rotated worker join token.
|
||||
|
||||
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 leave](swarm_leave.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)
|
||||
|
|
|
@ -117,8 +117,8 @@ by passing `--availability=drain` to `docker swarm join`.
|
|||
|
||||
* [swarm ca](swarm_ca.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 unlock](swarm_unlock.md)
|
||||
* [swarm unlock-key](swarm_unlock_key.md)
|
||||
* [swarm unlock-key](swarm_unlock-key.md)
|
||||
* [swarm update](swarm_update.md)
|
||||
|
|
|
@ -33,6 +33,7 @@ Consider the following swarm, as seen from the manager:
|
|||
|
||||
```bash
|
||||
$ docker node ls
|
||||
|
||||
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
|
||||
7ln70fl22uw2dvjn2ft53m3q5 worker2 Ready Active
|
||||
dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active
|
||||
|
@ -43,6 +44,7 @@ To remove `worker2`, issue the following command from `worker2` itself:
|
|||
|
||||
```bash
|
||||
$ docker swarm leave
|
||||
|
||||
Node left the default swarm.
|
||||
```
|
||||
|
||||
|
@ -57,7 +59,7 @@ command.
|
|||
* [node rm](node_rm.md)
|
||||
* [swarm init](swarm_init.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-key](swarm_unlock_key.md)
|
||||
* [swarm unlock-key](swarm_unlock-key.md)
|
||||
* [swarm update](swarm_update.md)
|
||||
|
|
|
@ -49,6 +49,7 @@ key:
|
|||
|
||||
```bash
|
||||
$ docker swarm unlock-key --rotate
|
||||
|
||||
Successfully rotated manager unlock key.
|
||||
|
||||
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
|
||||
$ docker swarm unlock-key -q
|
||||
|
||||
SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8
|
||||
```
|
||||
|
||||
|
@ -81,7 +83,7 @@ Only print the unlock key, without instructions.
|
|||
* [swarm ca](swarm_ca.md)
|
||||
* [swarm init](swarm_init.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 unlock](swarm_unlock.md)
|
||||
* [swarm update](swarm_update.md)
|
||||
|
|
|
@ -38,7 +38,7 @@ Please enter unlock key:
|
|||
* [swarm ca](swarm_ca.md)
|
||||
* [swarm init](swarm_init.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 unlock-key](swarm_unlock_key.md)
|
||||
* [swarm unlock-key](swarm_unlock-key.md)
|
||||
* [swarm update](swarm_update.md)
|
||||
|
|
|
@ -41,7 +41,7 @@ $ docker swarm update --cert-expiry 720h
|
|||
* [swarm ca](swarm_ca.md)
|
||||
* [swarm init](swarm_init.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 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
|
||||
* `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
|
||||
> space.
|
||||
> **Note**
|
||||
>
|
||||
> Network information is not shown because it does not consume disk space.
|
||||
|
||||
## Performance
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ $ docker stop test
|
|||
|
||||
**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: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)
|
||||
|
@ -194,6 +194,7 @@ machine, using the following different time syntaxes:
|
|||
|
||||
```bash
|
||||
$ docker system events --since 1483283804
|
||||
|
||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||
|
@ -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)
|
||||
|
||||
$ docker system events --since '2017-01-05'
|
||||
|
||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||
|
@ -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)
|
||||
|
||||
$ 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: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)
|
||||
|
@ -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)
|
||||
|
||||
$ docker system events --since '10m'
|
||||
|
||||
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
|
||||
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
|
||||
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
|
||||
|
@ -325,12 +329,12 @@ Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299
|
|||
|
||||
#### Format as JSON
|
||||
|
||||
```none
|
||||
$ docker system events --format '{{json .}}'
|
||||
```bash
|
||||
$ docker system events --format '{{json .}}'
|
||||
|
||||
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
|
||||
{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
|
||||
{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
|
||||
{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
|
||||
{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
|
||||
```
|
||||
|
|
|
@ -97,11 +97,13 @@ deleted: sha256:3a88a5c81eb5c283e72db2dbc6d65cbfd8e80b6c89bb6e714cfaaa0eed99c548
|
|||
Total reclaimed space: 13.5 MB
|
||||
```
|
||||
|
||||
> **Note**: The `--volumes` option was added in Docker 17.06.1. Older versions
|
||||
> of Docker prune volumes by default, along with other Docker objects. On older
|
||||
> versions, run `docker container prune`, `docker network prune`, and
|
||||
> `docker image prune` separately to remove unused containers, networks, and
|
||||
> images, without removing volumes.
|
||||
> **Note**
|
||||
>
|
||||
> The `--volumes` option was added in Docker 17.06.1. Older versions of Docker
|
||||
> prune volumes by default, along with other Docker objects. On older versions,
|
||||
> run `docker container prune`, `docker network prune`, and `docker image prune`
|
||||
> separately to remove unused containers, networks, and images, without removing
|
||||
> volumes.
|
||||
|
||||
|
||||
### Filtering
|
||||
|
@ -138,7 +140,7 @@ containers, images, networks, and volumes without the specified labels.
|
|||
* [volume inspect](volume_inspect.md)
|
||||
* [volume rm](volume_rm.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)
|
||||
* [container prune](container_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.
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@ display any signed tags.
|
|||
|
||||
```bash
|
||||
$ docker trust inspect 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
|
||||
$ docker trust inspect alpine:unsigned
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "alpine:unsigned",
|
||||
|
@ -190,6 +192,7 @@ signed tags in the repository:
|
|||
|
||||
```bash
|
||||
$ docker trust inspect alpine
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "alpine",
|
||||
|
@ -254,6 +257,7 @@ and reports the results in an ordered list:
|
|||
|
||||
```bash
|
||||
$ docker trust inspect alpine notary
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "alpine",
|
||||
|
@ -386,6 +390,7 @@ and specify their `KEYS`:
|
|||
|
||||
```bash
|
||||
$ docker trust inspect --pretty my-image:purple
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
purple 941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557 alice, bob, carol
|
||||
|
||||
|
@ -419,6 +424,7 @@ Root Key: a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce
|
|||
|
||||
```bash
|
||||
$ docker trust inspect --pretty alpine
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
2.6 9ace551613070689a12857d62c30ef0daa9a376107ec0fff0e34786cedb3399b (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
|
||||
$ docker trust inspect --pretty my-image
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||
blue f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197 alice, bob
|
||||
|
|
|
@ -28,7 +28,7 @@ Here's an example of a repo with two signed tags:
|
|||
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||
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:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
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.
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
red 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943 alice
|
||||
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:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
No signatures for example/trust-demo
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ Options:
|
|||
Given an image:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
||||
|
||||
|
@ -41,6 +42,7 @@ Sign a new tag with `docker trust sign`:
|
|||
|
||||
```bash
|
||||
$ docker trust sign 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]
|
||||
eed4e566104a: Layer already exists
|
||||
|
@ -56,10 +58,11 @@ Enter passphrase for repository key with ID 36d4c36:
|
|||
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
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 c24134c079c35e698060beabe110bb83ab285d0d978de7d92fed2c8c83570a41 (Repo Admin)
|
||||
v2 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 (Repo Admin)
|
||||
|
@ -74,7 +77,7 @@ Root Key: 246d360f7c53a9021ee7d4259e3c5692f3f1f7ad4737b1ea8c7b8da741ad980b
|
|||
Given an image:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
No signatures for example/trust-demo
|
||||
|
||||
|
@ -94,6 +97,7 @@ Sign a new tag with `docker trust sign`:
|
|||
|
||||
```bash
|
||||
$ docker trust sign 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]
|
||||
26b126eb8632: Layer already exists
|
||||
|
@ -107,10 +111,11 @@ Enter passphrase for delegation key with ID 27d42a8:
|
|||
Successfully signed docker.io/example/trust-demo:v1
|
||||
```
|
||||
|
||||
`docker trust view` lists the new signature:
|
||||
`docker trust inspect --pretty` lists the new signature:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
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.
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
No signatures or cannot access example/trust-demo
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker trust sign 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 new repository key with ID 731396b:
|
||||
|
@ -159,7 +166,8 @@ Successfully signed docker.io/example/trust-demo:v1
|
|||
```
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 8f6f460abf0436922df7eb06d28b3cdf733d2cac1a185456c26debbff0839c56 alice
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Options:
|
|||
To add a new signer, `alice`, to this repository:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty 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
|
||||
```
|
||||
|
||||
`docker trust view` now lists `alice` as a valid signer:
|
||||
`docker trust inspect --pretty` now lists `alice` as a valid signer:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty 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.
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
No signatures or cannot access example/trust-demo
|
||||
```
|
||||
|
||||
```bash
|
||||
$ 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:
|
||||
Repeat passphrase for new repository key with ID 95b9e55:
|
||||
Successfully initialized "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
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
No signatures for example/trust-demo
|
||||
|
||||
|
@ -112,7 +114,8 @@ Root Key: 748121c14bd1461f6c58cb3ef39087c8fdc7633bb11a98af844fd9a04e208103
|
|||
## Add a signer to multiple repos
|
||||
To add a signer, `alice`, to multiple repositories:
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||
|
||||
|
@ -126,7 +129,8 @@ Repository Key: ecc457614c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
|
|||
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||
```
|
||||
```bash
|
||||
$ docker trust view example/trust-demo2
|
||||
$ docker trust inspect --pretty example/trust-demo2
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||
|
||||
|
@ -143,6 +147,7 @@ Add `alice` to both repositories with a single `docker trust signer add` command
|
|||
|
||||
```bash
|
||||
$ docker trust signer add alice example/trust-demo example/trust-demo2 --key alice.crt
|
||||
|
||||
Adding signer "alice" to example/trust-demo...
|
||||
Enter passphrase for repository key with ID 95b9e55:
|
||||
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:
|
||||
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
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||
|
||||
|
@ -169,8 +176,10 @@ Administrative keys for example/trust-demo:
|
|||
Repository Key: 95b9e5514c9fc399da523a5f4e24fe306a0a6ee1cc79a10e4555b3c6ab02f71e
|
||||
Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
||||
```
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo2
|
||||
$ docker trust inspect --pretty example/trust-demo2
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||
|
||||
|
@ -190,6 +199,7 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
|||
|
||||
```bash
|
||||
$ docker trust signer add alice example/unauthorized example/authorized --key alice.crt
|
||||
|
||||
Adding signer "alice" to example/unauthorized...
|
||||
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:
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty 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
|
||||
```
|
||||
|
||||
`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
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty 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:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
||||
|
||||
|
@ -91,7 +92,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
|||
```
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo2
|
||||
$ docker trust inspect --pretty example/trust-demo2
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 alice, bob
|
||||
|
||||
|
@ -120,11 +122,12 @@ Enter passphrase for repository key with ID ece554f:
|
|||
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`:
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo
|
||||
$ docker trust inspect --pretty example/trust-demo
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
v1 74d4bfa917d55d53c7df3d2ab20a8d926874d61c3da5ef6de15dd2654fc467c4 bob
|
||||
|
||||
|
@ -139,7 +142,8 @@ Root Key: 3cb2228f6561e58f46dbc4cda4fcaff9d5ef22e865a94636f82450d1d2234949
|
|||
```
|
||||
|
||||
```bash
|
||||
$ docker trust view example/trust-demo2
|
||||
$ docker trust inspect --pretty example/trust-demo2
|
||||
|
||||
SIGNED TAG DIGEST SIGNERS
|
||||
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
|
||||
a running container with kernel memory initialized.
|
||||
|
||||
> **Warning**: The `docker update` and `docker container update` commands are
|
||||
> not supported for Windows containers.
|
||||
> **Warning**
|
||||
>
|
||||
> The `docker update` and `docker container update` commands are not supported
|
||||
> for Windows containers.
|
||||
{: .warning }
|
||||
|
||||
## Examples
|
||||
|
|
|
@ -33,20 +33,32 @@ describes all the details of the format.
|
|||
$ docker version
|
||||
|
||||
Client:
|
||||
Version: 1.8.0
|
||||
API version: 1.20
|
||||
Go version: go1.4.2
|
||||
Git commit: f5bae0a
|
||||
Built: Tue Jun 23 17:56:00 UTC 2015
|
||||
OS/Arch: linux/amd64
|
||||
Version: 19.03.8
|
||||
API version: 1.40
|
||||
Go version: go1.12.17
|
||||
Git commit: afacb8b
|
||||
Built: Wed Mar 11 01:21:11 2020
|
||||
OS/Arch: darwin/amd64
|
||||
Experimental: true
|
||||
|
||||
Server:
|
||||
Version: 1.8.0
|
||||
API version: 1.20
|
||||
Go version: go1.4.2
|
||||
Git commit: f5bae0a
|
||||
Built: Tue Jun 23 17:56:00 UTC 2015
|
||||
OS/Arch: linux/amd64
|
||||
Engine:
|
||||
Version: 19.03.8
|
||||
API version: 1.40 (minimum version 1.12)
|
||||
Go version: go1.12.17
|
||||
Git commit: afacb8b
|
||||
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
|
||||
|
@ -54,7 +66,7 @@ OS/Arch: linux/amd64
|
|||
```bash
|
||||
$ docker version --format '{{.Server.Version}}'
|
||||
|
||||
1.8.0
|
||||
19.03.8
|
||||
```
|
||||
|
||||
### Dump raw JSON data
|
||||
|
@ -62,5 +74,5 @@ $ docker version --format '{{.Server.Version}}'
|
|||
```bash
|
||||
$ 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 inspect](volume_inspect.md)
|
||||
* [volume list](volume_list.md)
|
||||
* [volume list](volume_ls.md)
|
||||
* [volume rm](volume_rm.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 rm](volume_rm.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
|
||||
$ docker volume create
|
||||
85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
||||
|
||||
8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5
|
||||
|
||||
$ docker volume inspect 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d",
|
||||
"CreatedAt": "2020-04-19T11:00:21Z",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data",
|
||||
"Status": null
|
||||
"Labels": {},
|
||||
"Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
|
||||
"Name": "8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5",
|
||||
"Options": {},
|
||||
"Scope": "local"
|
||||
}
|
||||
]
|
||||
|
||||
$ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
|
||||
/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data
|
||||
$ docker volume inspect --format '{{ .Mountpoint }}' 8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5
|
||||
|
||||
/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data
|
||||
```
|
||||
|
||||
## Related commands
|
||||
|
@ -49,4 +56,4 @@ $ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc
|
|||
* [volume ls](volume_ls.md)
|
||||
* [volume rm](volume_rm.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:
|
||||
|
||||
* dangling (boolean - true or false, 0 or 1)
|
||||
* driver (a volume driver's name)
|
||||
* label (`label=<key>` or `label=<key>=<value>`)
|
||||
* name (a volume's name)
|
||||
- dangling (boolean - true or false, 0 or 1)
|
||||
- driver (a volume driver's name)
|
||||
- label (`label=<key>` or `label=<key>=<value>`)
|
||||
- name (a volume's name)
|
||||
|
||||
#### dangling
|
||||
|
||||
|
@ -187,4 +187,4 @@ vol3: local
|
|||
* [volume inspect](volume_inspect.md)
|
||||
* [volume rm](volume_rm.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 inspect](volume_inspect.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)
|
||||
* [container prune](container_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
|
||||
|
||||
```bash
|
||||
$ docker volume rm hello
|
||||
hello
|
||||
$ docker volume rm hello
|
||||
|
||||
hello
|
||||
```
|
||||
|
||||
## 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 ls](volume_ls.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
|
||||
```
|
||||
|
||||
> **Note**: `docker wait` returns `0` when run against a container which had
|
||||
> already exited before the `docker wait` command was run.
|
||||
> **Note**
|
||||
>
|
||||
> `docker wait` returns `0` when run against a container which had already
|
||||
> exited before the `docker wait` command was run.
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
Loading…
Reference in New Issue