跳至主要內容

Shrink your docker data image (ext4.vhdx) on Windows

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:

https://dev.to/marzelin/how-to-reduce-size-of-docker-data-volume-in-docker-desktop-for-windows-v2-5d38

分類:Hands-on

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題