Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dockerfile-grade

Letter-grade your Dockerfile — security, size, speed, and best practices in one command

License: MIT Node >=18

Install

npx github:NickCirv/dockerfile-grade

Usage

# 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

What it does

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

About

Grade your Dockerfile A+ to F — security, size, speed, and best practices with line-level fix suggestions

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages