docker clean up failed builds

When a build fails it leaves a Name

This small script will remove them

docker image list | grep "<none>" | tr -s ' ' ',' | cut -d ',' -f 3 | xargs -I {} -t docker image rm {} --force

Disk Space

I recenrtly had an issue due to "Disk Space".... which was surprising as

  • machine had plenty of disk space
  • proxy server was also having disk-space issues.

Resolve

I did some pruning

- images
- containers !!! Yikes ... this deletes data. Be careful

Remove Some more volumes

docker volume rm $(docker volume ls -q --filter dangling=true)