Past lives and present lives. – Cause
The Linux subsystem of Windows can take up up to 80% of the machine, so you have to limit its performance for optimization purposes.
Again, the leading edge – cause and effect
Step 0: Console shut down the WSL service, and then manually exit the Docker Desktop
wsl --shutdown
Copy the code
step 1:
%UserProfile%
Copy the code
* Step 2: * Create a new file. Wslconfig and add the following content:
[wsl2]
memory=1GB
swap=0
localhostForwarding=true
Copy the code
*step 3 : * 重启docker desktop
Tips: Don’t set this thing too small, it will lead to startup
memory=1GB
Copy the code