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
buildah automatically removes base image after build #5491
Comments
When reverting back to buildah version
|
I am not seeing this behavior and am using a much newer version of buildah.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I ran into a strange issue with
buildah
after updating, where it automatically removed the based image that is used for a build of a child image. The base image remains visible until the very last steps and gets removed during theCOMMIT
phase of the child image. For years, I was able to build an image with multiple layers, then build a child image using multi-stage builds from the base image, providing the benefits that the first layers between the base and child image remained the same, hence didn't need to be downloaded. I updated bybuildah
yesterday and now, when executing the very same build,buildah
removes the base image after the successful build of the child image.Steps to reproduce the issue:
Consider this Dockerfile called
Dockerfile1
:Then build it via
buildah bud -t test -f Dockerfile1
:This results in the following image:
Consider this Dockerfile called
Dockerfile2
:(The
FROM ${BASE_IMAGE} as base
is there to parameterize the input base image.)And build it via
buildah bud -t test1 -f Dockerfile2 --build-arg BASE_IMAGE=test --log-level trace
:test
with idd818df13c42c
has disappeared:Describe the results you received:
The base image
test
with idd818df13c42c
has been removed or is no longer visible.Describe the results you expected:
The base image
test
with idd818df13c42c
should remain untouched.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
:The text was updated successfully, but these errors were encountered: