docs: document using build contexts to override syntax directive

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2025-11-11 16:15:47 +00:00
parent 606e9d1f48
commit a516d3fb37
+7 -2
View File
@@ -241,8 +241,13 @@ Learn more about the built-in build arguments in the [Dockerfile reference docs]
--build-context=name=VALUE
```
Define additional build context with specified contents. In Dockerfile the context can be accessed when `FROM name` or `--from=name` is used.
When Dockerfile defines a stage with the same name it is overwritten.
Define additional build context with specified contents.
In a Dockerfile:
- the context can be accessed when `FROM name` or `--from=name` is used
- the context overrides a stage called `name` when used as `FROM ... AS name`
- the context overrides a `#syntax` directive when used as `#syntax=name`
The value can be a: