If you have used docker desktop version on Windows, you may see that the docker image file getting bigger and bigger, but never gives back the space to you even you prune all docker containers and images.
That’s because of ext4.vhdx doesn’t shrink automatically.
Therefore, we need to reclaim it by some operations.
- Stop Docker
- Open powershell as admin, then type
Optimize-VHD -Path c:\path\to\data.vhdx -Mode Full
Reference:
搶先發佈留言