Docker load: no space left on device

I was running out of space on ‘Internal HDD’, so I changed ‘Disk image location’ in preferences to point to an external HDD with 136 GB of free space.

That gave me a folder called ‘DockerDesktop’ with a ‘Docker.raw’ file inside of 34Gb.

I have another ‘Docker.raw’ file of about 60 GB with the images I actually want in a different folder. I compressed this Docker.raw to create ‘archive.tar’ with a size of 59 MB with the hopes of importing it into my images library with docker load -i archive.tar but this command keeps failing with ‘write /Docker.raw: no space left on device’.

It doesn’t make sense.

Both Docker.raw files together or about 94 GB but I have about 136 GB free space on the external HDD.

How can I go about importing the images in my archive.tar/Docker.raw file into my main local images libary?

1 Like

If you are using Docker Desktop, please use the matching category.

We know at least the Topic is neither about docker-ce, nor Docker Desktop for Windows.

I assume the Docker.raw is the virtual harddisk used by Docker Desktops’s utility vm.

The part that confuses me is why you try to load it as image into the docker engine of Docker Desktop that runs inside the utility vm?

There should be only one Docker.raw on MacOS. Where do you see the other? My guess is that when you relocated the disk image, the old one was kept. Maybe Docker Desktop didn’t even finish moving the file properly.

~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw

This data disk is for basically everything. Except the operating system in the VM. If you grep for Docker.raw, you get something like this in the process list:

ps aux | grep Docker.raw | grep -v grep
/Applications/Docker.app/Contents/MacOS/com.docker.virtualization \
  --kernel /Applications/Docker.app/Contents/Resources/linuxkit/kernel \
  --cmdline init=/init loglevel=1 root=/dev/vdb rootfstype=erofs ro vsyscall=emulate panic=0 eth0.dhcp eth1.dhcp linuxkit.unified_cgroup_hierarchy=1 console=hvc0   virtio_net.disable_csum=1 vpnkit.connect=connect://2/1999 \
  --boot /Applications/Docker.app/Contents/Resources/linuxkit/boot.img \
  --disk /Users/ta/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw \
  --networkType gvisor --macaddr-filename-prefix /Users/ta/Library/Containers/com.docker.docker/Data/vms/0/macaddr \
  --cpus 8 \
  --memoryMiB 8092 \
  --console-log /Users/ta/Library/Containers/com.docker.docker/Data/log/vm/console.log \
  --console /Users/ta/Library/Containers/com.docker.docker/Data/vms/0/console.sock \
  --api /Users/ta/Library/Containers/com.docker.docker/Data/virtualization.sock \
  --watchdog \
  --virtiofs /Users \
  --virtiofs /Volumes \
  --virtiofs /private \
  --virtiofs /tmp \
  --virtiofs /var/folders \
  --rosetta

Could be different when using differen backends, but there is only one Docker.raw and a boot.img file containing LinuxKit.

It doesn’t as you try to load a virtual machine disk image file as a collection of Docker images. Those are completely different and not compatible things. You have to have a running Docker Desktop to be able to correctly export (save) and import (load) images. Don’t touch the raw files.

PS.: As the macos tag was added to the topic when I checked, I just moved the topic to the Docker Desktop category

1 Like

Thanks for your help.

If I change the Disk image location to external HDD, it always changes back to internal HHD on it’s own.

If I search for ‘Docker.raw’, I now have two items with that name - one on internal one on external HDD.

I tested and it seems the original disk is indeed kept, but I the new one was in the settinss even after quitting Docker Desktop and starting again. I didn’t have an external drive now. Does that workk for you? Without an external drive?

I realized you probably don’t have space for another copy on the same drive.

Should I file an issue on GitHub? What do you think?

It’s an irritating bug.

There are probably existing topics about this as I remember many cases. Check if any of the open ones can be considered the same issue if not, you can open a new issue. If you do, please share the link here