-
Notifications
You must be signed in to change notification settings - Fork 785
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
podman build --squash also squashes layers of base container #1234
Comments
@rhatdan @umohnani8 WDYT? |
Definitely not intentional, we want to match Docker behaviour. |
Also hit this today while trying to see what to use instead of docker-squash in our workflow. |
This one must have slipped over Christmas. Thanks for the report and the ping. We'll have a look. |
Never mind on the Dockerfile, I found a nice chunk on https://stackoverflow.com/questions/42786991/docker-squash-behavior |
@nalind @TomSweeneyRedHat Whats the scoop on this one? Does some of the stuff @nalind is working on fix it? |
Doesn't appear that @nanlind's changes fixed this, but I'll let him correct me. |
@vrothberg @nalind @TomSweeneyRedHat Any progress on this? |
Not that I know of, sigh, slipped off the radar. |
This seems a requirements problem since original committer has assumed that all layers shall be squashed. c806e6e#diff-b9ec73f876c8864b1fbdbf9fd96b4690 Reusing base layers makes a lot of sense, especially when dealing with many images based on common |
Agreed, this is essentially a mislabeling based on a misread of what |
@nalind is there something we can/should do with this or can we close this issue? |
(Wouldn't --layers=false lead to slower builds as intermediate layers are no longer re-used in builds? I'd prefer squashing the layers at the end of the build.) |
I've been playing today looking at the experimental // Retain all layers, squash none. // Squash all new layers into 1 layer, retain old layers // Squash all layers (old and new) into 1 layer. Given that, I'm proposing that we simply switch the functionality of the The one point of concern with this proposal would be the default If we go forward with this proposal, @nalind suggests holding until we are ready for at least a new minor release (i.e 1.12.0) in both Buildah and Podman. |
See containers/buildah#1234 for a discussion about differences between podman and docker builds.
Should this work? When I do
but when I run
Dockerfiles are created in this order:
My buildah version is
|
Could you see if Docker is having issues with OCI Images. Build the image with --format docker and see if you have the same problems. |
See containers/buildah#1234 for a discussion about differences between podman and docker builds.
Description
podman build --squash
squashes all layers into a single layer, whereasdocker build --squash
only squashes the new layers but keeps the layers from the base container. Is this difference intentional? It IMHO limits the usefulness of the --squash option quite a bit.Steps to reproduce the issue:
Describe the results you received:
The created container has only one layer.
Describe the results you expected:
The layers of the base container should be kept intact.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:The text was updated successfully, but these errors were encountered: