[Docker] Docker build error: No left space in device

版权声明:本文为博主原创文章,未经博主允许不得转载。PS: 转载请注明出处 http://blog.csdn.net/ouyangtianhan https://blog.csdn.net/ouyangtianhan/article/details/79910377

RT

This happens when you run docker build many times in Linux/ubuntu system, then your disk/storage has no other space for your building.

  • Check storage usage. You can run:
    df -h
    to see the storage/inodes used info. You will see something like:

    Filesystem      Size  Used Avail Use% Mounted on
    udev            3.9G     0  3.9G   0% /dev
    tmpfs           799M   33M  766M   5% /run
    /dev/xvda1      7.7G  4.1G  3.7G  53% /
    tmpfs           3.9G     0  3.9G   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
    tmpfs           799M     0  799M   0% /run/user/1000
    
  • Remove docker unused files.
    Through cmd:
    cd /
    du -chs *

    step by step, you can find out the most space used folder.
    And finally you find out /var/lib/docker folder occupies the most space.
    For me, this is my occasion. ;)
    Then I run cmd: rm * -rf in this folder. Don’t need worry.
  • PS: AUFS/Laysers/Images…. if you wanna know what these folders/words are. Check the docker.io official site please.

猜你喜欢

转载自blog.csdn.net/ouyangtianhan/article/details/79910377