一尘不染

在Windows 10 Home上安装Docker,可以完成吗?

docker

Docker需要win 10专业版,因为它需要一些虚拟化扩展(HyperV和Containers)。Win 10 Home能否满足这些要求?


阅读 709

收藏
2020-06-17

共1个答案

一尘不染

是的,可以在Windows 10 Home上完成(在win10Home v1809上尝试过27.01.2019)

管理员* 身份在 命令提示符下 运行: *

  1. 安装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
  1. 安装容器:
        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
  1. 编辑注册表项:
        REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID /t REG_SZ /d "Professional"
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v ProductName /t REG_SZ /d "Windows 10 Pro"
  1. 下载并运行Windows的官方Docker Installer。

  2. 就我而言,注册表项是在重新启动后还原的,但是您可以手动还原它们:

        REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID /t REG_SZ /d "Core"
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName /t REG_SZ /d "Windows 10 Home"
2020-06-17