Docker ps: Difference between revisions
Jump to navigation
Jump to search
(→Size) |
|||
(13 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Internal= | =Internal= | ||
* [[ | * [[Docker_Client_Operations#Container_Lifecycle_Operations|Container Lifecycle Operations]] | ||
=Overview= | =Overview= | ||
List running containers. | List running containers. The output contains: | ||
* the container ID and name(s) | |||
* the image the container was created from | |||
* the command | |||
* the container's status | |||
* when long ago was created | |||
* what ports it uses | |||
=Options= | =Options= | ||
==-a== | ==-a, --all== | ||
Lists all containers (stopped and running). | Lists all containers (stopped and running). | ||
==-q, --quiet== | |||
Only display the numeric container IDs. | |||
==--no-trunc== | |||
==-s== | |||
Provide [[#Size|size]] and [[#Virtual_Size|virtual size]] information for a container. | |||
====Size==== | |||
The size represents the amount of data, on disk, that is used for [[Docker_Concepts#Writable_Layer_Size|the writable layer]] of the container. | |||
====Virtual Size==== | |||
The virtual size represents the amount of data used for the read-only image data used by the container '''plus''' the container's [[#Size|writable layer size]]. | |||
==--filter== | |||
--filter "key1=value1" --filter "key2=value2" ... | |||
Where the keys are: | |||
* id | |||
* name | |||
* status: "created", "restarting", "running", "removing", "paused", "exited", "dead" | |||
=Exited Containers= | |||
docker ps --filter "status=exited" |
Latest revision as of 02:50, 2 January 2021
External
Internal
Overview
List running containers. The output contains:
- the container ID and name(s)
- the image the container was created from
- the command
- the container's status
- when long ago was created
- what ports it uses
Options
-a, --all
Lists all containers (stopped and running).
-q, --quiet
Only display the numeric container IDs.
--no-trunc
-s
Provide size and virtual size information for a container.
Size
The size represents the amount of data, on disk, that is used for the writable layer of the container.
Virtual Size
The virtual size represents the amount of data used for the read-only image data used by the container plus the container's writable layer size.
--filter
--filter "key1=value1" --filter "key2=value2" ...
Where the keys are:
- id
- name
- status: "created", "restarting", "running", "removing", "paused", "exited", "dead"
Exited Containers
docker ps --filter "status=exited"