Docker 桌面应用程序无法在我的 Windows PC 上启动。Docker 桌面应用程序尝试启动很长时间。最后我收到消息:Docker Desktop stopped...
如何解决这个问题?
Docker 日志文件:
[2022-05-20T14:56:45.821144200Z][IPCServer ][Info ] (0f4412ae) ae4e5818-ServiceAPI S<-C eaac4148-ServiceAPIClient-CSharp POST /dns/refresh-hosts
at Docker.Core.BackendAPI.ServiceAPIClient.<UpdateHostsAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\BackendAPI\ServiceAPIClient.cs:line 0
at Docker.Core.BackendAPI.ServiceAPIClient.UpdateHostsAsync(CancellationToken cancellationToken)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__28.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 101
at Docker.Engines.WSL2.LinuxWSL2Engine.<SendState>d__35.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 353
[2022-05-20T14:56:45.874145000Z][IPCServer ][Info ] (0f4412ae) ae4e5818-ServiceAPI S->C eaac4148-ServiceAPIClient-CSharp POST /dns/refresh-hosts (53ms): OK
[2022-05-20T14:59:08.937512300Z][IPCServer ][Info ] (41ce78c0) ae4e5818-ServiceAPI S<-C 08136780-ServiceAPIClient-CSharp POST /windowsfeatures/check
at Docker.Core.HttpClientExtensions.<PostJsonWithJsonResponseAsync>d__1`1.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\HttpClientExtensions.cs:line 22
at Docker.Core.HttpClientExtensions.PostJsonWithJsonResponseAsync[T](HttpClient httpClient, String uri, Object content, CancellationToken cancellationToken)
at Docker.Core.BackendAPI.ServiceAPIClient.<CheckFeaturesAsync>d__4.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\BackendAPI\ServiceAPIClient.cs:line 35
at Docker.Core.BackendAPI.ServiceAPIClient.CheckFeaturesAsync(CancellationToken cancellationToken, WindowsFeature[] windowsFeatures)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoCheckPreconditionsAsync>d__33.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 305
at Docker.Engines.WSL2.LinuxWSL2Engine.DoCheckPreconditionsAsync(CancellationToken cancellationToken)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 57
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 31
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStopAsync>d__32.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 286
at Docker.Engines.WSL2.LinuxWSL2Engine.<SendState>d__35.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 353
[2022-05-20T14:59:08.937512300Z][Installer ][Info ] Checking for features: VirtualMachinePlatform, Microsoft-Windows-Subsystem-Linux
[2022-05-20T14:59:09.772765500Z][IPCServer ][Info ] (41ce78c0) ae4e5818-ServiceAPI S->C 08136780-ServiceAPIClient-CSharp POST /windowsfeatures/check (835ms): OK
[2022-05-20T14:59:10.374909000Z][IPCServer ][Info ] (ad841311) ae4e5818-ServiceAPI S<-C 9f7328f6-ServiceAPIClient-CSharp POST /dns/refresh-hosts
at Docker.Core.BackendAPI.ServiceAPIClient.<UpdateHostsAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\BackendAPI\ServiceAPIClient.cs:line 0
at Docker.Core.BackendAPI.ServiceAPIClient.UpdateHostsAsync(CancellationToken cancellationToken)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__28.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 101
at Docker.Engines.WSL2.LinuxWSL2Engine.<SendState>d__35.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 353
[2022-05-20T14:59:10.428909900Z][IPCServer ][Info ] (ad841311) ae4e5818-ServiceAPI S->C 9f7328f6-ServiceAPIClient-CSharp POST /dns/refresh-hosts (53ms): OK
文件内容.wslconfig
:
[wsl2]
memory=10GB
swap=0
如果我删除.wslconfig
文件,我将收到错误:
System.InvalidOperationException:
distro stopped unexpectedly
at Docker.Engines.LinuxkitDaemonStartup.<WaitAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\LinuxkitDaemonStartup.cs:line 60
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__28.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 177
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 51
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 69
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.<RestartAsync>d__27.MoveNext() in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 275