Open srgoni opened 1 month ago
A friendly reminder that this issue had no activity for 30 days.
Update: The Docker documentation was amended by https://github.com/moby/buildkit/pull/5381 and no longer shows contradictory information.
Podman buildah should be updated to support argument inheritance in the same way as Docker buildkit.
Interested in opening a PR?
Interested, yes, but I'm not familiar with the Podman source code and have no idea where to start.
The place to start would be Buildah not Podman, Podman vendors in buildah to do all of its container image building.
Buildah is a smaller code base.
As far as I can see, arguments are resolved in https://github.com/openshift/imagebuilder/blob/master/builder.go#L290 per stage.
As buildah seems to defer to openshift/imagebuilder to do all the heavy lifting, should I open an issue (or possibly PR) on this repository instead?
I expect the fix would eventually be made there, yes.
Description
Docker provides limited inheritance of Dockerfile ARGs between build stages, as described here: https://docs.docker.com/build/building/variables/#scoping
This contradicts the Dockerfile reference https://docs.docker.com/reference/dockerfile/#scope - which states:
Podman behaves according to the latter statement, making the examples given in the other document incompatible.
Steps to reproduce the issue:
Try to build a Containerfile with the following contents (copied from the Docker manual):
Describe the results you received:
podman build
prints:Describe the results you expected:
docker build
would print:Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: