网上教程有关于Win10的Docker安装,但所要的Hyper-V家庭版是没有的,根据我的安装过程整合一下。
Hyper-V安装
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
pause
将以上复制至文本文件,改为.cmd文件,以管理员身份运行
Docker安装
官网下载Docker for Windows版本
若启动时遇到因WSL 2报错,应先安装WSL 2
具体操作参考https://docs.microsoft.com/zh-cn/windows/wsl/install-win10