Search code examples
dockerdocker-desktop

docker system df and Disk Image Size on Docker Desktop don't match


I am running docker system df and I see :

TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          8         7         46.61GB   26.4GB (56%)
Containers      7         7         16.58GB   0B (0%)
Local Volumes   5         5         2.108GB   0B (0%)
Build Cache     26        3         3.133kB   0B

So, that adds up to ~74GB. But on my Mac, if I go Docker desktop > Settings Resources > Disk Image Size I see 112GB used. Where does the rest go?

What commands is Docker desktop using for finding that out?


Solution

  • docker system df shows Docker daemon disk usage, but Docker Desktop uses a VM under the hood. What you see is probably the VM Disk size VS. Docker daemon files which may differ: the diff may be non-Docker files in Docker Desktop VM (though the diff seems important)

    Note: Docker for Mac 4.7.0 uses HyperKit, it may change depending on versions and OS

    It may also be related to a potential Docker disk space leaks tracked by #1432 or the way disk size is computed for VM differing from disk size computed by docker system df