ReservedStageName

输出

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

描述

在多阶段构建中,不应将保留字用作阶段名称。保留字包括

  • context
  • scratch

示例

❌ 错误:`scratch` 和 `context` 是保留名称。

FROM alpine AS scratch
FROM alpine AS context

✅ 正确:阶段名称 `builder` 未被保留。

FROM alpine AS builder
© . This site is unofficial and not affiliated with Kubernetes or Docker Inc.