I have been tinkering with Docker (17.06.1-ce) on a Ubuntu 16.04 LTS Virtual Machine.
I am building and removing .Net Core 2 SDK containers, which are like 1.5G large. After some time I completely ran out of disk space. After some investigation the /var/lib/docker/aufs/diff folder was full of data, inside folders like:
e17ba29a05457b2ae9acaa69aa3220b5375d9fe7bcef3abade5a7efe022a96db-init-removing
e17ba29a05457b2ae9acaa69aa3220b5375d9fe7bcef3abade5a7efe022a96db-removing
f88f1f45157e4e19c2c77321b54e6856d22501443b79ed77d785385f54e52cf8-removing
fa3cf511441251f0a5a555b8867b08767a2afd3ee4a8fa76a264d5a1a004843f-removing
I remove my containers like so:
docker container rm $(docker container ls -a -q)
docker image rm $(docker image ls -a -q)
I run all my commands with the root account since it's a local temporary machine.
What i've tried myself:
Am I doing something wrong to prevent Docker from cleaning up the files? Any help is greatly appreciated.
Kind regards, Oskar
Regrettably, it looks like a bug was introduced in Docker 17.06.1 due to some cleanups in the AUFS driver that removed a deferred removal of the renamed "-removing
" layers (part of an "atomicRemove" strategy in the AUFS graphdriver) if they weren't deleted immediately on exit. This bug is fixed with PR #34587 which will be in the next patch release of 17.06 as well as in 17.07.
You might be able to verify the fix with a nightly from master.dockerproject.com although I am not fully sure what branch that is building from today.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With