Skip to content
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

ARG is no longer set after FROM #224

Closed
me-kell opened this issue Mar 27, 2024 · 1 comment · Fixed by #235
Closed

ARG is no longer set after FROM #224

me-kell opened this issue Mar 27, 2024 · 1 comment · Fixed by #235
Labels
docs Documentation

Comments

@me-kell
Copy link

me-kell commented Mar 27, 2024

The following comment regarding the scope of an ARG instruction in a Dockerfile:

## Not sure why we have to repeat this, but apparently the arg is no
## longer set after FROM.
ARG base_image_version=jammy

Can be explained/answered with this part of the documentation in Dockerfile reference - Scope:

An ARG instruction goes out of scope at the end of the build stage where it was defined. To use an argument in multiple stages, each stage must include the ARG instruction.

@tarleb
Copy link
Member

tarleb commented May 3, 2024

Thanks, that's informative. Would you like to create a PR to update those docs?

@tarleb tarleb added the docs Documentation label May 3, 2024
daamien added a commit that referenced this issue May 14, 2024
@daamien daamien linked a pull request May 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants