Simplify images cleanup too. Reviewed containers cleanup.
- Images cleanup is a common practice taken from https://docs.docker.com/reference/commandline/cli/#filtering_1
This commit is contained in:
4
dokku
4
dokku
@@ -122,9 +122,9 @@ case "$1" in
|
||||
|
||||
cleanup)
|
||||
# delete all non-running container
|
||||
docker ps -a -f "status=exited" -q | xargs docker rm &> /dev/null &
|
||||
docker rm $(docker ps -a -f "status=exited" -q) &> /dev/null &
|
||||
# delete unused images
|
||||
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi &> /dev/null &
|
||||
docker rmi $(sudo docker images -f "dangling=true" -q) &> /dev/null &
|
||||
;;
|
||||
|
||||
plugins)
|
||||
|
||||
Reference in New Issue
Block a user