| name | dockerfile-hardener |
| description | Improve Dockerfiles for image size, caching, security, reproducibility, and multi-stage build hygiene. Use when container builds are slow, bloated, or unsafe. |
Dockerfile Hardener
Overview
Improve Dockerfiles for image size, caching, security, reproducibility, and multi-stage build hygiene.
Core Workflow
- Inspect the relevant diffs, configs, source files, or artifacts before forming a conclusion.
- Compare the current state against repo conventions, expected guarantees, and known risk areas.
- Prioritize the highest-impact gaps, regressions, or improvement opportunities instead of surface-level noise.
- Recommend the smallest high-leverage changes and the checks that would validate them.
Deliver
- Ranked findings or improvement opportunities with clear evidence.
- The main risks, tradeoffs, or regressions that matter most.
- Validation steps or follow-up edits that would reduce risk.
Guardrails
- Lead with findings, not generic praise or low-value commentary.
- Use repo evidence and surrounding context instead of reviewing in isolation.
- Flag missing validation when a recommendation depends on behavior you could not confirm.
- Prefer repository evidence, command output, and nearby tests over vague intuition.