compose_ps
List containers in a Docker Compose project with status, health, and ports. Filter by service or include stopped containers to inspect project state.
Instructions
List containers in a compose project, parsed from --format json.
Container-level view of one project (state, health, publishers); compose_list enumerates
projects, and container_list covers non-compose containers.
Does not raise on a non-zero CLI exit (a missing compose plugin or a timeout still raises): services
comes back empty - inspect raw.stderr.
Args:
project_dir: Dir with the compose file (default: server cwd; copied to the target host if no local plugin)
files: Explicit compose file paths (repeatable, -f)
project_name: Compose project name override
services: Restrict output to these services
all: Include stopped containers as well
Returns:
dict: {"services": list[dict], "raw": }; on non-zero exit services is an empty list and the
caller should inspect raw.stderr.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | ||
| files | No | ||
| services | No | ||
| project_dir | No | ||
| project_name | No |