Installing Docker on windows 10 Home, can it be do

2019-04-17 16:22发布

Docker requires win 10 pro because it needs some virtualization extensions (HyperV and Containers). Can these requirements be fulfilled on win 10 Home?

1条回答
仙女界的扛把子
2楼-- · 2019-04-17 16:59

Yes, it can be done on Windows 10 Home (tried on win10Home v1809 27.01.2019)

Run in a command prompt as administrator:

  1. Install 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
    
  2. Install Containers:

    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. Edit registry keys:

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID /t REG_SZ /d "Professional"
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName /t REG_SZ /d "Windows 10 Pro"
    
  4. Download and run official Docker Installer For Windows.

  5. In my case the registry keys were restored after restart, but you could restore them manually:

    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"
    
查看更多
登录 后发表回答