Home:ALL Converter>No space left on device when pulling docker image from AWS

No space left on device when pulling docker image from AWS

Ask Time:2019-01-28T16:07:48         Author:J.Main

Json Formatter

I am pulling a variety of docker images from my AWS, but it keeps getting stuck on the final image with the following error

ERROR: for <container-name>  failed to register layer: Error processing tar file(exit status 1): symlink libasprintf.so.0.0.0 /usr/lib64/libasprintf.so: no space left on device
ERROR: failed to register layer: Error processing tar file(exit status 1): symlink libasprintf.so.0.0.0 /usr/lib64/libasprintf.so: no space left on device

Does anyone know how to fix this problem?

I have tried stopping docker, removing var/lib/docker and starting it back up again but it gets stuck at the same place

result of

df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/nvme0n1p1  8.0G  6.5G  1.6G  81% /

devtmpfs        3.7G     0  3.7G   0% /dev

tmpfs           3.7G     0  3.7G   0% /dev/shm

tmpfs           3.7G   17M  3.7G   1% /run

tmpfs           3.7G     0  3.7G   0% /sys/fs/cgroup

tmpfs           753M     0  753M   0% /run/user/0

tmpfs           753M     0  753M   0% /run/user/1000

Author:J.Main,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54397755/no-space-left-on-device-when-pulling-docker-image-from-aws
J.Main :

The issue was with the EC2 instance not having enough EBS storage assigned to it. Following these steps will fix it:\n\n\nNavigate to ec2 \nLook at the details of your instance and locate root device and block device \npress the path and select EBS ID\nclick actions in the volume panel \nselect modify volume \nenter the desired volume size (default is 8GB, shouldn’t need much more)\nssh into instance \nrun lsblk to see available volumes and note the size\nrun sudo growpart /dev/volumename 1 on the volume you want to resize \nrun sudo xfs_growfs /dev/volumename (the one with / in mountpoint column of lsblk)\n",
2019-01-28T13:02:30
Daniel Smith :

I wrote an article about this after struggling with the same issue. If you have deployed successfully before, you may just need to add some maintenance to your deploy process. In my case, I just added cronjob to run the following:\ndocker ps -q --filter "status=exited" | xargs --no-run-if-empty docker rm;\ndocker volume ls -qf dangling=true | xargs -r docker volume rm;\n\nhttps://medium.com/@_ifnull/aws-ecs-no-space-left-on-device-ce00461bb3cb",
2020-09-25T22:41:16
yy