Docker Compose

docker compose ps

List project containers and their state. By default shows running containers; -a includes stopped ones. State alone does not prove application health. Record full container identity and exit state separately from log messages.

Formal Syntax & Structure

docker syntaxdocker
docker compose ps [OPTIONS] [SERVICE...]

Parameters & Attributes

NameTypeDescription
-astringInclude stopped containers
-qstringPrint IDs only

Working Example

Example Snippetdocker
docker compose -f compose.yaml -p bm-v12-observe ps -a
Docker Reference