“Docker 桌面正在启动...”永远在 Windows 上

发布于 2025-01-09 07:38:19 字数 453 浏览 1 评论 0原文

我已经安装了 Docker Desktop 版本 4.4.4,但它没有运行。它只显示“Docker Desktop Starting ...”,但从未开始运行。

我尝试了很多方法但没有解决:

  1. Allowing the following files in windows fire C:\program files\docker\docker\resources\vpnkit.exe, C:\program files\docker\docker\com.docker.service C:\program files\docker\docker\resources\com.docker.proxy.exe
  2. 从 AppData/Roaming 和 AppData/Local 中删除“Docker”和“Docker Desktop”文件夹 卸载
  3. 并重新安装不同版本的 Docker,包括4.5.1

I have installed Docker Desktop version 4.4.4 and it is not running. It only displays "Docker Desktop Starting ..." but never starts running.

I have tried so many ways but didn't solve:

  1. Allowing the following files in windows firewall C:\program files\docker\docker\resources\vpnkit.exe, C:\program files\docker\docker\com.docker.service C:\program files\docker\docker\resources\com.docker.proxy.exe
  2. Removing 'Docker' and 'Docker Desktop' folders from AppData/Roaming and AppData/Local
  3. Uninstalling and reinstalling Docker with different versions including 4.5.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(20

暗喜 2025-01-16 07:38:19

主要问题是 WSL2 在安装 WSL2 时不会自动安装内核,但 Docker Desktop 期望它已经安装。所以,完全关闭&正如其他答案所说,停止 Docker,然后以管理员身份运行此 cmd:

wsl --update

现在打开 Docker Desktop &它应该启动正常。


编辑:这个答案现在应该是不必要的,因为 Docker Desktop v4.22 在第一次运行时会显示这一点,如果它必须安装 WSL2 作为其安装的一部分。

Docker 桌面 - WSL 内核版本太低

但是,

我注意到在我选择“退出”后,下次它仍然再次挂起。运行更新&重新启动 Docker。然后我不得不再次退出 Docker,再次打开应用程序,&等待大约 1 或 2 分钟,让它完成初始启动即可。在较新的 PC 上可能会更快,因为我现在使用的是 Win10 22H2,只有 4GB 内存。几周后我将在较新的 PC 上再次测试 Win11 22H2。

The main problem is WSL2 does not auto install the kernel when WSL2 installs, yet Docker Desktop expects it already installed. So, fully close & stop Docker as other answers have said, then run this cmd as admin:

wsl --update

Now open Docker Desktop & it should start up ok.


edit: This answer should be unnecessary now, as Docker Desktop v4.22 shows this on first run, if it had to install WSL2 as part of its installation.

Docker Desktop - WSL kernel version too low

However,

I noticed it still hung again the next time, after I chose Quit & ran the update & Restart Docker. I had to then Quit Docker yet again, open yet again the app, & wait about 1 or 2 minutes for it to finish its initial startup ok. It may be faster on newer PCs, as mine for now is Win10 22H2 with only 4gb ram. I will test again on Win11 22H2 on newer PC, in few weeks.

亢潮 2025-01-16 07:38:19

我发现导致解决方案的另一个症状也与 WSL 有关。

一方面,Docker 服务不会开始抛出此错误:

连接期间出错:此错误可能表明 docker 守护进程
没有运行。:获取
“http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version”:打开
//./pipe/docker_engine: 系统找不到指定的文件。

另一方面,WSL 没有响应。尝试直接在 CMD 上运行 WSL Distro 或 WSL 命令根本不会返回任何输出。它只会挂在那里。

所以该解决方案对于 WSL 和 Docker 是通用的。
我在有关 WSL 问题的问题中发现,LxssManager Windows 服务已过时(它可能在services.msc下显示为停止并且所有按钮都呈灰色,或者我什至看到它正在运行显然,但是由于上面的 Docker 和 WSL 问题,所以它仍然有问题。)

首先,我们必须获取 LxssManager PID 才能杀死它。使用提升的 shell,我们可以这样得到它:

sc queryex LxssManager

有了 PID,我们可以终止进程,但要注意我无法使用 killtaskkill 命令终止它。我收到以下错误:

ERROR: The process with PID XXXXX could not be terminated.
Reason: Access is denied.

要有效终止进程,请执行以下操作:

wmic process where ProcessID=XXXXX delete

当然,将 XXXXX 替换为 PID。
完成此操作后,启动 LxssManager 服务:

net start LxssManager

警告:
我注意到,在某些情况下,由于(对我而言)未知的技术原因,即使 LxssManager 服务显示为“正在运行”,这也是不够的。
只需重复以上步骤即可!有时执行一次就有效,有时由于某种原因执行两次。

TL;DR

  1. 使用 wmic+PID 终止 LxssManager Windows 服务。
  2. 启动LxssManager服务。
  3. 如果问题仍然存在,请重复两次或更多次。
  4. Docker 和 WSL 问题已解决。

I've found out another symptom leading to the solution is also related to WSL.

On one side, Docker service won't start throwing this error:

error during connect: This error may indicate that the docker daemon
is not running.: Get
"http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open
//./pipe/docker_engine: The system cannot find the file specified.

And on the other, WSL is unresponsive. Attempting to run a WSL Distro or WSL command directly on CMD, won't return any output at all. It will just hang in there.

So the solution is common to WSL and Docker.
I've found in a question regarding the WSL issue, that the LxssManager Windows service is staled (it may show under services.msc as Stopping and all the buttons are greyed out, or I've even seen it Running apparently, but with the Docker and WSL issues above, so something is wrong with it still.)

First, we have to get LxssManager PID in order to kill it. Using an elevated shell, we can get it this way:

sc queryex LxssManager

Having the PID, we can kill the process but beware I wasn't able to kill it using kill or taskkill commands. I was getting the following error:

ERROR: The process with PID XXXXX could not be terminated.
Reason: Access is denied.

To effectively kill the process, do as following:

wmic process where ProcessID=XXXXX delete

Replace XXXXX with PID, of course.
Having done so, start the LxssManager service:

net start LxssManager

A word of warning:
I've noted in some cases this is not enough for unknown (to me) technical reasons even if LxssManager service is shown as Running.
Just repeat the above steps! Sometimes it works doing this once, sometimes doing it twice for some reason.

TL;DR

  1. Kill LxssManager Windows service using wmic+PID.
  2. Start LxssManager service.
  3. Repeat twice or more if issues persist.
  4. Docker and WSL issues are solved.
或十年 2025-01-16 07:38:19

要解决此问题,请按照以下步骤操作。

只需删除以下临时文件即可。

  1. C:\Windows\Temp
  2. C:\Users\{yourAccountName}\AppData\Local\Temp
  3. C:\Windows\Prefetch

然后

  • 卸载 Docker桌面
  • 重新启动计算机
  • 在安装 Docker 之前,请确保您有 Ubuntu WSL(从 Microsoft 商店下载)
  • 适用于 Windows 的 x64 计算机的 WSL2 Linux 内核更新包
    输入图片这里的描述
  • [可选]如果需要Terminal(多终端)从Microsoft Store下载
  • 再次安装Docker Desktop

To resolve this issue follow the below steps.

Just delete the temporary files from the following.

  1. C:\Windows\Temp
  2. C:\Users\{yourAccountName}\AppData\Local\Temp
  3. C:\Windows\Prefetch

then

  • Uninstall Docker Desktop
  • Restart computer
  • Before installing Docker, make sure you have Ubuntu WSL (download from Microsoft store)
  • WSL2 Linux kernel update package for x64 machines for Windows
    enter image description here
  • [optional] If you need Terminal (multi-terminal) download from Microsoft Store
  • Install Docker Desktop again
止于盛夏 2025-01-16 07:38:19

我面临着 Docker 版本 4.* 的相同代码。对我来说,这是 Visual Studio 代码,

  1. 停止了 WSL 表单任务管理器

  2. 已停止显示“Docker 桌面正在启动”表单任务管理器的 Docker

  3. 从任务管理器中停止了 Visual Studio 代码

  4. 再次启动 Docker

这些步骤使我的 Docker 在 30 秒内进入运行状态

希望这对某人有帮助!

I was facing same code for for Docker version 4.*. For me it was Visual Studio code,

  1. Stopped WSL form Task manager

  2. stopped Docker which was showing "Docker desktop is starting" form Task manage

  3. stopped Visual Studio code form Task manager

  4. Started Docker again

These steps placed my Docker in Running state in 30 seconds

Hope this helps someone!

半衾梦 2025-01-16 07:38:19

对我来说,这是 WSL 的问题。当我尝试时:

wsl --install -d Ubuntu

在命令窗口中,几分钟后我收到错误 0x80370114

修复方法是:

  1. 漏洞利用保护 >系统设置> Control Flow Guard
  2. 打开
  3. 重启计算机

然后重新安装/重启 Docker Desktop,就可以了!

希望这对其他人有帮助

For me, it was a problem with WSL. When I tried:

wsl --install -d Ubuntu

in a command window, after a few minutes I got error 0x80370114

The fix was to do:

  1. Exploit Protection > System Settings > Control Flow Guard
  2. turn on
  3. restart computer

Then reinstall/restart Docker Desktop, and it works!

Hope this helps someone else

许你一世情深 2025-01-16 07:38:19

通过 @Alvi 回答解决了这个问题
Docker 永远在 Windows 任务中的“Docker 正在启动..”< /a>

我猜你正在使用 wsl2 功能。在这种情况下,请打开 PowerShell 或命令提示符并键入:Optionalfeatures.exe

向下滚动并取消选中

适用于 Linux 的 Windows 子系统

应用更改并重新启动计算机。

重新启动后,再次按照前面的步骤进行操作,并检查

适用于 Linux 的 Windows 子系统

并再次重新启动。希望现在你的 docker 可以运行了

Solved this issue with @Alvi answer
Docker forever in "Docker is starting.." at Windows task

I guess you are using wsl2 features. In that case, open PowerShell or command prompt and type: optionalfeatures.exe

scroll down and uncheck

Windows Subsystem for Linux

apply the changes and restart your computer.

After restart follow the previous steps again and check

Windows Subsystem for Linux

and restart again. Hopefully now your docker will run

蘑菇王子 2025-01-16 07:38:19

正如此处所写,您需要执行以下操作:

wsl --update

但之后,直到我重新启动电脑后,它才解决我的问题。

As wrote here, you need to do:

wsl --update

But after that it doesn't fix my issue until I did restart to my pc.

自由如风 2025-01-16 07:38:19

我的全新安装也遇到了相同的症状。另外 wsl --list 显示“未安装发行版”。我尝试了多次重新安装和重新启动 Docker 和 WSL,但最终找到了步骤:

  1. 在任务管理器中,杀死与 Docker 和 WSL 相关的所有进程。 Docker Desktop
  2. 以管理员身份运行 Docker Desktop

让它在 Windows 11 Enterprise 上运行。

My fresh install was experiencing the same symptoms. Also wsl --list showed "no installed distributions". I tried many reinstallations and restarts of Docker and WSL, but eventually found the steps:

  1. In Task Manager, kill all processes related to Docker & Docker Desktop
  2. Run Docker Desktop as administrator

Got it working on on Windows 11 Enterprise.

公布 2025-01-16 07:38:19

对我来说,它在 Windows(docker 桌面)中工作:

  • 要卸载 docker
  • 以管理员身份重新安装,
  • 请不要选择带有 wsl 的部分

for me it worked in windows (docker desktop):

  • to uninstall the docker
  • reinstall as administrator
  • don't select the part with wsl
好多鱼好多余 2025-01-16 07:38:19

输入图片此处描述

  1. 进入服务并停止 Docker 桌面服务并重新启动

  2. 重新打开 Docker 桌面即可工作

enter image description here

  1. got to services and stop Docker desktop service and start again

  2. reopen Docker desktop it will work

何时共饮酒 2025-01-16 07:38:19
  1. 首先退出 Docker
  2. 在 PowerShell 中执行以下代码:
wsl --unregister docker-desktop 
wsl --unregister docker-desktop-data
  1. 重新启动 Docker Desktop 并等待

这对我有用。

发现于 https://debugah .com/solved-docker-forever-in-docker-is-starting-at-windows-task-714/

  1. Exit Docker first
  2. Execute code below in PowerShell:
wsl --unregister docker-desktop 
wsl --unregister docker-desktop-data
  1. Relaunch Docker Desktop and wait

This worked for me.

Found on https://debugah.com/solved-docker-forever-in-docker-is-starting-at-windows-task-714/

白昼 2025-01-16 07:38:19

对我有用的是登录 Docker(右上角),但是当我第一次单击登录时,它说“exec:”rundll32“:在%PATH%中找不到可执行文件” - 我搜索并发现我需要检查 PATH 中的环境变量,我在那里有“C:\WINDOWS\system32” - (在我的例子中,我确实以某种方式破坏了它 - 不知道为什么,但我错过了 Windows 和 system32 之间的反斜杠)。所以我修复了正确的路径,重新启动了电脑。然后我就可以登录了。然后“Docker Desktop 正在启动...”就消失了。

What worked for me was to log in into the Docker (upper right corner), but when I first clicked on login, it said "exec: "rundll32": executable file not found in %PATH%" - I search and found that I need to check environmental variable in PATH that I have "C:\WINDOWS\system32" there - (and in my case I really had it broken somehow - don't know why, but I missed backslash between Windows and system32). So I fixed to correct path, restarted PC. Then I was able to login. And immediately "Docker Desktop Starting..." was gone.

情绪操控生活 2025-01-16 07:38:19

我将 Docker 与 PyCharm 结合使用。当我大约同时启动 PyCharm 和 Docker Desktop 时,我遇到了这个问题。

在我的机器上,Docker Desktop 在启动时会自动启动。我可以通过等待 Docker Desktop 完成启动来避免该问题。然后启动PyCharm。

I use Docker with PyCharm. I ran into this problem when I launched PyCharm and Docker Desktop at about the same time.

On my machine Docker Desktop starts automatically when I boot. I can avoid the problem by waiting for Docker Desktop to finish starting. And then start PyCharm.

原谅我要高飞 2025-01-16 07:38:19

就在几分钟前,我也遇到了同样的问题。

平台:
Windows 10 Pro - 22H2 - Build 19045.2486

新安装的 Windows 更新:KB5022282KB5020876KB5012170

我所做的是:激活Windows Hypervisor Platform

它确实解决了问题,至少现在是这样

I was also having the same problem, just a few minutes ago.

Platform:
Windows 10 Pro - 22H2 - Build 19045.2486

Windows Updates newly installed: KB5022282, KB5020876, KB5012170

What i did was: Activating the Windows Hypervisor Platform

And it did solve the problem, atleast for now

请远离我 2025-01-16 07:38:19

就我而言,它帮助我在 BIOS 设置中启用 CPU SVM(支持向量机)功能。

另外,如果禁用此功能,您也将无法使用 Virtual Box。

BIOS 中的 SVM

In my case it helped me to enable the CPU SVM (Support Vector Machine) function in my BIOS settings.

Also, if you have this feature disabled, you will not be able to use Virtual Box either.

SVM in BIOS

暮倦 2025-01-16 07:38:19
wsl -v

如果显示版本,则 linx 已安装
在笔记本电脑中搜索 Windows 编程器功能
启用虚拟化

wsl --set-default-version 2

,重新启动笔记本电脑,然后启动 docker 并等待 2 分钟,docker 将开始工作

wsl -v

if it show version then linx is install
search windows programer feature in your laptop
enable virtulization

wsl --set-default-version 2

restart laptop and then start docker and wait for 2 minutes your docker will start working

迷鸟归林 2025-01-16 07:38:19

我运行的是 Windows 11、Visual Studio 2023,并且遇到了这个问题。

首先,打开命令提示符并键入

wsl.exe --list --online

然后输入以下内容

wsl.exe --install Ubuntu-20.04

然后在提示符中键入 sudo apt update 以更新发行版。最后,启动 Docker 桌面并登录(您可以在他们的网站上注册)。这修复了我电脑上的 Docker。

I am running windows 11, visual studio 2023 and had this issue.

First, open a command prompt and type

wsl.exe --list --online

Then enter following

wsl.exe --install Ubuntu-20.04

Then type in the prompt sudo apt update to update the distribution. Lastly, start up Docker desktop and log in (you can register at their site). That fixed Docker on my pc.

怪异←思 2025-01-16 07:38:19

这对我有用。

wsl --install -d Ubuntu

输入图片此处描述

拉取的图像不会造成任何损失。都保留下来了
输入图片此处描述

This worked for me.

wsl --install -d Ubuntu

enter image description here

And no loss with pulled images. It's all retained.
enter image description here

无声情话 2025-01-16 07:38:19

在 Win 10 上并重新安装 Docker 会有所帮助。

On Win 10 and reinstalling Docker is what helped.

梦境 2025-01-16 07:38:19

在 Windows 10 Pro (10.0.19045.3208) 上

执行以下操作后:

1.wsl --从命令提示符

安装 2.Docker Desktop v4.22.0 安装

启动 Docker Desktop 遇到消息“启动 Docker 引擎”

关闭计算机并启动再次修复它。

On Windows 10 Pro (10.0.19045.3208)

After doing the following:

1.wsl --install from command prompt

2.Docker Desktop v4.22.0 installation

Starting Docker Desktop got stuck with message "Starting the Docker Engine"

Shutting down the machine and starting again fixed it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文