windows下开启docker占用内存过高解决办法
实际上是依赖的WSL2占用的内存,在当前用户目录下新建.wslconfig
文件:
[wsl2]
memory=2GB # Limits VM memory in WSL 2GB, also can be set to other values
swap=0
localhostForwarding=true
processors=2 # Makes the WSL 2 VM use two virtual processors, also can be set to other values
根据自己电脑内存配置情况限制Vmmen大小,这里设置的是2G,重启即可。