I encountered a similar problem with my docker-vm (this is "alpine-linux" in VMware Fusion in OS X):
write error: no space left on device alpinevm:/mnt/hgfs failed to build: .. no space left on device
.. in the end, this guide helped me resize / expand the docker volume.
TL; DR:
1 - Check the size of the partition containing / var / lib / docker
> df -h /dev/sda3 17.6G 4.1G 12.6G 25% /var/lib/docker
find '/ dev / sdaN', where N is your partition for '/ var / lib / docker', in my case / dev / sda3
2. Close your virtual machine, go to "Virtual Machine Settings"> "Hard Disk (s)"> resize your "virtual_disk.vmdk" (or any other virtual disk of your machine), then click "Apply" ( see This Guide ) ..
3 - Install cfdisk and e2fsprogs-extra , which contains resize2fs
> apk add cfdisk > apk add e2fsprogs-extra
4 - Run cfdisk and resize / expand / dev / sda3
> cfdisk Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 206847 204800 100M 83 Linux /dev/sda2 206848 4241407 4034560 1.9G 82 Linux swap / Solaris /dev/sda3 4241408 83886079 79644672 12.6G 83 Linux [Bootable] [ Delete ] [ Resize ] [ Quit ] [ Type ] [ Help ] [ Write ] [ Dump ]
.. press down / up to select '/ dev / sda3'
.. press left / right / enter to select "Resize" → "Write" → "Exit"
5 - Run resize2fs to expand the / dev / sda3 file system
> resize2fs /dev/sda3
6 - check the changed volume
> df -h /dev/sda3 37.3G 4.1G 31.4G 12% /var/lib/docker
Alex Aug 29 '19 at 13:23 2019-08-29 13:23
source share