Windows10安装WSL2

安装WSL内核升级包 wsl_update_x64.msi

https://docs.microsoft.com/zh-cn/windows/wsl/wsl2-kernel
# 下载地址
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

以管理员方式启动PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --set-version Ubuntu-20.04 2
wsl --set-default-version 2

验证

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

WSL2安装Docker

https://www.jianshu.com/p/a20c2d58eaac

WSL2中安装docker 并开机启动

https://www.jianshu.com/p/244a9d8a2309

参考:
https://blog.csdn.net/weixin_40955163/article/details/100555823
https://blog.csdn.net/littlehaes/article/details/104879476
https://www.cnblogs.com/wanghuixi/p/7513780.html
https://www.jianshu.com/p/cd4d604e0b44

推荐阅读更多精彩内容