From b566758d8e0117bd227c2dd14f950a179d3ff9c1 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Tue, 18 Feb 2014 15:08:09 -0500 Subject: [PATCH] Add extra info regarding docker run funcationality Docker-DCO-1.1-Signed-off-by: Brian Goff (github: cpuguy83) Upstream-commit: bdb4174a7ff2e86e11ea7a32875662d187355e12 Component: cli --- components/cli/docs/sources/reference/commandline/cli.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/cli/docs/sources/reference/commandline/cli.rst b/components/cli/docs/sources/reference/commandline/cli.rst index 927f6d3b2d..8ef0ab8b72 100644 --- a/components/cli/docs/sources/reference/commandline/cli.rst +++ b/components/cli/docs/sources/reference/commandline/cli.rst @@ -917,6 +917,8 @@ Running ``docker ps`` showing 2 linked containers. 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``. +``docker ps`` will show only running containers by default. To see all containers: ``docker ps -a`` + .. _cli_pull: ``pull`` @@ -1085,6 +1087,7 @@ The ``docker run`` command first ``creates`` a writeable container layer over the specified image, and then ``starts`` it using the specified command. That is, ``docker run`` is equivalent to the API ``/containers/create`` then ``/containers/(id)/start``. +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. The ``docker run`` command can be used in combination with ``docker commit`` to :ref:`change the command that a container runs `.