Windows 11上Docker启动失败

3
我打算在Windows上运行一个基于Linux的容器。我安装了基于WLS2的Docker 4.3.2和4.4.4社区版来实现这个目标。在启用了Windows的所有先决条件(WSL2、Hyper-V、Containers)并安装了Docker之后,我尝试启动Docker桌面版。起初,Docker图标出现在任务栏上,但几秒钟后它就消失了,没有显示任何错误信息。
系统规格:
- 操作系统:Windows 11专业版版本21H2 Build 22000.376 - Docker版本:4.3.2社区版 - WSL:wsl v2

enter image description here

这是上一次尝试的日志:
[001:21:20:01.354][I] (25d488c5) 2784eefb-BackendAPI S<-C 5cad5efc-GoBackendClient-CSharp GET /settings
[   at Docker.Core.HttpClientExtensions.<GetJsonAsync>d__0`1.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\HttpClientExtensions.cs:line 16
[   at Docker.Core.HttpClientExtensions.GetJsonAsync[T](HttpClient httpClient, String uri, CancellationToken cancellationToken)
[   at Docker.Core.GoBackend.GoBackendClient.GetSettingsAsync() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 248
[   at Docker.Core.SettingsLoader.<WatchSettingsFile>d__9.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\SettingsLoader.cs:line 71
[   at Docker.Core.SettingsLoader.WatchSettingsFile()
[001:21:20:01.356][I] (25d488c5) 2784eefb-BackendAPI S->C 5cad5efc-GoBackendClient-CSharp GET /settings (542.5µs): {"acceptCanaryUpdates":false,"activeOrganizationName":"","analyticsEnabled":true,"autoDownloadUpdates":false,"autoStart":true,"cpus":2,"credentialHelper":"docker-credential-wincred.exe","customWslDistroDir":"","dataFolder":"C:\\ProgramData\\DockerDesktop\\vm-data","disableHardwareAcceleration":false,"disableTips":false,"disableUpdate":false,"diskSizeMiB":65536,"diskTRIM":true,"displayRestartDialog":true,"displaySwitchVersionPack":true,"displaySwitchWinLinContainers":true,"displayed18362Deprecation":false,"displayedElectronPopup":[],"displayedTutorial":false,"dns":"8.8.8.8","enableIntegrationWithDefaultWslDistro":true,"exposeDockerAPIOnTCP2375":false,"filesharingDirectories":[],"integratedWslDistros":[],"kubernetesEnabled":false,"kubernetesInitialInstallPerformed":false,"lastLoginDate":0,"latestBannerKey":"","licenseTermsVersion":2,"lifecycleTimeoutSeconds":600,"memoryMiB":2048,"openUIOnStartupDisabled":false,"overrideProxyExclude":"","overrideProxyHttp":"","overrideProxyHttps":"","proxyHttpMode":"system","settingsVersion":16,"showKubernetesSystemContainers":false,"skipUpdateToWSLPrompt":true,"skipWSLMountPerfWarning":false,"socksProxyPort":0,"swapMiB":1024,"swarmFederationExplicitlyLoggedOut":false,"synchronizedDirectories":[],"tipLastId":"float64","tipLastViewedTime":0,"updateAvailableTime":0,"updatePopupAppearanceTime":0,"updateSkippedBuild":"","useCredentialHelper":true,"useDnsForwarder":true,"useNightlyBuildUpdates":false,"useVirtualizationFramework":false,"useVpnkit":true,"useWindowsContainers":false,"versionPack":"default","vpnKitMaxPortIdleTime":"float64","vpnKitTransparentProxy":false,"vpnkitCIDR":"1...4","wslEnableGrpcfuse":false,"wslEngineEnabled":true}
[001:21:20:01.357][I] (18c069ce) 2784eefb-BackendAPI S<-C 5cad5efc-GoBackendClient-CSharp GET /ping
[   at Docker.Core.GoBackend.GoBackendClient.WaitForServer(Object state) in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 88
[001:21:20:01.357][I] (18c069ce) 2784eefb-BackendAPI S->C 5cad5efc-GoBackendClient-CSharp GET /ping (0s): {"serverTime":1641043201357640200}
[001:21:20:01.482][I] (3a878ee0) 2784eefb-BackendAPI S<-C 5cad5efc-GoBackendClient-CSharp GET /settings
[   at Docker.Core.HttpClientExtensions.<GetJsonAsync>d__0`1.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\HttpClientExtensions.cs:line 16
[   at Docker.Core.HttpClientExtensions.GetJsonAsync[T](HttpClient httpClient, String uri, CancellationToken cancellationToken)
[   at Docker.Core.GoBackend.GoBackendClient.GetSettingsAsync() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 248
[   at Docker.Core.SettingsLoader.<<OnChanged>b__10_0>d.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\SettingsLoader.cs:line 102
[   at Docker.Core.SettingsLoader.<OnChanged>b__10_0()
[001:21:20:01.483][I] (3a878ee0) 2784eefb-BackendAPI S->C 5cad5efc-GoBackendClient-CSharp GET /settings (1.1523ms): {"acceptCanaryUpdates":false,"activeOrganizationName":"","analyticsEnabled":true,"autoDownloadUpdates":false,"autoStart":true,"cpus":2,"credentialHelper":"docker-credential-wincred.exe","customWslDistroDir":"","dataFolder":"C:\\ProgramData\\DockerDesktop\\vm-data","disableHardwareAcceleration":false,"disableTips":false,"disableUpdate":false,"diskSizeMiB":65536,"diskTRIM":true,"displayRestartDialog":true,"displaySwitchVersionPack":true,"displaySwitchWinLinContainers":true,"displayed18362Deprecation":false,"displayedElectronPopup":[],"displayedTutorial":false,"dns":"8.8.8.8","enableIntegrationWithDefaultWslDistro":true,"exposeDockerAPIOnTCP2375":false,"filesharingDirectories":[],"integratedWslDistros":[],"kubernetesEnabled":false,"kubernetesInitialInstallPerformed":false,"lastLoginDate":0,"latestBannerKey":"","licenseTermsVersion":2,"lifecycleTimeoutSeconds":600,"memoryMiB":2048,"openUIOnStartupDisabled":false,"overrideProxyExclude":"","overrideProxyHttp":"","overrideProxyHttps":"","proxyHttpMode":"system","settingsVersion":16,"showKubernetesSystemContainers":false,"skipUpdateToWSLPrompt":true,"skipWSLMountPerfWarning":false,"socksProxyPort":0,"swapMiB":1024,"swarmFederationExplicitlyLoggedOut":false,"synchronizedDirectories":[],"tipLastId":"float64","tipLastViewedTime":0,"updateAvailableTime":0,"updatePopupAppearanceTime":0,"updateSkippedBuild":"","useCredentialHelper":true,"useDnsForwarder":true,"useNightlyBuildUpdates":false,"useVirtualizationFramework":false,"useVpnkit":true,"useWindowsContainers":false,"versionPack":"default","vpnKitMaxPortIdleTime":"float64","vpnKitTransparentProxy":false,"vpnkitCIDR":"1...4","wslEnableGrpcfuse":false,"wslEngineEnabled":true}
[001:21:20:01.506][I] (b724d811) 2784eefb-BackendAPI S<-C 5cad5efc-GoBackendClient-CSharp GET /settings
[   at Docker.Core.HttpClientExtensions.<GetJsonAsync>d__0`1.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\HttpClientExtensions.cs:line 16
[   at Docker.Core.HttpClientExtensions.GetJsonAsync[T](HttpClient httpClient, String uri, CancellationToken cancellationToken)
[   at Docker.Core.GoBackend.GoBackendClient.GetSettingsAsync() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 248
[   at Docker.Core.SettingsLoader.<<OnChanged>b__10_0>d.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\SettingsLoader.cs:line 102
[   at Docker.Core.SettingsLoader.<OnChanged>b__10_0()
[001:21:20:01.506][I] (b724d811) 2784eefb-BackendAPI S->C 5cad5efc-GoBackendClient-CSharp GET /settings (557.5µs): {"acceptCanaryUpdates":false,"activeOrganizationName":"","analyticsEnabled":true,"autoDownloadUpdates":false,"autoStart":true,"cpus":2,"credentialHelper":"docker-credential-wincred.exe","customWslDistroDir":"","dataFolder":"C:\\ProgramData\\DockerDesktop\\vm-data","disableHardwareAcceleration":false,"disableTips":false,"disableUpdate":false,"diskSizeMiB":65536,"diskTRIM":true,"displayRestartDialog":true,"displaySwitchVersionPack":true,"displaySwitchWinLinContainers":true,"displayed18362Deprecation":false,"displayedElectronPopup":[],"displayedTutorial":false,"dns":"8.8.8.8","enableIntegrationWithDefaultWslDistro":true,"exposeDockerAPIOnTCP2375":false,"filesharingDirectories":[],"integratedWslDistros":[],"kubernetesEnabled":false,"kubernetesInitialInstallPerformed":false,"lastLoginDate":0,"latestBannerKey":"","licenseTermsVersion":2,"lifecycleTimeoutSeconds":600,"memoryMiB":2048,"openUIOnStartupDisabled":false,"overrideProxyExclude":"","overrideProxyHttp":"","overrideProxyHttps":"","proxyHttpMode":"system","settingsVersion":16,"showKubernetesSystemContainers":false,"skipUpdateToWSLPrompt":true,"skipWSLMountPerfWarning":false,"socksProxyPort":0,"swapMiB":1024,"swarmFederationExplicitlyLoggedOut":false,"synchronizedDirectories":[],"tipLastId":"float64","tipLastViewedTime":0,"updateAvailableTime":0,"updatePopupAppearanceTime":0,"updateSkippedBuild":"","useCredentialHelper":true,"useDnsForwarder":true,"useNightlyBuildUpdates":false,"useVirtualizationFramework":false,"useVpnkit":true,"useWindowsContainers":false,"versionPack":"default","vpnKitMaxPortIdleTime":"float64","vpnKitTransparentProxy":false,"vpnkitCIDR":"1...4","wslEnableGrpcfuse":false,"wslEngineEnabled":true}
[001:21:20:01.544][I] (dafb5e19) 2784eefb-BackendAPI S<-C 5cad5efc-GoBackendClient-CSharp GET /features
[   at Docker.Core.GoBackend.GoBackendClient.<GetFeaturesAsync>d__15.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 196
[   at Docker.Core.GoBackend.GoBackendClient.GetFeaturesAsync()
[   at Docker.Core.Features.Features.get_FeatureList() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\Features\Features.cs:line 21
[   at Docker.Core.Features.Features.GetEnabled() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Core\Features\Features.cs:line 74
[   at Docker.ApiServices.Analytics.SegmentApi.<Track>d__21.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\Analytics\Analytics.cs:line 115
[   at Docker.ApiServices.Analytics.SegmentApi.Track(String eventType, IDictionary`2 additionalProperties, Settings settings)
[   at Docker.ApiServices.Analytics.SegmentApi.<TrackAsync>d__19.MoveNext() in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\Analytics\Analytics.cs:line 70
[   at Docker.ApiServices.Analytics.SegmentApi.TrackAsync(AnalyticEvents analyticEvent, IDictionary`2 additionalProperties)
[   at Docker.Program.Run(IReadOnlyCollection`1 args) in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Program.cs:line 235
[   at Docker.Program.Main(String[] args) in C:\workspaces\4.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Program.cs:line 131
[001:21:20:01.550][I] (dafb5e19) 2784eefb-BackendAPI S->C 5cad5efc-GoBackendClient-CSharp GET /features (1.1525ms): {"Auth0":{"description":"Login and authentication is handled by auth0","enabled":false,"label":"Perform login via auth0","name":"Login via auth0","type":1},"NightlyBuilds":{"description":"Switch the application update to the night builds","enabled":false,"label":"Enable nightly builds","name":"Nightly builds","type":1},"ProUser":{"description":"You can upgrade your current tier [here](URL)","enabled":false,"label":"personal","name":"ProUser","type":3},"Procd":{"description":"Enable advanced process management functionality like suspend and resume of containers and the VM","enabled":true,"label":"Enable process management daemon","name":"Process management daemon","type":1},"SignInBanner":{"description":"Show persistent non-dismissible banner to encourage sign in","enabled":false,"label":"Display sign in banner if not logged in","name":"Sign in banner","type":1},"SimultaneousLinuxAndWindowsContainers":{"description":"Allow both Linux and Windows containers simultaneously using docker cli contexts","enabled":false,"label":"Simultaneous Linux and Windows containers","name":"Simultaneous Linux and Windows containers","type":3},"WhaleMenuRedesign":{"description":"Display Whale menu done with Electron","enabled":false,"label":"Enable Whale Menu Redesign","name":"Whale Menu Redesign","type":1},"grpcfuseV2":{"description":"Switch off to use the legacy osxfs file sharing instead.","enabled":true,"label":"Use grpcfuse for filesharing by default","name":"Grpcfuse","type":1},"mutagenV0":{"description":"Use Mutagen to synchronize files in a container with your local disk.","enabled":false,"label":"Two-way file synchronisation","name":"Mutagen","type":1}}

"失败的尝试:"
1- check with different version of Docker desktop 2,3,4.3.2,4.4.4
2- Reconfig the JSON file
3- disable and enabling Docker related services on windows (Hyper-v, Containers, WSL2)
4- updating WSL2 
5- installing different Linux distributions on WSL2
6- running the Docker services manually
7- running DockerCli on privileged permission using PowerShell
8- running Docker debugger tools to identify the problem
9- search on Docker repository for a similar issue
2个回答

0
经过多次搜索和尝试,最终我通过重新安装 Windows 11 解决了问题。 升级的 Windows 版本存在问题,特别是如果您已经在之前的版本上安装并配置了 WSL2 或其他 Docker 依赖项。

-1

您尝试过重新启动吗?请阅读安装说明文档。确保您已启用Hyper-V和Windows WSL系统功能。


是的,我尝试了所有的方法。 - csmaster

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接