Docker / Compose

Docker / Compose: docker ps -a — Linux

List running and stopped containers.

Availability: Tool and version dependent; install separately where required.中文

Syntax

docker ps -a

Examples

List running and stopped containers.

docker ps -a

Parameters, options and clauses

Option / clauseDescription
-a, --allShow all containers, including stopped containers.
-q, --quietPrint container IDs only.
--filter <key=value>Filter containers, for example by status or name.
--format <template>Format the output using a Go template.
-s, --sizeDisplay container writable-layer sizes.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory