Reputation: 1654
I am currently trying to create docker image with python files and lot of extra packages in requirement.txt.
While I am running the command "sudo docker build -t XXX ." the packages are downloaded and than installed one by one untill I receive an error: "Could not install packages due to an EnvironmentError: [Errno 28] No space left on device"
I have already did the atomic option of "sudo docker system prune" and all the past docker images are deleted.
Moreover, "sudo docker info" shows that I have 15 GB allocated to docker and while my unsuccesfull docker image size is 1 GB size it is still well below the total memory.
None of the options mentioned here: https://unix.stackexchange.com/questions/203168/docker-says-no-space-left-on-device-but-system-has-plenty-of-space or here: Docker error : no space left on device worked. I can create several "failed" dockers of ~1GB with the total size of more than 20GB so it is not an issue of lack of space on my HDD of VM. So I would be grateful for some more ideas.
Upvotes: 18
Views: 21814
Reputation: 207
If you are using Docker Desktop on Mac, go to Preferences and increase the Disk image size. In my case it was displaying that it was full Disk image size: 59.6 GB (59.6 GB used)
.
Upvotes: 7
Reputation: 51886
The disk partition used by Docker is becoming full during the build. You can see the available and used space on your partitions using df -h
. You can either add more space to that partition or you need to clean more files.
The docker system prune
only removes unused data (dangling images, unreferences volumes ...). You can clean more space, by deleting images that you don't need. I suggest you take a look at the images you have using docker image ls
and explicitly delete unneeded ones using docker image rm <image>
.
Upvotes: 33