Skip to content
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

Add squash option to podman commit #12889

Closed
pbrezina opened this issue Jan 17, 2022 · 7 comments · Fixed by #13314
Closed

Add squash option to podman commit #12889

pbrezina opened this issue Jan 17, 2022 · 7 comments · Fixed by #13314
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@pbrezina
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Please, add --squash option to podman commit so the new image does not create a new layer but is instead squashed to the latest layer.

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2022
@baude
Copy link
Member

baude commented Jan 17, 2022

at @vrothberg wdyt?

@vrothberg
Copy link
Member

vrothberg commented Jan 18, 2022

Thanks for the proposal, @pbrezina!

I think it's fairly easy to get done since the backend in Buildah already supports squashing on commit. What had to be done is to extend the Podman CLI with a --squash flag and do the plumbing down to when committing the container (i.e., https://github.com/containers/podman/blob/main/libpod/container_commit.go#L63).

@ncrowe2000, that would a cool project to work on when you find time.

@pbrezina
Copy link
Author

Thank you for looking into it. To explain the use case - I want to setup some applications that requires systemd and a specific hostname (FreeIPA precisely), which is currently not possible to do during build time. But I also want to trim down unneeded layer to reduce size of the resulting image.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Feb 21, 2022

@flouthoc PTAL

@flouthoc
Copy link
Collaborator

ackd. I'll take a look.

@flouthoc
Copy link
Collaborator

Above PR should close this.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants