mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #14406 from duglin/tweakCmdlineHelp
Fix example in cmdline help text to have correct output
This commit is contained in:
commit
270d7e1af8
1 changed files with 8 additions and 7 deletions
|
@ -86,17 +86,18 @@ and linking containers.
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
$ docker run --name test -it debian
|
$ docker run --name test -it debian
|
||||||
$$ exit 13
|
root@d6c0fe130dba:/# exit 13
|
||||||
exit
|
|
||||||
$ echo $?
|
$ echo $?
|
||||||
13
|
13
|
||||||
$ docker ps -a | grep test
|
$ docker ps -a | grep test
|
||||||
275c44472aeb debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test
|
d6c0fe130dba debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test
|
||||||
|
|
||||||
In this example, we are running `bash` interactively in the `debian:latest` image, and giving
|
This example runs a container named `test` using the `debian:latest`
|
||||||
the container the name `test`. We then quit `bash` by running `exit 13`, which means `bash`
|
image. The `-it` instructs Docker to allocate a pseudo-TTY connected to
|
||||||
will have an exit code of `13`. This is then passed on to the caller of `docker run`, and
|
the container's stdin; creating an interactive `bash` shell in the container.
|
||||||
is recorded in the `test` container metadata.
|
In the example, the `bash` shell is quit by entering
|
||||||
|
`exit 13`. This exit code is passed on to the caller of
|
||||||
|
`docker run`, and is recorded in the `test` container's metadata.
|
||||||
|
|
||||||
$ docker run --cidfile /tmp/docker_test.cid ubuntu echo "test"
|
$ docker run --cidfile /tmp/docker_test.cid ubuntu echo "test"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue