安裝步驟參照 win10家庭版安裝Docker for Windows
過程中 Installation failed
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
然后重啟重新安裝Docker Desktop Installer.exe即可