一. 确定 windows 版本
右键单击“我的电脑”,选择属性就可以了。

如果你的系统是 Windows 10 操作系统专业版、企业版、教育版,请移步菜鸟教程|Windows Docker 安装,讲的还挺详细的。可是…如果和我一样,系统是Windows 10 家庭中文版的,Hyper-V默认是不开启的,菜鸟教程“启用或关闭Windows功能”步骤中没有Hyper-V的选项。

二. 安装 Hyper-V
步骤1:将以下代码复制到记事本中
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
步骤2:把文件保存为Hyper-V.cmd
步骤3:右击该文件,选择以管理员身份运行(A)

部分执行结果如下:
C:\Windows\system32>pushd "C:\

本文详细介绍了Windows 10家庭中文版如何手动安装Docker Desktop,包括启用Hyper-V、解决WSL 2错误的步骤,以及验证Docker是否成功运行的方法。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



