Signed-off-by: Doug Davis <dug@us.ibm.com>
| ... | ... |
@@ -86,17 +86,18 @@ and linking containers. |
| 86 | 86 |
## Examples |
| 87 | 87 |
|
| 88 | 88 |
$ docker run --name test -it debian |
| 89 |
- $$ exit 13 |
|
| 90 |
- exit |
|
| 89 |
+ root@d6c0fe130dba:/# exit 13 |
|
| 91 | 90 |
$ echo $? |
| 92 | 91 |
13 |
| 93 | 92 |
$ docker ps -a | grep test |
| 94 |
- 275c44472aeb debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test |
|
| 95 |
- |
|
| 96 |
-In this example, we are running `bash` interactively in the `debian:latest` image, and giving |
|
| 97 |
-the container the name `test`. We then quit `bash` by running `exit 13`, which means `bash` |
|
| 98 |
-will have an exit code of `13`. This is then passed on to the caller of `docker run`, and |
|
| 99 |
-is recorded in the `test` container metadata. |
|
| 93 |
+ d6c0fe130dba debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test |
|
| 94 |
+ |
|
| 95 |
+This example runs a container named `test` using the `debian:latest` |
|
| 96 |
+image. The `-it` instructs Docker to allocate a pseudo-TTY connected to |
|
| 97 |
+the container's stdin; creating an interactive `bash` shell in the container. |
|
| 98 |
+In the example, the `bash` shell is quit by entering |
|
| 99 |
+`exit 13`. This exit code is passed on to the caller of |
|
| 100 |
+`docker run`, and is recorded in the `test` container's metadata. |
|
| 100 | 101 |
|
| 101 | 102 |
$ docker run --cidfile /tmp/docker_test.cid ubuntu echo "test" |
| 102 | 103 |
|