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