简体   繁体   中英

Error "No space left on device" during Docker build although there is still space

I am trying to do a simple docker build command, however the error shows that I do not have enough space although df -h shows that I do have enough.

I have tried pruning system, network and volume. Freeing up space in general. The following error is shown below:

ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

The command '/bin/sh -c pip install --trusted-host pypi.python.org -r requirements.txt' returned a non-zero code: 1

This is how my df -h looks like:

Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           395M  760K  394M   1% /run
/dev/xvda1       16G   14G  2.0G  88% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/loop0       89M   89M     0 100% /snap/core/7270
/dev/loop2       89M   89M     0 100% /snap/core/7169
/dev/loop3       18M   18M     0 100% /snap/amazon-ssm-agent/1335
/dev/loop4       18M   18M     0 100% /snap/amazon-ssm-agent/1455
tmpfs           395M     0  395M   0% /run/user/1000

Expected result is to have a successful build.

Run watch df -h in a separate terminal to watch the disk space grow during the build. Also check df -i , as that is another cause for being out of disk space.

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