diff --git a/docs/reference/builder.md b/docs/reference/builder.md index 65f6e05f04..b0e40010f7 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -530,8 +530,10 @@ FROM extras:${CODE_VERSION} CMD /code/run-extras ``` -To use the default value of an `ARG` declared before the first `FROM` use an -`ARG` instruction without a value: +An `ARG` declared before a `FROM` is outside of a build stage, so it +can't be used in any instruction after a `FROM`. To use the default value of +an `ARG` declared before the first `FROM` use an `ARG` instruction without +a value inside of a build stage: ```Dockerfile ARG SETTINGS=default