win10家庭版伪装安装Docker for windows

1、新建Hyper-V.cmd文件,并以管理员身份运行
Hyper-V.cmd

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、新建containers.bat文件,并以管理员身份运行
containers.bat

pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del containers.txt
Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
pause

3、修改注册表"计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"下的EditionID为Professional

4、安装docker for windows,取消勾选windows containers

5、试运行docker run hello-world看效果

PS:如出现问题:could not read CA certificate “C:\Users\username.docker\machine\machines\default\ca.pem”: open C:\Users\username.docker\machine\machines\default\ca.pem: The system cannot find the file specified.
问题原因:应该是之前安装过Docker Toolbox。将docker的环境变量全部删除即可

你可能感兴趣的:(win10家庭版伪装安装Docker for windows)