Add removal of images (spotify-gc does not do that anymore)

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-01-08 23:52:50 +01:00
parent 1efe7fa3ca
commit 5983071082
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,3 +1,4 @@
#!/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