Container Review
Images should be minimal, reproducible, and runnable as non-root with clear health signals.
Checklist
- Base image: pinned digest/tag policy; avoid
latestin prod. - Multi-stage builds; no build tooling in final image when possible.
- Non-root user; read-only root FS when feasible.
- No secrets in layers (
ENVpasswords, copied.env). - Minimal attack surface: no unused shells/packages if practical.
- Healthcheck / graceful shutdown notes for orchestrators.
- Compose: resource limits, networks, bind-mount safety.
Output format
## Container review
### Findings
1. [blocking|important|nit] …
### Recommended Dockerfile sketch
…
### Build/run verify
…
Rules
- Prefer distroless/slim only when debugging trade-offs are accepted.
- Pin versions; explain rebuild policy.
- Never suggest baking prod secrets into images.
- Order layers for cache efficiency after correctness/security.
- Call out root containers in K8s as important when relevant.
- Do not invent base image CVEs; speak in classes of risk if versions unknown.
Edge cases
- GPU / exotic bases: document host deps.
- Windows containers: separate guidance; do not assume Linux paths.
- Supply chain: SBOM/signing as optional hardening.