Monday, July 6, 2015

How to deal with 'no space left on device' error when using Docker on OS X

When time is money, sometimes starting from scratch is way more efficient than trying to salvage your data. Recently I got the famous 'no space left on device' when trying to build a container with python, maven and boost. I found this, but immediately imagined the amount of time/effort, and weighed out that it was not worth it.

If you are like me, then you already use Docker as a temporary system, so rebuilding images is not a big deal. In that case, I suggest you do the following:

Add the following to ~/.boot2docker/profile:

# Disk image size in MB 
DiskSize = 40000

This will increase your boot2docker VM to 40GB.

What next? Easy: you destroy everything and start from scratch.

boot2docker stop 
boot2docker destroy 
boot2docker init 
boot2docker start