High memory consumption after fresh install (not started one container)

Hi, after a fresh Windows 11 install I installed Docker Desktop. Didn’t start any container. Didn’t change any setting. Didn’t sign in. Left PC running during the night ~7 hours and saw this memory consumption.

Makes me want to uninstall Docker Desktop again and use docker in a dedicated VM or manually within WSL.

Any idea why this happens?

Windows 11 - 22H2 - OS Build 22621.1265

Docker Desktop v6.16.3

> wsl --version
WSL version:
Kernel version:
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1265

I have no idea why the memory consumption constantly grows, but in Linux usually free memory is used for caches, which are immediately freed up if memory is required by processes. You can restrict the used memory for WSL in C:\Users\<UserName>\.wslconfig according https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig.

If you want to run docker-ce, you might want to consider to enable systemd support in /etc/wsl.conf, so that docker-ce is automatically started/terminated when the WSL distribution is started/terminated

Note: ports bound to WSL are reachable from the host’s localhost, but not from any of the host’s ips. Meaning when the docker-ce package is used in WSL, published ports will only be accessible from host’s localhost.