Skip to content

Commit

Permalink
docs/reference: run.md update confusing example name
Browse files Browse the repository at this point in the history
This example was mounting `/dev/zero` as `/dev/nulo` inside the container.
The `nulo` name was intended to be a "made up / custom" name, but various
readers thought it to be a typo for `/dev/null`.

This patch updates the example to use `/dev/foobar` as name, which should
make it more clear that it's a custom name.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Oct 10, 2022
1 parent 8d807a0 commit aea2a8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/reference/commandline/run.md
Expand Up @@ -591,14 +591,15 @@ retrieve the container's ID once the container has finished running.
### <a name=device></a> Add host device to container (--device)

```console
$ docker run --device=/dev/sdc:/dev/xvdc \
--device=/dev/sdd --device=/dev/zero:/dev/nulo \
-i -t \
ubuntu ls -l /dev/{xvdc,sdd,nulo}
$ docker run -it --rm \
--device=/dev/sdc:/dev/xvdc \
--device=/dev/sdd \
--device=/dev/zero:/dev/foobar \
ubuntu ls -l /dev/{xvdc,sdd,foobar}

brw-rw---- 1 root disk 8, 2 Feb 9 16:05 /dev/xvdc
brw-rw---- 1 root disk 8, 3 Feb 9 16:05 /dev/sdd
crw-rw-rw- 1 root root 1, 5 Feb 9 16:05 /dev/nulo
crw-rw-rw- 1 root root 1, 5 Feb 9 16:05 /dev/foobar
```

It is often necessary to directly expose devices to a container. The `--device`
Expand Down

0 comments on commit aea2a8c

Please sign in to comment.