Skip to content

man/docker-build: fix/expand --build-arg #2012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kolyshkin
Copy link
Contributor

  • Explain that variable value is optional and is taken from environment if not set.
  • Clarify the meaning of ARG.
  • Move example to the end.

Explain that variable value is optional and is taken from environment
if not set.

Clarify the meaning of ARG.

Move example to the end.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! left a comment/suggestion


These variables then are accessed like regular environment variables
in a `RUN` instruction of the Dockerfile. This mechanism is not meant
for passing secret values.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should also mention that if both an ENV, and an ARG is defined, that the ARG takes precedence and will override the value of the ENV.

While working on this, could you also update the online reference docs so that the descriptions match? https://github.com/docker/cli/blob/master/docs/reference/commandline/build.md#set-build-time-variables---build-arg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants