Clarify docs about ARG in FROM

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-07-13 12:30:38 -04:00
parent 0c8d401cd8
commit 2880030814
1 changed files with 4 additions and 2 deletions

View File

@ -530,8 +530,10 @@ FROM extras:${CODE_VERSION}
CMD /code/run-extras CMD /code/run-extras
``` ```
To use the default value of an `ARG` declared before the first `FROM` use an An `ARG` declared before a `FROM` is outside of a build stage, so it
`ARG` instruction without a value: 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 ```Dockerfile
ARG SETTINGS=default ARG SETTINGS=default