Docker error : no space left on device

后端 未结 25 2954
悲哀的现实
悲哀的现实 2020-11-28 00:01

I installed docker on a Debian 7 machine in the following way

$ echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
$          


        
25条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 00:46

    Don't just run the docker prune command. It will delete all the docker networks, containers, and images. So you might end up losing the important data as well.

    The error shows that "No space left on device" so we just need to free up some space.

    The easiest way to free some space is to remove dangling images.

    When the old created images are not being used those images are referred to as dangling images or there are some cache images as well which you can remove.

    Use the below commands. To list all dangling images image id.

    docker images -f "dangling=true" -q
    

    to remove the images by image id.

    docker rmi IMAGE_ID
    

    This way you can free up some space and start hacking with docker again :)

提交回复
热议问题