> ## 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.

# buildkit/ConsistentInstructionCasing

> Instruction keywords should use consistent casing throughout the Dockerfile.

Instruction keywords should use consistent casing throughout the Dockerfile.

| Property | Value |
| - | - |
| Severity | Warning |
| Category | Style |
| Default | Enabled |
| Auto-fix | Yes (`--fix`) |

## Description

Instruction keywords should use consistent casing (all lowercase or all
uppercase). Using a case that mixes uppercase and lowercase, such as PascalCase
or snakeCase, results in poor readability.

## Examples

Bad:

```dockerfile theme={null}
From alpine
Run echo hello > /greeting.txt
EntRYpOiNT ["cat", "/greeting.txt"]
```

Good (all uppercase):

```dockerfile theme={null}
FROM alpine
RUN echo hello > /greeting.txt
ENTRYPOINT ["cat", "/greeting.txt"]
```

Good (all lowercase):

```dockerfile theme={null}
from alpine
run echo hello > /greeting.txt
entrypoint ["cat", "/greeting.txt"]
```

## Auto-fix

The fix changes instruction keywords to match the majority casing in the
Dockerfile.

```dockerfile theme={null}
# Before (majority is uppercase)
FROM alpine
run echo hello

# After (with --fix)
FROM alpine
RUN echo hello
```

## Reference

* [buildkit/ConsistentInstructionCasing](https://docs.docker.com/reference/build-checks/consistent-instruction-casing/)


## Related topics

- [buildkit/FromAsCasing](https://tally.wharflab.com/rules/buildkit/FromAsCasing.md)
- [BuildKit rules](https://tally.wharflab.com/rules/buildkit/overview.md)
- [buildkit/ExposeProtoCasing](https://tally.wharflab.com/rules/buildkit/ExposeProtoCasing.md)
- [buildkit/StageNameCasing](https://tally.wharflab.com/rules/buildkit/StageNameCasing.md)
- [tally/consistent-indentation](https://tally.wharflab.com/rules/tally/consistent-indentation.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.