[英]Cannot start docker on windows 10 pro?
Problem:问题:
When I try to start docker desktop it leaves me this error.当我尝试启动 docker desktop 时,它给我留下了这个错误。
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V was unable to find a virtual switch with name "DockerNAT".
This is the output when I issue docker version command on the terminal.这是我在终端上发出 docker version 命令时的输出。
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
This working without giving any error when in windows containers.这在 Windows 容器中工作时不会出现任何错误。 But when I change it to Linux containers this happens.但是当我将其更改为 Linux 容器时,就会发生这种情况。 I tried a lot to find a solution to this problem.我尝试了很多来找到解决这个问题的方法。 But I was unable to find a solution.但我无法找到解决方案。 Can someone help me to solve this problem?有人可以帮我解决这个问题吗? Thank you.谢谢你。
Here is what works for me - open Hyper-V manager and from 'Actions' panel on the right click 'Stop Service' and confirm prompt.这是对我有用的方法 - 打开 Hyper-V 管理器,然后从右侧的“操作”面板中单击“停止服务”并确认提示。 Then, Install Docker desktop which will restart your hyper-v and create DockerNat.然后,安装 Docker 桌面,这将重新启动您的 hyper-v 并创建 DockerNat。 To check click 'Virtual Switch Manager' from 'Actions' panel and you should see it on the Left.要检查单击“操作”面板中的“虚拟开关管理器”,您应该会在左侧看到它。
Here is what worked for me:这是对我有用的:
After doing these steps the error went away and docker was working again完成这些步骤后,错误消失了,docker 又开始工作了
Hope this solves your issue.希望这能解决您的问题。 Enjoy!享受!
I just ran into this issue today my fix was.我今天刚遇到这个问题,我的解决方法是。
Running the MOFCOMP command and a reboot fixed this problem for me.运行 MOFCOMP 命令并重新启动为我解决了这个问题。
Running this command: (Command Prompt as administrator)运行此命令:(以管理员身份运行命令提示符)
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
Then restart然后重启
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.