However, this feature does require disabling cgroups v1 in WSL, which can cause some issues. In early testing we noticed that this will break the docker daemon when running it as a service in WSL, and so if you’re using this feature we recommend you use Docker Desktop for your docker needs. We are working with the Docker team to address this in the future.
If you’d like to customize your idle detection thresholds and more, we’d recommend doing so by not enabling this feature and creating a bash script, see this GitHub gist for instructions.
You can also set this to drop which will instead drop caches entirely after detecting idle, and will not require any cgroup changes.
总结下来，如果你是直接 apt install docker 的话，那你需要打开 systemed 转 cgroup2 ，然后禁用 cgroup 1 。亦或者直接切 Docker Desktop ，亦或者直接采用 drop 策略。