cfg/bin/docker-clean

5 lines
231 B
Text
Raw Normal View History

2016-07-21 13:48:49 +00:00
#!/bin/bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc
{ docker images | awk '/<none>/{print $3}'; docker images | awk '!/<none>|REPOSITORY/{ print $1":"$2 }'; } | xargs docker rmi