lint_compose
Lint Docker Compose files for unpinned images, privileged mode, docker.sock mounts, exposed ports, and missing healthchecks. Returns line-numbered findings and fixes without a Docker daemon.
Instructions
Lint a docker-compose / compose.yaml file (rule IDs DC2001-DC2014): unpinned or :latest
images, privileged, host network, docker.sock mounts, secrets in environment (values never
echoed), ports published on all interfaces, missing restart/healthcheck, depends_on without a
condition, broad bind mounts (/, home), obsolete version: key, and env_file paths that do not
exist. Uses yaml.safe_load only. Suppress with # dockerlint-ignore: DC2008 above a line or service.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |