mirror of https://github.com/docker/cli.git
Merge pull request #999 from perlun/patch-1
build.md: Document --build-arg without value
This commit is contained in:
commit
771ccaf4ed
|
@ -425,6 +425,18 @@ Dockerfile are echoed during the build process.
|
||||||
For detailed information on using `ARG` and `ENV` instructions, see the
|
For detailed information on using `ARG` and `ENV` instructions, see the
|
||||||
[Dockerfile reference](../builder.md).
|
[Dockerfile reference](../builder.md).
|
||||||
|
|
||||||
|
You may also use the `--build-arg` flag without a value, in which case the value
|
||||||
|
from the local environment will be propagated into the Docker container being
|
||||||
|
built:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ export HTTP_PROXY=http://10.20.30.2:1234
|
||||||
|
$ docker build --build-arg HTTP_PROXY .
|
||||||
|
```
|
||||||
|
|
||||||
|
This is similar to how `docker run -e` works. Refer to the [`docker run` documentation](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)
|
||||||
|
for more information.
|
||||||
|
|
||||||
### Optional security options (--security-opt)
|
### Optional security options (--security-opt)
|
||||||
|
|
||||||
This flag is only supported on a daemon running on Windows, and only supports
|
This flag is only supported on a daemon running on Windows, and only supports
|
||||||
|
|
Loading…
Reference in New Issue