简体   繁体   English

Docker 不在 Windows 10 上启动

[英]Docker does not start on Windows 10

Docker has been having intermittent problems on Windows 10 Enterprise. Docker 在 Windows 10 Enterprise 上一直出现间歇性问题。 When the machine is rebooted, Docker starts sometimes but not always.当机器重新启动时,Docker 有时会启动,但并非总是如此。 If it does not start, I kill the Docker process and relaunch it manually by going to the menu item "Docker for Windows".如果它没有启动,我会终止 Docker 进程并通过转到菜单项“Docker for Windows”手动重新启动它。 But this never launches Docker. On examining the log files it appears that the process gets 'stuck'.但这永远不会启动 Docker。在检查日志文件时,该进程似乎“卡住了”。 Here is the tail of the log file:这是日志文件的尾部:

[21:40:07.907][PowerShell     ][Info   ] Run script with parameters: -Create True -VhdPathOverride  -VhdSize 64424509440 -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\docker-for-win.iso...
[21:40:07.907][HyperV         ][Info   ] Script started at 21:40:07.907
[21:40:07.907][HyperVGuids    ][Info   ] GUIDs installed
[21:40:07.929][HyperV         ][Info   ] Module loaded at 21:40:07.929
[21:40:07.929][Firewall       ][Info   ] All existing rules are removed.
[21:40:07.929][Firewall       ][Info   ] Opening ports for C:\Program Files\Docker\Docker\Resources\com.docker.proxy.exe...
[21:40:07.960][Firewall       ][Info   ] Opening ports for SMB...
[21:40:07.960][HyperV         ][Info   ] Creating Switch: DockerNAT...
[21:40:07.992][Firewall       ][Info   ] Ports are opened
[21:40:14.115][HyperV         ][Info   ] Switch created.
[21:40:23.431][HyperV         ][Info   ] Set IP address on switch
[21:40:24.387][HyperV         ][Info   ] Creating VM MobyLinuxVM...
[21:40:26.443][HyperV         ][Info   ] Setting CPUs to 2 and Memory to 2048 MB
[21:40:27.072][HyperV         ][Info   ] Attach VHD C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx

Any clues as to what is going on?关于发生了什么的任何线索? Or how to resolve this issue?或者如何解决这个问题?

I'm answering this question because I didn't find a detailed answer.我回答这个问题是因为我没有找到详细的答案。 Like @alalinaci and @Omar said resetting Docker to the factory defaults works.就像@alalinaci 和@Omar 所说,将 Docker 重置为出厂默认值是可行的。 This could be done by opening Docker desktop, go to troubleshoot menu (the bug icon above) and choose "Reset to factory defaults" .这可以通过打开 Docker 桌面,转到疑难解答菜单(上面的错误图标)并选择“重置为出厂默认设置”来完成 A restart will be done automaticly.将自动重新启动。

A login must be done when done.完成后必须进行登录。

Docker has been having intermittent problems on Windows 10 Enterprise. Docker在Windows 10企业版上一直存在间歇性问题。 When the machine is rebooted, Docker starts sometimes but not always.重新启动计算机后,Docker有时会启动,但并非总是启动。 If it does not start, I kill the Docker process and relaunch it manually by going to the menu item "Docker for Windows".如果它没有启动,我将终止Docker进程并通过转到菜单项“ Docker for Windows”手动重新启动它。 But this never launches Docker.但这永远不会启动Docker。 On examining the log files it appears that the process gets 'stuck'.在检查日志文件时,该过程似乎“卡住了”。 Here is the tail of the log file:这是日志文件的末尾:

    [21:40:07.907][PowerShell     ][Info   ] Run script with parameters: -Create True -VhdPathOverride  -VhdSize 64424509440 -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\docker-for-win.iso...
[21:40:07.907][HyperV         ][Info   ] Script started at 21:40:07.907
[21:40:07.907][HyperVGuids    ][Info   ] GUIDs installed
[21:40:07.929][HyperV         ][Info   ] Module loaded at 21:40:07.929
[21:40:07.929][Firewall       ][Info   ] All existing rules are removed.
[21:40:07.929][Firewall       ][Info   ] Opening ports for C:\Program Files\Docker\Docker\Resources\com.docker.proxy.exe...
[21:40:07.960][Firewall       ][Info   ] Opening ports for SMB...
[21:40:07.960][HyperV         ][Info   ] Creating Switch: DockerNAT...
[21:40:07.992][Firewall       ][Info   ] Ports are opened
[21:40:14.115][HyperV         ][Info   ] Switch created.
[21:40:23.431][HyperV         ][Info   ] Set IP address on switch
[21:40:24.387][HyperV         ][Info   ] Creating VM MobyLinuxVM...
[21:40:26.443][HyperV         ][Info   ] Setting CPUs to 2 and Memory to 2048 MB
[21:40:27.072][HyperV         ][Info   ] Attach VHD C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx

Any clues as to what is going on?关于发生了什么的任何线索? Or how to resolve this issue?还是如何解决这个问题?

设置为工厂,然后重新启动 docker,对我来说很有效。

转到 Docker 桌面应用程序中的故障排除并强制重启。

In my scenario after the Windows 10 update (September 14, 2021—KB5005565 (OS Builds 19041.1237, 19042.1237, and 19043.1237)在 Windows 10 更新后的场景中(2021 年 9 月 14 日—KB5005565(操作系统内部版本 19041.1237、19042.1237 和 19043.1237)

Docker will not start. Docker 不会启动。 Even on right-click ==> Run as Admin, it will do nothing.即使右键单击 ==> 以管理员身份运行,它也不会执行任何操作。 Also, tried switching daemon.另外,尝试切换守护进程。

The thing that worked for me is to right-click on the Docker Desktop icon and opt for 'Troubleshoot Compatibility' and choose 'Troubleshoot Program' and follow the instructions.对我有用的是右键单击 Docker 桌面图标并选择“疑难解答兼容性”并选择“疑难解答程序”并按照说明进行操作。

Troubleshoot Compatibility:解决兼容性:

解决兼容性

Troubleshoot Program:故障排除程序:

故障排除程序

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

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