docker-hygiene
Purpose
Docker resource auditor for dangling images, containers, and volumes.
Runbook
- Run
scripts/audit.shto collect dangling images, exited containers, unused volumes, and total disk usage. - Review the JSON output in
docker-audit.jsonand inspect each category before recommending cleanup. - If the operator wants to prune, run
scripts/prune.sh --dry-runfirst to preview what would be removed. - Only run
scripts/prune.sh --forceafter explicit operator approval. - Run
scripts/report.shto generate a markdown cost-digest summary.
Stop conditions
- Abort if
dockeris not running (docker infofails). - Abort if the Docker daemon is unreachable.
- Never run
docker system prunewithout explicit--forceconfirmation; default mode is dry-run. - Abort if the active variant is unsupported.
Output format
docker-audit.json— structured audit with dangling images, exited containers, unused volumes, and disk usage- Console: markdown cost-digest with prune savings estimate
Example invocations
bash skills/docker-hygiene/scripts/audit.shbash skills/docker-hygiene/scripts/prune.sh --dry-runbash skills/docker-hygiene/scripts/report.sh- "Audit my Docker environment and show me what's safe to clean up."