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

run --rmi? [feature] to clean extracted container image #4628

Closed
onlyjob opened this issue Dec 3, 2019 · 22 comments · Fixed by #4772
Closed

run --rmi? [feature] to clean extracted container image #4628

onlyjob opened this issue Dec 3, 2019 · 22 comments · Fixed by #4772
Assignees
Labels
do-not-close Good First Issue This issue would be a good issue for a first time contributor to undertake. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@onlyjob
Copy link
Contributor

onlyjob commented Dec 3, 2019

I'm running the following command for the first time:

podman run -it --rm oci-archive:debian10.oci /bin/echo "Hi"

And after execution an extracted image is left behind:

$ podman images
REPOSITORY                 TAG      IMAGE ID       CREATED       SIZE
<none>                     <none>   834dd85c5b99   3 hours ago   162 MB

It would be great to have an option like --rmi to clean-up such unpacked/pulled image.

Thanks.

@vrothberg
Copy link
Member

This sounds like a great enhancement to me. In case the image is being used by another container, I suggest to ignore the error that it couldn't be removed.

@mheon
Copy link
Member

mheon commented Dec 3, 2019

Agree. Do we also want to restrict it so we only remove the image if it was not already present?

@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2019

Since @onlyjob brought up the Idea, I will let him answer it. I personally could go either way.

@onlyjob
Copy link
Contributor Author

onlyjob commented Dec 3, 2019

Thanks. I think implementation should carefully check if image is being used but always remove unused images even if they existed before.

Extracted image is just a "cache" and when user explicitly requests to drop cache with --rmi I think it would be best to do just that.

@rhatdan
Copy link
Member

rhatdan commented Dec 4, 2019

Sounds reasonable. @onlyjob Would you be interested in adding a PR?

@onlyjob
Copy link
Contributor Author

onlyjob commented Dec 4, 2019

Of course you've asked for PR, as always. :)

I'm not qualified and have no time to implement even if I could... No funding either...

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Dec 4, 2019
@rhatdan
Copy link
Member

rhatdan commented Dec 4, 2019

If you don't ask, you never know if someone will say yes. Thanks for the suggestion.

@bipuladh
Copy link

bipuladh commented Dec 4, 2019

@rhatdan I want to take up this issue.

@vrothberg
Copy link
Member

@rhatdan I want to take up this issue.

Thanks! I assigned the issue to you. Feel free to reach out here or on the #podman channel on Freenode if you have any questions.

@rhatdan
Copy link
Member

rhatdan commented Dec 4, 2019

Excellent @bipuladh Looking forward to the PR.

@github-actions
Copy link

github-actions bot commented Jan 4, 2020

This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.

@mheon
Copy link
Member

mheon commented Jan 4, 2020

Being worked on, I believe

@github-actions
Copy link

github-actions bot commented Feb 4, 2020

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

@vrothberg
Copy link
Member

@bipuladh, did you find time to look into this issue?

@bipuladh
Copy link

bipuladh commented Feb 5, 2020

@vrothberg I stopped because there is a PR #4772 that works on this issue.

@vrothberg
Copy link
Member

@vrothberg I stopped because there is a PR #4772 that works on this issue.

Sorry for not noticing earlier! I dropped a comment that already assigned issues should not be picked up without communicating it.

@boaz0
Copy link
Collaborator

boaz0 commented Feb 5, 2020

@bipuladh I am really sorry that I missed your comment asking to work on this. If you want you can continue working from where I stopped (I don't mind mentoring you if you need help).

@vrothberg this wasn't intentionally and I'm really sorry. I know it's my fault that I didn't read the thread carefully but may I suggest adding the "assigned" tag to issues so I could filter unassigned issues?

Again, I feel bad and am sorry. If there is anything I can do to fix this, let me know.
Thanks.

@vrothberg
Copy link
Member

That's an honest mistake, which can happen. Don't worry, @boaz0! I think you should continue working on it, given there's already the open PR.

[...] may I suggest adding the "assigned" tag to issues so I could filter unassigned issues?

Did you have a look at GitHub search syntax (see below)? I believe it's possible to look for unassigned issues. Anyhow, even a label still requires to read the issue and the comments.

https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests

@boaz0
Copy link
Collaborator

boaz0 commented Feb 5, 2020

@vrothberg - that's actually cool, I didn't know Github has its own search syntax.
Thank you.

@rhatdan
Copy link
Member

rhatdan commented Feb 18, 2020

@boaz0 Are you still working on this, or did it get merged?

@boaz0
Copy link
Collaborator

boaz0 commented Feb 18, 2020

@rhatdan still working on this - close to completion

@mheon
Copy link
Member

mheon commented Feb 18, 2020

I'll try and do a final review in prep for merge after lunch

@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do-not-close Good First Issue This issue would be a good issue for a first time contributor to undertake. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants