Reputation: 524
I would like to write a script that checks that Docker has access to a minimum X amount of memory, on Windows. I need this to work with Docker running on Hyper-V.
Get-VM with hyper-v gives me memory assigned for the DockerDesktopVM of 0, I assume because it's using dynamic memory allocation. But I know Docker does have a maximum set to the memory available, i.e. the same memory limit discussed in questions like Docker won't start on Windows- Not enough memory to start Docker
Is there some way to get the memory limit assigned to the Docker container from within powershell or the command line?
Upvotes: 1
Views: 206
Reputation: 524
Of course as soon as I asked this I found it.
(Get-VMMemory DockerDesktopVM).Startup
Upvotes: 3