您当前的位置: 首页 >  docker
  • 0浏览

    0关注

    516博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Docker Windows桌面版安装 Windows家庭版伪装成专业版系统

不太灵光的程序员 发布时间:2020-09-04 14:00:26 ,浏览量:0

Windows 系统安装Docker时需要先 “启动或关闭Windows功能中开启” Hyper-V功能,我的Windows10系统中没有这个却选项,开启了 “适用于Linux的Windows子系统功能” Docker也可以安装,但是不能正常的启动,相当于废物。 在这里插入图片描述

报错提示1: Docker | installation failed: one prerequisite is not fullfilled

报错提示2: Windows containers are not supported by your windows version check documenta

Docker 支持 WIN10 的专业版,如果使用家庭版则会造成系统版本冲突了!

解决办法:

伪装成专业版系统,通过 Docker 的系统检测。

1、新建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文件,并以管理员身份运行
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、修改注册表
REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F

过程中需要从起两次系统。

在这里插入图片描述

重新安装 Docker

在这里插入图片描述

启动Docker

在这里插入图片描述 好像并不稳定,程序会出现自动退出的情况

关注
打赏
1664870321
查看更多评论
立即登录/注册

微信扫码登录

0.0432s