Tuesday 3 January 2017

Solution for "Docker is eating up my disk!"

I've started to play with Docker recently and quickly bumped into a problem. Although I've never experienced it on my Mac, on AWS EC2 the space was eaten up on /dev/xvda1 and killed my Docker process eventually. The solution proved to be running the following commands

    docker stop $(docker ps -a -q) || true
    docker rm $(docker ps -a -q) || true
    docker rmi $(docker images -f "dangling=true" -q) || true
    docker volume ls -qf dangling=true | xargs -r docker volume rm