AS and FROM keywords’ casing should match.
| Property | Value |
|---|---|
| Severity | Warning |
| Category | Style |
| Default | Enabled |
| Auto-fix | Yes (--fix) |
Description
While Dockerfile keywords can be either uppercase or lowercase, mixing case styles is not recommended for readability. This rule reports violations where mixed case style occurs for aFROM instruction with an AS keyword declaring
a stage name.
Examples
Bad:FROM is uppercase but as is lowercase.
Good:
Auto-fix
The fix changes theAS keyword casing to match the FROM keyword.