Skip to content

Commit a516d3f

Browse files
committed
docs: document using build contexts to override syntax directive
Signed-off-by: Justin Chadwell <[email protected]>
1 parent 606e9d1 commit a516d3f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/reference/buildx_build.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,13 @@ Learn more about the built-in build arguments in the [Dockerfile reference docs]
241241
--build-context=name=VALUE
242242
```
243243

244-
Define additional build context with specified contents. In Dockerfile the context can be accessed when `FROM name` or `--from=name` is used.
245-
When Dockerfile defines a stage with the same name it is overwritten.
244+
Define additional build context with specified contents.
245+
246+
In a Dockerfile:
247+
248+
- the context can be accessed when `FROM name` or `--from=name` is used
249+
- the context overrides a stage called `name` when used as `FROM ... AS name`
250+
- the context overrides a `#syntax` directive when used as `#syntax=name`
246251

247252
The value can be a:
248253

0 commit comments

Comments
 (0)