Two problems with WSL during docker initialization installation
Preface
Recently, I have been learning the backend nest.js in node.js. Several problems I encountered when installing docker have been solved. They are summarized below:
download docker
Open the URL https://docs.docker.com/desktop/install/windows-install/ to download the windows version
. After installing and opening ocker desktop, the error message is as follows. The error message means: the wsl kernel version is low and needs to be updated.
Error 1: Docker Desktop requires a newer WSL kernel version.
solve:
Open the cmd control panel as an administrator and follow the following operations:
As shown in the picture above, after the wsl update is successful, the wsl needs to be restarted before the update will take effect. You can execute wsl --shutdown to close wsl and
start docker again, and an error will be reported:
Docker Desktop - Unexpected wSL error
报错2:Docker Desktop - Unexpected wSL error:An unexpected error was encountered while executing a WSL command.Commoncauses include access rights issues, which occur after waking the computer or notbeing connected to your domain/active directory.
solve
Open the command line tool as an administrator:
netsh winsock reset
You can reopen docker. If it fails, just restart the computer. No need to restart.
After trying this method, it works normally: