From 2880030814986e71010b573899b1f986e5be8405 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Thu, 13 Jul 2017 12:30:38 -0400 Subject: [PATCH] Clarify docs about ARG in FROM Signed-off-by: Daniel Nephin --- docs/reference/builder.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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