Skip to content

Commit

Permalink
add the Docker cleanup method
Browse files Browse the repository at this point in the history
  • Loading branch information
ceccode committed Aug 16, 2018
1 parent b65b195 commit 9c974fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dkrshelp () {
i: see list of stored images
od: delete orphaned and dangling volumes
du: delete dangling and untagged images
p: `official` docker cleanup method; delete stopped containers, and volumes and networks that are not used by containers
EOT
exit 0
}
Expand Down Expand Up @@ -43,7 +44,10 @@ case ${cmd} in
;;
du)
docker rmi $(docker images -q -f dangling=true)
;;
;;
p)
docker system prune -a
;;
*)
dkrshelp
;;
Expand Down

0 comments on commit 9c974fe

Please sign in to comment.