Docker需要win 10专业版,因为它需要一些虚拟化扩展(HyperV和Containers)。Win 10 Home能否满足这些要求?
是的,可以在Windows 10 Home上完成(在win10Home v1809上尝试过27.01.2019)
以 管理员* 身份在 命令提示符下 运行: *
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
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
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"
下载并运行Windows的官方Docker Installer。
就我而言,注册表项是在重新启动后还原的,但是您可以手动还原它们:
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"