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.<DoAsync>d__29.MoveNext()

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

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

   在 CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()

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

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

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

   在 CommunityInstaller.InstallWorkflow.<ProcessAsync>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

最后提示安装成功:

 

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值