buildah/tests/bud/copy-envvar
TomSweeneyRedHat 0c3234f226 Fix COPY in containerfile with envvar
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
2020-01-20 23:37:31 +00:00
..
Containerfile Fix COPY in containerfile with envvar 2020-01-20 23:37:31 +00:00
file-0.0.1.txt Fix COPY in containerfile with envvar 2020-01-20 23:37:31 +00:00