Enforces maximum number of lines in a Dockerfile.Documentation Index
Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
Use this file to discover all available pages before exploring further.
| 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 |