You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the interpreter executes the 2nd and subsequent FROM in a multi-stage Dockerfile, where is the image metadata (e.g. build environment from ARG and ENV) supposed to come from? I.e., the previous stage, the base image, a merger of the two? I'm not sure we've checked this.
The text was updated successfully, but these errors were encountered:
An ARG instruction goes out of scope at the end of the build stage where it was defined. To use an arg in multiple stages, each stage must include the ARG instruction.
That documentation doesn't say for ENV, but this GitHub issue comment says that's the ENV behavior as well.
I think we do this already, but add a test?
However, the comment also says that globalARG, i.e. before any FROM, does apply to all stages. That would require a merge (and make the build cache not a tree).
When the interpreter executes the 2nd and subsequent
FROM
in a multi-stage Dockerfile, where is the image metadata (e.g. build environment fromARG
andENV
) supposed to come from? I.e., the previous stage, the base image, a merger of the two? I'm not sure we've checked this.The text was updated successfully, but these errors were encountered: