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,重启即可。

posted on 2021-11-03 10:13  肥兔子爱豆畜子  阅读(2914)  评论(2编辑  收藏  举报

导航