简体   繁体   中英

Docker-compose - no space left on device

I am running Docker on an AWS EC2 t2.micro instance, and after I run sudo docker-compose build and sudo docker-compose up I get this error:

Error processing tar file(exit status 1): write /usr/lib/x86_64-linux-gnu/libLLVM-7.so.1: no space left on device

I did a cleanup using sudo docker system prune -a ; however, the error persists.

Here's the data after I run df -h /var/lib/docker/ :

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.7G  7.5G  201M  98% /

And here's df :

Filesystem     1K-blocks    Used Available Use% Mounted on
udev              486736       0    486736   0% /dev
tmpfs             100212     816     99396   1% /run
/dev/xvda1       8065444 7843868    205192  98% /
tmpfs             501056       0    501056   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs             501056       0    501056   0% /sys/fs/cgroup
/dev/loop0         56832   56832         0 100% /snap/core18/1988
/dev/loop1         34176   34176         0 100% /snap/amazon-ssm-agent/3552
/dev/loop2         33152   33152         0 100% /snap/amazon-ssm-agent/2996
/dev/loop3        128896  128896         0 100% /snap/docker/471
/dev/loop4        100352  100352         0 100% /snap/core/10583
/dev/loop5         56832   56832         0 100% /snap/core18/1944
/dev/loop6        100736  100736         0 100% /snap/core/10823
/dev/loop7        134784  134784         0 100% /snap/docker/796
tmpfs             100208       0    100208   0% /run/user/1000

How can I overcome this problem? Would I be able to increase disk space?

Increase your disk size for docker. Check your status with docker system df Also you can clean your volumes with prune docker system prune --volumes

Create an ebs disk volume and mount it under /var/lib/docker. That will solve your disk space problem with docker

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM