Letter-grade your Dockerfile — security, size, speed, and best practices in one command
npx github:NickCirv/dockerfile-grade# Grade the Dockerfile in the current directory
npx github:NickCirv/dockerfile-grade .
# Grade a specific file and show a full optimized rewrite
npx github:NickCirv/dockerfile-grade path/to/Dockerfile --fix| Flag | Description |
|---|---|
--fix |
Print a full optimized Dockerfile with issues resolved |
--json |
Output results as JSON (for scripts and CI) |
--strict |
Exit code 1 if grade is C or below (CI gate) |
--no-color |
Disable colored output |
Reads a Dockerfile and scores it across five weighted categories — Security (30%), Size (25%), Speed (20%), Best Practices (15%), and Documentation (10%) — then outputs a letter grade from A+ to F with per-category breakdowns. Each issue includes a specific line-level fix suggestion. Use --strict to gate CI on grade: the exit code is non-zero if the Dockerfile scores a C or lower.
Node >=18 · MIT · by NickCirv