Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion contrib/completion/zsh/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# - Felix Riedel
# - Steve Durrheimer
# - Vincent Bernat
# - Rohan Verma
#
# license:
#
Expand Down Expand Up @@ -2784,7 +2785,7 @@ __docker_subcommand() {
$opts_help \
"($help -p --password)"{-p=,--password=}"[Password]:password: " \
"($help)--password-stdin[Read password from stdin]" \
"($help -u --user)"{-u=,--user=}"[Username]:username: " \
"($help -u --username)"{-u=,--username=}"[Username]:username: " \
"($help -)1:server: " && ret=0
;;
(logout)
Expand Down
10 changes: 9 additions & 1 deletion docs/reference/commandline/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ Options:
## Description

Use `docker events` to get real-time events from the server. These events differ
per Docker object type.
per Docker object type. Different event types have different scopes. Local
scoped events are only seen on the node they take place on, and swarm scoped
events are seen on all managers.

Only the last 1000 log events are returned. You can use filters to further limit
the number of events returned.

### Object types

Expand Down Expand Up @@ -160,6 +165,9 @@ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.

Only the last 1000 log events are returned. You can use filters to further limit
the number of events returned.

#### Filtering

The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
Expand Down
27 changes: 27 additions & 0 deletions docs/reference/commandline/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,33 @@ PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.micro
> Windows containers. This option fails if the container isolation is `hyperv`
> or when running Linux Containers on Windows (LCOW).

### Access an NVIDIA GPU

The `--gpus­` flag allows you to access NVIDIA GPU resources. First you need to
install [nvidia-container-runtime](https://nvidia.github.io/nvidia-container-runtime/).
Visit [Specify a container's resources](https://docs.docker.com/config/containers/resource_constraints/)
for more information.

To use `--gpus`, specify which GPUs (or all) to use. If no value is provied, all
available GPUs are used. The example below exposes all available GPUs.

```bash
$ docker run -it --rm --gpus all ubuntu nvidia-smi
```

Use the `device` option to specify GPUs. The example below exposes a specific
GPU.

```bash
$ docker run -it --rm --gpus device=GPU-3a23c669-1f69-c64e-cf85-44e9b07e7a2a ubuntu nvidia-smi
```

The example below exposes the first and third GPUs.

```bash
$ docker run -it --rm --gpus device=0,2 nvidia-smi
```

### Restart policies (--restart)

Use Docker's `--restart` to specify a container's *restart policy*. A restart
Expand Down