Browse code

Add extra info regarding docker run funcationality

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)

Brian Goff authored on 2014/02/19 05:08:09
Showing 2 changed files
... ...
@@ -917,6 +917,8 @@ Running ``docker ps`` showing 2 linked containers.
917 917
 
918 918
 The last container is marked as a ``Ghost`` container. It is a container that was running when the docker daemon was restarted (upgraded, or ``-H`` settings changed). The container is still running, but as this docker daemon process is not able to manage it, you can't attach to it. To bring them out of ``Ghost`` Status, you need to use ``docker kill`` or ``docker restart``.
919 919
 
920
+``docker ps`` will show only running containers by default.  To see all containers: ``docker ps -a``
921
+
920 922
 .. _cli_pull:
921 923
 
922 924
 ``pull``
... ...
@@ -1085,6 +1087,7 @@ The ``docker run`` command first ``creates`` a writeable container layer over
1085 1085
 the specified image, and then ``starts`` it using the specified command. That
1086 1086
 is, ``docker run`` is equivalent to the API ``/containers/create`` then
1087 1087
 ``/containers/(id)/start``.
1088
+Once the container is stopped it still exists and can be started back up.  See ``docker ps -a`` to view a list of all containers.
1088 1089
 
1089 1090
 The ``docker run`` command can be used in combination with ``docker commit`` to
1090 1091
 :ref:`change the command that a container runs <cli_commit_examples>`.
... ...
@@ -50,6 +50,7 @@ Running an interactive shell
50 50
   # allocate a tty, attach stdin and stdout
51 51
   # To detach the tty without exiting the shell,
52 52
   # use the escape sequence Ctrl-p + Ctrl-q
53
+  # note: This will continue to exist in a stopped state once exited (see "docker ps -a")
53 54
   sudo docker run -i -t ubuntu /bin/bash
54 55
 
55 56
 .. _bind_docker: