在Windows 10上用较新的版本替换Docker桌面后,单击以启动它,并出现以下错误
WSL 2安装不完整
现在,使用单独的MSI更新程序包安装了WSL 2 Linux内核。请单击链接,然后按照说明安装内核更新:
安装Linux内核后按重新启动
默认情况下,在“设置”>“常规”中,已经选择了“使用基于WSL 2的引擎”选项。这可能是由于我已经在本地安装Ubuntu 18.04 LTS。
如果我转到Docker桌面设置>资源> WSL集成
You don't have any WSL 2 distro. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.
How can I get Docker running?
There's two ways you can get it to work
In this page under "Download the Linux kernel update package".
and then Docker will start just fine
If the goal is just to get Docker running, one can simply start by unchecking the box that says "Use the WSL 2 based engine". This can give the following error
Required Windows feature(s) not enabled: Hyper-V.
Switch to WSL 2 based engine?
要启用Hyper-V:https : //docs.microsoft.com/zh-cn/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
因此,在PowerShell 7中运行命令
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
这需要重新启动计算机才能完成操作。然后,再次启动Docker后,您会收到以下错误
Docker初始化失败
发生一个或多个错误。
最终,只需单击以重新启动,Docker便会开始运行
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句