OSDN Git Service

80e5f2c0d52c7db0c6e9c52960c151411544bdda
[metasearch/grid-chef-repo.git] / cookbooks / docker-grid / templates / default / usr / local / bin / docker_volumes_cleanup
1 #!/bin/sh
2
3 PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
4
5 sudo='sudo'
6 if id $(whoami) | grep docker > /dev/null 2>&1; then
7   sudo=''
8 fi 
9 [ `whoami` = 'root' ] && sudo=''
10
11 $sudo docker volume ls -qf dangling=true | xargs --no-run-if-empty docker volume rm