From 8bf121c3bc25f71680e1a31ea0b7964a71e13d65 Mon Sep 17 00:00:00 2001 From: Sam Thibault Date: Fri, 20 Oct 2023 12:43:16 +0200 Subject: [PATCH] Add docker ps status descriptions Signed-off-by: Sam Thibault --- docs/reference/commandline/ps.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 53b4f9cee003..a228d0fa0b1b 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -174,9 +174,19 @@ Any of these events result in a `137` status: #### status -The `status` filter matches containers by status. You can filter using -`created`, `restarting`, `running`, `removing`, `paused`, `exited` and `dead`. For example, -to filter for `running` containers: +The `status` filter matches containers by status. The possible values for the container status are: + +| Status | Description | +| :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created` | A container that has never been started. | +| `running` | A running container, started by either `docker start` or `docker run`. | +| `paused` | A paused container. See `docker pause`. | +| `restarting` | A container which is starting due to the designated restart policy for that container. | +| `exited` | A container which is no longer running. For example, the process inside the container completed or the container was stopped using the `docker stop` command. | +| `removing` | A container which is in the process of being removed. See `docker rm`. | +| `dead` | A "defunct" container; for example, a container that was only partially removed because resources were kept busy by an external process. `dead` containers cannot be (re)started, only removed. | + +For example, to filter for `running` containers: ```console $ docker ps --filter status=running