# docker compose ps Command Reference

> Reference for docker compose ps in CI: list the status of project services with -a, --format, and --status to verify a stack is healthy before tests run.

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

List the containers for a compose project.

docker compose ps shows the services in the current project with their state, ports, and health. In CI it confirms the stack is up before running tests and surfaces which service crashed when something went wrong.

## Common flags

- `-a, --all` - include stopped service containers
- `-q, --quiet` - output only container IDs
- `--format` - output style, e.g. json for scripting
- `--status` - filter by status, e.g. running or exited
- `--services` - list service names only

## Example

```shell
docker compose ps --format json
docker compose ps --status exited --services
```

## In CI

Use docker compose ps --format json and parse it to assert every expected service is running and healthy before integration tests. --status exited quickly identifies a service that crashed during startup so the job can fail fast with a clear cause.

## FAQ

### docker compose ps Command Reference?

docker compose ps shows the services in the current project with their state, ports, and health. In CI it confirms the stack is up before running tests and surfaces which service crashed when something went wrong.

### In CI?

Use docker compose ps --format json and parse it to assert every expected service is running and healthy before integration tests. --status exited quickly identifies a service that crashed during startup so the job can fail fast with a clear cause.

---

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
