Mercurial > hg > config
annotate bin/docker_vacuum.sh @ 915:0bb00763f6d2
update distribute for modern python packaging
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 27 May 2024 16:44:09 -0700 |
parents | 002c1e85ff30 |
children |
rev | line source |
---|---|
794 | 1 #!/bin/bash |
2 | |
3 # http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/ | |
4 | |
866 | 5 # Remove all stopped containers |
6 docker container prune -f | |
7 | |
794 | 8 # Make sure exited containers are deleted |
9 docker rm -v $(docker ps -a -q -f status=exited) | |
10 | |
11 # Remove unwanted 'dangling' images | |
12 docker rmi $(docker images -f "dangling=true" -q) | |
13 | |
14 # Remove unwanted volumes | |
15 docker volume rm $(docker volume ls -qf dangling=true) | |
867 | 16 docker volume prune -f |