Docker Community Forums

Share and learn in the Docker community.

Docker build extends vdi even after deleting container and image


I am using Docker version 17.03.1-ce, build c6d412e on virtualbox,
Linux osboxes 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I am trying to build and install a really robust application.
The installation can fail due to various reasons (lots of configuration options).

After a failed build, I can delete used space with
docker ps -a
docker container rm
docker container rm

This appears to clear space in virtual machine os (df -h shows it).
But when I try to build again, my dynamically allocated VDI disk is extended like it was full.
I can’t find an applicable solution for this, the only way is to zerofree the fs and shrink vdi by vboxmanage command.

I have tried overlay and devicemapper driver.
Please help.