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() function was only going through the list of Environment variables to resolve a Variable instead of the list of Args and Environment variables. If there's a trailing equal `=` sign in the arg, assume that we'd a variable that did not resolve and try to resolve from the list of args. 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