无法在Windows 10上减小Docker最大磁盘映像大小

时间:2019-10-20 19:04:43

标签: docker windows-10

我正在尝试减小设置中的最大磁盘映像大小, 尽管我可以移动并保存最小尺寸,但并没有保存它。 enter image description here

当docker重新启动以保存更改时,它会自动更改回59.6GB

enter image description here

如何将大小固定为16GB?

2 个答案:

答案 0 :(得分:1)

这实际上是适用于Windows的Docker的一个问题:https://github.com/docker/for-win/issues/4725

您可以从管理员Powershell手动更新磁盘大小:

Resize-VHD -Path 'C:\ProgramData\DockerDesktop\vm-data\DockerDesktop.vhdx' -SizeBytes 16gb

答案 1 :(得分:0)

我遇到了同样的问题,我升级到Docker Desktop Community的2.2.0.5版本,并且可以正常工作。

Windows 10专业版 版本10.0.17763