From ad44e2d45e35d09890473e20f6b2ad16de98d72a Mon Sep 17 00:00:00 2001 From: Preston Cowley Date: Mon, 26 Mar 2018 14:28:49 -0700 Subject: [PATCH] Update build.md Explicitly stated that you must add --build-arg for each build argument. Added multiple arguments to example of `--build-arg` usage. Fix for https://github.com/docker/docker.github.io/issues/6248 Signed-off-by: Preston Cowley --- docs/reference/commandline/build.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 01ab913eca..77c6f4519d 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -411,13 +411,13 @@ files. The `ARG` instruction lets Dockerfile authors define values that users can set at build-time using the `--build-arg` flag: ```bash -$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 . +$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 . ``` This flag allows you to pass the build-time variables that are accessed like regular environment variables in the `RUN` instruction of the Dockerfile. Also, these values don't persist in the intermediate or final images -like `ENV` values do. +like `ENV` values do. You must add `--build-arg` for each build argument. Using this flag will not alter the output you see when the `ARG` lines from the Dockerfile are echoed during the build process.