Why is docker reporting 100% disk usage on a fresh ubuntu image?

Solution 1:

On windows hosts, boot2docker works by creating a virtual machine using virtual box. when you run boot2docker init, it creates a virtual machine and, by default, assigns 20G to the root disk. this virtual machine runs a minimal Linux OS which in turn runs the actual docker daemon (docker daemon does not run natively on windows - yet).

the disk attached to the virtual machine provides storage for the docker images. so you could look at additional options to boot2docker init command to increase the initial disk size. this will increase the disk size available for use in the virtual machine, but as Queasy pointed out, you need to add the additional options to the docker daemon to increase the available storage for the images.

when you run "df -h" in the container, the total disk size reported is that of the disk space allocated to docker daemon using "dm.basesize" option.

note: boot2docker is now deprecated in favour of Docker Toolbox. you might want to upgrade to that version, in which case you would use "docker-machine create" instead of "boot2docker init". i have switched over to docker-toolbox so cannot test the command options needed for boot2docker init