win10家庭版安裝Docker for Windows


1. 開啟Hyper-V

新建hyperv.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

以管理員身份執行hyperv.cmd文件,然后重啟

重啟成功后,打開Hyper-V

2. 偽裝成win10專業版

以管理員身份打開cmd,執行如下命令:

 

REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F

 

3. 下載Docker for Windows

 

 

 

 官網下載

4、安裝可能遇到的問題

安裝過程中可能會以下報錯

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM