You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you are building all kinds of docker images, you may end up with a lot of untagged images, volumes. A trick I used in my own projects is a bash function like this.
# docker clean up, remove all stopped containers and untagged images# http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html# https://github.com/chadoe/docker-cleanup-volumes# https://www.calazan.com/docker-cleanup-commands/docker-cleanup() {
docker rm $(docker ps -a -q);
docker rmi $(docker images -q -f dangling=true);
docker volume rm $(docker volume ls -qf dangling=true)
}
Most of the times, just removing the stopped containers is good enough. But it's nice to have something to clean up locally.
Please provide your feedback by posting a comment against this issue.
The text was updated successfully, but these errors were encountered: