简体   繁体   English

Docker 无法在 Windows 11 上启动

[英]Docker failed to start on Windows 11

I intend to run a Linux-based container on Windows. I installed Docker 4.3.2 and 4.4.4 community editions based on WLS2 to do that.我打算在 Windows 上运行一个基于 Linux 的容器。为此我安装了基于 WLS2 的 Docker 4.3.2 和 4.4.4 社区版。 After enabling all prerequisites for windows (WSL2, Hyper-V, Containers) and installing Docker, I tried to launch the docker desktop, at first, the docker icon appears on the taskbar but after a few seconds it disappears without showing any error message.在为 windows(WSL2、Hyper-V、容器)启用所有先决条件并安装 Docker 后,我尝试启动 docker 桌面,起初,docker 图标出现在任务栏上,但几秒钟后它消失了,没有显示任何错误消息。

System specification:系统规格:

  • OS: Windows 11 pro version 21H2 Build 22000.376操作系统:Windows 11 专业版 21H2 Build 22000.376
  • Docker version: 4.3.2 community edition Docker版本:4.3.2社区版
  • WSL: wsl v2 WSL:wsl v2

在此处输入图像描述

Here is the log for last try:这是上次尝试的日志:

[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}}

Failed tries:失败的尝试:

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

Did you try to restart, read the doc on how to get it installed.您是否尝试重新启动,请阅读有关如何安装它的文档。 Make sure that you have hyper-v enabled as well as windows WSL system features.确保您启用了 hyper-v 以及 windows WSL 系统功能。

After too many searches and tries, finally I resolved it by fresh installations of Windows 11. There is a problem with the upgraded windows version especially if you already installed and config WSL2 or other Docker dependencies on the previous version.经过多次搜索和尝试,最后我通过全新安装 Windows 11 解决了这个问题。升级后的 windows 版本存在问题,特别是如果您已经安装并配置了 WSL2 或其他 Docker 对先前版本的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM