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

Support a command similar to docker prune #1912

Closed
talonx opened this issue Oct 14, 2019 · 2 comments
Closed

Support a command similar to docker prune #1912

talonx opened this issue Oct 14, 2019 · 2 comments

Comments

@talonx
Copy link

talonx commented Oct 14, 2019

Description

This is an enhancement request.

docker has an option called image prune which deletes unused images, containers, networks etc. It would be nice to have this in buildah. Running builds often creates many intermediate images which stick around, especially for failed builds. I understand that the purpose of keeping the failed build images is to be able to debug it later. However, while using buildah from tools like ansible-bender, the cause of failure is often readily apparent from the console output and can be resolved without the help of the failed image. Deleting the failed images needs to be done manually, by listing them first and passing them to the buildah rmi command. Having something similar to prune would reduce this effort.

Steps to reproduce the issue:
Please see description.

Describe the results you received:
Please see description.

Describe the results you expected:
Please see description.

Output of rpm -q buildah or apt list buildah:

buildah/bionic,now 1.10.1-1~ubuntu18.04~ppa1 amd64 [installed]

Output of buildah version:

Version:         1.10.1
Go Version:      go1.10.4
Image Spec:      1.0.1
Runtime Spec:    1.0.1-dev
CNI Spec:        0.4.0
libcni Version:  
Git Commit:      
Built:           Fri Aug  9 01:59:48 2019
OS/Arch:         linux/amd64

Output of podman version if reporting a podman build issue:

Version:            1.6.1
RemoteAPI Version:  1
Go Version:         go1.10.4
OS/Arch:            linux/amd64

Output of cat /etc/*release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Output of uname -a:

Linux <snipped> 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Output of cat /etc/containers/storage.conf:

(paste your output here)
@rhatdan
Copy link
Member

rhatdan commented Oct 14, 2019

Can you use podman image prune?

@XVilka
Copy link

XVilka commented Nov 1, 2019

Related issues are containers/podman#4410, containers/podman#4411, containers/podman#3799

And, I think, this one should be closed.

@rhatdan rhatdan closed this as completed Nov 1, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants