If a Containerfile had lines like:
```
FROM alpine
ENV VERSION=0.0.1
COPY file-${VERSION}.txt /
```
Buildah would not resolve the VERSION variable in the copy statement.
If the 'ENV' in the above Containerfile was changed to ARG, then this
would work.
A recent change to the handling of variables now only looks at variables
set by 'ARG' and not the ones set by the 'ENV' command. This PR
adds the the variables set by the `ENV` to the list of `ARG` variables
when those variables are being resolved by the code.
This also includes added test to guard against this regression in the future.
Addresses: https://github.com/containers/libpod/issues/4878
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Closes: #2095
Approved by: giuseppe
|
||
|---|---|---|
| .. | ||
| Containerfile | ||
| file-0.0.1.txt | ||