# docker compose ps: List Stack Services & Status

> How docker compose ps works: listing a stack services with state, health, ports, and reading exit codes in CI.

Source: https://latchkey.dev/learn/command-reference/docker-compose-ps  
Updated: 2026-06-25

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.

## Common usage

```Terminal
docker compose ps
docker compose ps -a
docker compose ps --format json
docker compose ps --status running
```

## 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.

## FAQ

### 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.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
