Docker Installation in Windows and Troubleshooting
WSL2 installation
WSL2 is required to run Docker, so install it. If possible, we recommend installing in step 1. If you cannot install in step 1, perform step 2.
Step 1
- Execute the following command in PowerShell to check the installable distribution.
*If the command cannot be executed due to an error, perform step 2.
- Select one from the installable distributions and install with the following command. (The following command installs Ubuntu-20.04)
- After executing the following command, restart the PC.
-
After restarting, start the installed application (Linux distribution).
-
Execute the following command with PowerShell and confirm that the version of the installed application is “2”.
Step 2
-
Search for “Ubuntu” in the Microsoft Store and install the Linux distribution.
-
Launch the installed application (Linux distribution).
-
Execute the following command with PowerShell and confirm that the version of the installed application is “1”.
- Execute the following command to change the version of the installed application. (Replace the command Ubuntu-20.04 according to the installed application.)
*If an error occurs in 4, execute steps 3 and 4 linked below.
https://docs.microsoft.com/ja-jp/windows/wsl/install-manual
-
Restart your PC.
-
After restarting, execute the following command in PowerShell and confirm that the installed application version is “2”.
Docker Desktop installation
Use Docker Desktop to use Docker on Windows.
- Download from the official website and execute.
- After running the installer, the PC will be restarted automatically.
*If it is not restarted automatically, restart it manually.
-
Confirm that the error occurs in Docker after restarting.
-
Follow step 5 in the link below to add your own account that uses Docker to the user group “docker-users”.
*Since Microsoft AD is used, it may not be possible to execute from the GUI. Since Infrastructure knows the command, ask him to execute it.
-
After restarting the PC, check that Docker starts normally.
-
With Docker running, open PowerShell, etc., execute the following command, and if “Hello from Docker!” Is displayed, installation is complete.
Other notes
VMware does not start after installing Docker
Occurs because older versions of VMware and WSL2 cannot coexist.
The solution is to update VMware.
See below for details.
Development Tips List / If VMware does not start after installing Docker
Happy Coding :)