

#Docker for mac qcow2 vs raw update#
Update 2019: many updates have been done to Docker for Mac since this answer was posted to help mitigate problems (notably: supporting a different filesystem).Ĭleanup is still not fully automatic though, you may need to prune from time to time. Perhaps 64GiB is too large for some environments and a We’re also looking at making the maximum size of the.
#Docker for mac qcow2 vs raw Offline#
We’ll create a compaction tool which can be run offline to shrink theĭisk (a bit like the qemu-img convert but without the dd if=/dev/zeroĪnd it should be fast because it will already know where the emptyĢ) we’ll automate running of the compaction tool over VM reboots,ģ) we’ll switch to an online compactor (which is a bit like a GC in a Implement free-block tracking in a metadata file next to the qcow2. Planning / design stage, but I hope it gives you an idea)ġ) we’ll switch to a connection protocol which supports TRIM, and We’re hoping to fix this in several stages: (note this is still at the qcow2 file causing it to grow in size, until itĮventually becomes fully allocated. New sectors are written to the block device.

As new files are created in the filesystem by containers, qcow2 is exposed to the VM as a block device with a maximum size To see the physical size of the file you can use this command:ĭocker on Mac has an additional problem that is hurting a lot of people: the docker.qcow2 file can grow out of proportions (up to 64gb) and won’t ever shrink back down on its own.Īs stated in one of the replies by djs55 this is in the planning to be fixed, but its not a quick fix. This can be somehow misleading because it will output the logical size of the file rather than its physical size. It is also worth mentioning that file size of docker.qcow2 (or Docker.raw on High Sierra with Apple Filesystem) can seem very large (~64GiB), larger than it actually is, when using the following command: You can alias them, and/or put them in a CRON job to regularly clean up the local disk. These are safe to run, they won’t delete image layers that are referenced by images, or data volumes that are used by containers.
