mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 12:12:08 +01:00
Slightly improve "cleanup".
- Use docker ps to filter containers by status to avoid building such a long pipe.
This commit is contained in:
2
dokku
2
dokku
@@ -122,7 +122,7 @@ case "$1" in
|
||||
|
||||
cleanup)
|
||||
# delete all non-running container
|
||||
docker ps -a | grep 'Exit' | awk '{print $1}' | xargs docker rm &> /dev/null &
|
||||
docker ps -a -f "status=exited" -q | xargs docker rm &> /dev/null &
|
||||
# delete unused images
|
||||
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi &> /dev/null &
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user