Install Docker with WSL2 Memo ([Part 1] Until WSL2 is installed) * The version that did not follow the official Doc

environment

Windows10 Pro

procedure

MS official procedure

Enable WSL2

Condition check

You are running Windows 10 updated to build 18362 or higher since version 1903.

→ It was OK. (See below)

WSL enabled * powershell administrator privileges

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Enable virtual machine platform option * powershell administrator privileges

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

→ When completed, ** Reboot **.

Set WSL 2 as the default version * powershell administrator privileges

wsl --set-default-version 2
Invalid command line option--set-default-version

that?

If the result of wsl --set-default-version is an invalid command, enter wsl --help. If you don't see --set-default-version, it means it's not supported by your OS and you need to update to version 1903, build 18362 or higher.

And that.

winver 

image.png

**that? ** **

For the time being, I tried Windows Update to upgrade the version. ver2.PNG

PS C:\WINDOWS\system32> wsl --set-default-version 2
Kernel component updates are required to run WSL 2. For more information https://aka.ms/See wsl2kernel
For the main differences from WSL 2, https://aka.ms/See wsl2

I've advanced!

Kernel version upgrade

https://aka.ms/wsl2kernel → Implemented as described

PS C:\WINDOWS\system32> wsl --set-default-version 2
For the main differences from WSL 2, https://aka.ms/See wsl2

It seems to have worked.

Linux distribution installation

https://aka.ms/wslstore → Select Ubuntu

Start after installation

First user creation

Confirmation

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

→ Done!

reference

MS official procedure

MS official procedure English version

https://dev.classmethod.jp/articles/docker-desktop-for-windows-on-wsl2/

https://dev.classmethod.jp/articles/how-to-setup-wsl2/

https://aka.ms/wsl2kernel

Recommended Posts

Install Docker with WSL2 Memo ([Part 1] Until WSL2 is installed) * The version that did not follow the official Doc
Install Docker with WSL2 Memo ([Part 2] Docker introduction)
What to do if the app is not created with the latest Rails version installed when rails new
[Win10 Home Docker environment memo (WSL2 or vagrant)] How to deal with the problem that the loading time of localhost is abnormally long
[WSL] Solution for the phenomenon that 404 is displayed when trying to insert Java with apt (personal memo)