Debian Codegraph @

buildkit/frontend/dockerfile/linter/docs/ReservedStageName.md

raw
1 ## Output
2
3 ```text
4 'scratch' is reserved and should not be used as a stage name
5 ```
6
7 ## Description
8
9 Reserved words should not be used as names for stages in multi-stage builds.
10 The reserved words are:
11
12 - `context`
13 - `scratch`
14
15 ## Examples
16
17 ❌ Bad: `scratch` and `context` are reserved names.
18
19 ```dockerfile
20 FROM alpine AS scratch
21 FROM alpine AS context
22 ```
23
24 ✅ Good: the stage name `builder` is not reserved.
25
26 ```dockerfile
27 FROM alpine AS builder
28 ```