forked from openshift/imagebuilder
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Args to be used in Variable Evaluation
If the Dockerfile has a `ARG CHOWN_VAL=6173:6173`, then a `COPY --chown=${CHOWN_VAL} srcFile destFile` will fail. However if the Dockerfile has a `ENV CHOWN_VAL=6173:6173` then it succeeds. The dispatchCopy() and add() functions were only going through the list of Environment variables to resolve a Variable instead of the list of Args and Environment variables. Now add the definitions from the ARG statements to the ones from the ENV statements and use both when resolving variables. At some point I'd like to look into converting the b.Env to a Map from a slice like b.Args, but didn't want to run this down now. Fixes: containers/buildah#2192 and probably containers/buildah#2345 Signed-off-by: TomSweeneyRedHat <[email protected]>
- Loading branch information
1 parent
e388800
commit 38e0036
Showing
2 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters