| Property | Value |
|---|---|
| Severity | Error |
| Category | Maintainability |
| Default | Enabled (50 lines) |
Description
Limits Dockerfile size to encourage modular builds. Enabled by default with a 50-line limit (P90 of analyzed public Dockerfiles). Large Dockerfiles are harder to maintain, review, and debug. This rule encourages:- Breaking complex builds into multi-stage patterns
- Using base images for common dependencies
- Keeping build logic modular
Options
| Option | Type | Default | Description |
|---|---|---|---|
max | integer | 50 | Maximum lines allowed |
skip-blank-lines | boolean | true | Exclude blank lines from count |
skip-comments | boolean | true | Exclude comment lines from count |