win10 home版本装Docker for Windows 更新时间2020年4月11日(实测可用)

docker是当前较热门的应用。作为就不多说了, 

在windows中有两个版本

Docker for Windows:

      需要64位Windows 10 Pro、Enterprise  //win10 家庭中文版没有含

     系统中启用Hyper-V  //win10 家庭中文版没有这个选项

如果不符合上面的要求,需要装Docker Toolbox, 这个要用到虚拟机。本次就不建议,

我当前装的系统是win10 家庭中文版, 支持在线更新的那种. 网上有好多介绍解决这个安装docker for windows的,但都不全,这次实装,把有遇到的问题,都发出来。

step1: 下载docker :

https://hub.docker.com/editions/community/docker-ce-desktop-windows/

step2: 打开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

放在一个auto.bat中,用管理员权限运行,运行完,需要重启。

step3: 解决特点不支持问题: 

如果不处理,会报如下错:

Containers Windows Feature is not available

   在 CommunityInstaller.EnableFeaturesAction.GetFeaturesToEnable()

   在 CommunityInstaller.EnableFeaturesAction.d__29.MoveNext()

--- 引发异常的上一位置中堆栈跟踪的末尾 ---

   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   在 CommunityInstaller.InstallWorkflow.d__29.MoveNext()

--- 引发异常的上一位置中堆栈跟踪的末尾 ---

   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   在 CommunityInstaller.InstallWorkflow.d__24.MoveNext()

需要运行脚本:

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

放在一个auto2.bat中,用管理员权限运行,运行完,需要重启。

step3: 修改注册表: EditionID为:Professional

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

对应EditionID的值修改为: Professional, 我的当前为:CoreCountrySpecific, 改为Professional, 修改后,不要重启,如果重启会恢复为CoreCountrySpecific.

step4:  直接运行下载的Docker Desktop Installer.exe

最后提示安装成功:

win10 home版本装Docker for Windows 更新时间2020年4月11日(实测可用)_第1张图片

 

你可能感兴趣的:(sys,docker,windows,win10,home)