Skip to content

Commit

Permalink
Clarify docs about ARG in FROM
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Nephin <dnephin@docker.com>
  • Loading branch information
dnephin committed Jul 13, 2017
1 parent e3746d3 commit cc6044b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/reference/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc6044b

Please sign in to comment.