Extreme growth of .vhdx file

I’m using V1.15.1 with Windows and dockerd engine in a corporate environment, and unfortunately Rancher acts almost like a bloatware.
The vhdx file has immense size, totally ignoring hardware limitations, using up almost full of free space on the drive until I notice the issue because docker commands start to crash/freeze.

E.g., I use 3 GB of images, the vhdx in C:\Users\username\AppData\Local\rancher-desktop\distro-data is 80 GBs.

I need to gain back some space via Diskpart like this regularly:

Is someone aware of this issue at Rancher’s development team or is it part of the user experience?

This is indeed the way docker works; you have to prune unused images and buildx caches yourself.

And while there is a way to configure WSL to automatically return free disk space from the .vhdx to the host, this is still very buggy and often leads to corruption of the filesystem, requiring you to delete the whole volume. So manually running DiskPart is safer option.

Note that if you run docker prune etc more frequently, then the volume will not grow as much, and you may not need to run DiskPart anymore.