#!/bin/bash -x # Docker sometimes decides to not clean up correctly, # and it will leave stuff behind. This can block rebuilds and cleans. # Sometimes the simplest solution is to burn it all down and start over. docker ps -aq | xargs -r docker stop docker ps -aq | xargs -r docker rm docker network prune -f docker images --filter dangling=true -qa | xargs -r docker rmi -f docker volume ls --filter dangling=true -q | xargs -r docker volume rm docker images -qa | xargs -r docker rmi -f