-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build-args are not propagated as env vars for RUN statements for buildah bud #2989
Comments
/kind bug |
Gah, nevermind, the issue is that I'm missing |
This is actually an issue, as it seems there is no way to propagate to |
Have you tested this against the latest buildah or against the main branch, if this works there, then you shouldbe opening a RHEL bug and not reporting it here. |
It's a problem on buildah 1.18 on Fedora 33 too, as well as buildah 1.19 in updates-testing. |
I am no expert, but out tests are declaring the ARG then it works. $ cat /tmp/Containerfile $ buildah bud --build-arg=PHP_VERSION=1.2.3 /tmp Without the ARG command, I see the same error as you. Checking with Docker, it requires the ARG also.
|
|
This issue looks very similar what I observed with #2424 earlier |
It probably is. It last worked in Buildah 1.11.6. |
This works the same way as Docker does, if you don't specify the ARG to use, then the Environment variable is not expanded. |
Description
When building a container with
buildah bud
with--build-arg
passed in, the args are not available as env vars for use inside of the container build.This did last work in buildah in either 1.11.x or 1.14.x, and seems to be broken as of buildah 1.15.
Steps to reproduce the issue:
buildah bud --build-arg PHP_VERSION=7.0 --build-arg OS_VERSION=16.04 -f Containerfile-sample
Containerfile-sample
has the following contents:Describe the results you received:
The container builds with the second
RUN
statement completely skipped.Describe the results you expected:
The container builds with the second
RUN
statement executed.Output of
rpm -q buildah
:Output of
buildah version
:Output of
cat /etc/*release
:Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:The text was updated successfully, but these errors were encountered: