List the services in the current stack with their status and ports.
docker compose ps shows the containers for the current project, their state, health, and published ports. This page covers reading status and JSON output for CI.
What it does
docker compose ps lists the services in the active project (scoped by directory or -p), including state (running/exited), health, and ports. -a includes stopped services.
An empty list usually means you are in the wrong directory or project - compose ps only shows the current project (set -p or cd correctly). Use docker compose ps -a after a failed up to see which service exited and then docker compose logs it. --format json gives parseable output for CI assertions on service health.
Frequently asked questions
docker compose ps: List Stack Services & Status?
docker compose ps shows the containers for the current project, their state, health, and published ports. This page covers reading status and JSON output for CI.
What it does?
docker compose ps lists the services in the active project (scoped by directory or -p), including state (running/exited), health, and ports. -a includes stopped services.
Common errors in CI?
An empty list usually means you are in the wrong directory or project - compose ps only shows the current project (set -p or cd correctly). Use docker compose ps -a after a failed up to see which service exited and then docker compose logs it. --format json gives parseable output for CI assertions on service health.