From bc6ff39e42b7e85b3fd0fc9c0d0d82b25548a119 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 11 Oct 2022 00:29:42 +0200 Subject: [PATCH] docs/reference: run.md update confusing example name 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 (cherry picked from commit aea2a8c410930101d82a10a611ca5f9ee375749d) Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/run.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 3a975f5e26..53cac38b25 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -587,14 +587,15 @@ retrieve the container's ID once the container has finished running. ### 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`