docker-compose
Installation
SKILL.md
Docker Compose
Use this skill for the whole Compose lifecycle: model the application, validate the resolved configuration, start or update services, inspect runtime state, and diagnose failures. Prefer the current Compose Specification. Do not add a top-level version key to new files: it is obsolete and does not select a schema.
Operating loop
- Discover the Compose file(s), project directory, env files, profiles, external resources, and whether the task is development, CI, staging, or production.
- Model the application with services, named volumes for durable state, explicit networks for isolation, secrets for sensitive files, and profiles for optional services.
- Resolve before running:
docker compose -f compose.yaml config --quiet docker compose -f compose.yaml config docker compose -f compose.yaml config --services - Operate with the narrowest command:
up -d SERVICE,restart SERVICE,run --rm SERVICE COMMAND, orexec SERVICE COMMAND. Avoiddown -vunless data deletion is intentional and confirmed. - Verify with
ps, health status, logs, an in-container check, and the externally published endpoint where applicable. - Diagnose in order: resolved model → container state → logs → healthcheck → network membership/DNS → mounts/permissions → image/build architecture → host resources.