> ## 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/ReservedStageName

> `scratch` is reserved and should not be used as a stage name.

`scratch` is reserved and should not be used as a stage name.

| Property | Value       |
| -------- | ----------- |
| Severity | Error       |
| Category | Correctness |
| Default  | Enabled     |

## Description

Reserved words should not be used as names for stages in multi-stage builds.
The reserved words are: `context`, `scratch`.

Using a reserved word as a stage name can conflict with built-in BuildKit
behavior and produce confusing build errors.

## Examples

Bad:

```dockerfile theme={null}
FROM alpine AS scratch
FROM alpine AS context
```

Good:

```dockerfile theme={null}
FROM alpine AS builder
```

## Reference

* [buildkit/ReservedStageName](https://docs.docker.com/reference/build-checks/reserved-stage-name/)
