【问题标题】:Get the global memory maximum available for Docker in windows, within powershell在 powershell 中获取 Windows 中 Docker 可用的全局内存最大值
【发布时间】:2020-04-16 00:59:56
【问题描述】:

我想在 Windows 上编写一个脚本来检查 Docker 是否可以访问最小 X 量的内存。我需要它来处理在 Hyper-V 上运行的 Docker。

Get-VM with hyper-v 给我分配给 DockerDesktopVM 的内存为 0,我假设是因为它使用动态内存分配。但我知道 Docker 确实为可用内存设置了最大值,即与Docker won't start on Windows- Not enough memory to start Docker 等问题中讨论的相同内存限制@

有没有办法从 powershell 或命令行中获取分配给 Docker 容器的内存限制?

【问题讨论】:

    标签: powershell docker


    【解决方案1】:

    当然,我一问就找到了。

    (Get-VMMemory DockerDesktopVM).Startup
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多