Si vous activez Utiliser le moteur basé sur WSL2 de Docker Desktop lorsque WSL2 n'est pas suffisamment installé (*), Docker Desktop peut ne pas pouvoir démarrer dans certains cas.
Une fois que cela s'est produit, j'ai effectué une réinitialisation d'usine sur Docker Desktop et réinstallé cela n'a pas aidé. (Utilisez le moteur basé sur WSL2 est ☑.)
Lancez Docker Desktop →[Au démarrage]→ Chute due à une erreur
Ouvrez la fenêtre des paramètres de Docker Desktop à partir de la barre des tâches pendant le «Démarrage». Après cela, décochez à nouveau Utiliser le moteur basé sur WSL2.
Une fois la fenêtre des paramètres ouverte, tout va bien. Si Docker Desktop est en panne avec une erreur lorsque vous appuyez sur le bouton Appliquer, il semble que la configuration n'est pas terminée, mais vous pouvez fermer la fenêtre manuellement.
Si vous redémarrez Docker Desktop, il devrait démarrer avec WSL2 non coché.
[16:02:30.382][LoggingMessageHandler][Info ] [5b30b70a] <BackendAPIClient end> POST http://backend/hyperv/stop -> 204 NoContent (took 9149ms)
[16:02:30.387][ApiProxy ][Info ] Killing existing com.docker.proxy with PID 19304
[16:02:30.429][VpnKit ][Info ] Killing existing vpnkit with PID 16264
[16:02:30.458][VpnKitBridge ][Info ] Killing existing vpnkit-bridge with PID 2208
[16:02:30.482][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.StoppedState to state change sink
[16:02:30.482][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.StoppedState sent to state change sink
[16:02:30.482][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.StoppedState from LinuxHyperV
[16:02:30.483][EngineStateNotificationRecorder][Debug ] Registered state {"State":"stopped","Mode":"linux","date":1599634950}
[16:02:30.483][SystrayNotifications][Info ] Docker has stopped
[16:02:30.483][LoggingMessageHandler][Info ] [a1a2394b] <NotificationsClient start> POST http://localhost/engine/state
[16:02:30.492][LoggingMessageHandler][Info ] [a1a2394b] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 8ms)
[16:02:30.501][Engines ][Debug ] Starting
[16:02:30.502][LoggingMessageHandler][Info ] [abeb5d24] <BackendAPIClient start> POST http://backend/versionpack/enable
[16:02:30.520][LoggingMessageHandler][Info ] [abeb5d24] <BackendAPIClient end> POST http://backend/versionpack/enable -> 204 NoContent (took 18ms)
[16:02:30.520][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.StartTransition to state change sink
[16:02:30.520][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.StartTransition sent to state change sink
[16:02:30.521][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.StartTransition from LinuxWSL2
[16:02:30.521][EngineStateNotificationRecorder][Debug ] Registered state {"State":"starting","Mode":"linux","date":1599634950}
[16:02:30.521][SystrayNotifications][Info ] Docker is starting
[16:02:30.522][LoggingMessageHandler][Info ] [fdbe74be] <NotificationsClient start> POST http://localhost/engine/state
[16:02:30.527][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file
[16:02:30.527][LoggingMessageHandler][Info ] [15e2371f] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
[16:02:30.532][LoggingMessageHandler][Info ] [fdbe74be] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 10ms)
[16:02:30.604][LoggingMessageHandler][Info ] [15e2371f] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
[16:02:30.609][WSL2Provisioning ][Info ] Checking docker-desktop
[16:02:30.613][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
[16:02:31.338][WSL2Provisioning ][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:31.343][LinuxWSL2Engine ][Info ] Stopping windows side processes
[16:02:31.418][LinuxWSL2Engine ][Info ] Stopping engine
[16:02:31.529][LinuxWSL2Engine ][Warning] Failed to send stop message to distro, will terminate abrubtly:
[16:02:31.647][LoggingMessageHandler][Info ] [fe4e5f2d] <BackendAPIClient start> POST http://backend/windowsfeatures/check
[16:02:32.062][LoggingMessageHandler][Info ] [fe4e5f2d] <BackendAPIClient end> POST http://backend/windowsfeatures/check -> 200 OK (took 414ms)
[16:02:32.607][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file
[16:02:32.607][LoggingMessageHandler][Info ] [84dcd8a7] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
[16:02:32.667][WSL2Provisioning ][Info ] Checking docker-desktop
[16:02:32.667][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
[16:02:32.686][LoggingMessageHandler][Info ] [84dcd8a7] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
[16:02:33.320][WSL2Provisioning ][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:33.320][LinuxWSL2Engine ][Info ] Stopping windows side processes
[16:02:33.387][LinuxWSL2Engine ][Info ] Stopping engine
[16:02:33.473][LinuxWSL2Engine ][Warning] Failed to send stop message to distro, will terminate abrubtly:
[16:02:33.556][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.FailedToStartState to state change sink
[16:02:33.556][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.FailedToStartState sent to state change sink
[16:02:33.556][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.FailedToStartState from LinuxWSL2
[16:02:33.557][EngineStateNotificationRecorder][Debug ] Registered state {"State":"failed to start","Mode":"linux","date":1599634953}
[16:02:33.557][LoggingMessageHandler][Info ] [26d81e32] <NotificationsClient start> POST http://localhost/engine/state
[16:02:33.558][SystrayNotifications][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:33.568][LoggingMessageHandler][Info ] [26d81e32] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 11ms)
[16:02:33.589][Engines ][Error ] Start failed with Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
Emplacement Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode)Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:Ligne 119
Emplacement Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__6.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:Ligne 48
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Système de localisation.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Emplacement Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__23.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:Ligne 91
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Système de localisation.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Emplacement Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:Ligne 29
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Système de localisation.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Emplacement Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:Ligne 67
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Emplacement Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:Ligne 92
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Système de localisation.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Emplacement Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:Ligne 72
---Trace de fin de pile à partir de laquelle l'exception a été levée immédiatement avant---
Système de localisation.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Système de localisation.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Emplacement Docker.Engines.Engines.<StartAsync>d__24.MoveNext()Emplacement C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:Ligne 109)