Login
首页 > 节点相关

Windows安装 Docker Desktop报错解决大全

小花 2023-08-14 16:56:05 人看过

前言

Docker Desktop是一款适用于Windows和Mac电脑的桌面应用程序,它为用户提供了一个方便的方式来使用Docker容器技术。通过Docker Desktop,您可以轻松地创建、管理和运行Docker容器,以及构建和发布自己的Docker镜像。

Docker Desktop包括以下组件:

Docker引擎:Docker容器技术的核心组件,负责管理和运行容器。

Docker CLI:命令行界面,用于与Docker引擎进行交互。

Docker Compose:用于定义和运行多个容器的工具。

Kubernetes:容器编排工具,用于管理大规模容器集群。


Docker Desktop为用户提供了一个简单的UI,以便于启动、停止和管理Docker容器和镜像。此外,它还支持直接在编辑器中进行代码调试,以加速开发流程。


总之,Docker Desktop是一个非常有用的工具,特别适合那些需要频繁使用Docker容器的开发者和系统管理员。


本文将介绍Windows安装 Docker Desktop出现的报错及解决方案。

报错:An error occurred

b92b24ba000144899638daba0267acfe.png

在启动中遇到弹出信息框,一些乱码和引发异常的上一位置中堆栈跟踪的末尾

解决方法:

以管理员运行CMD,输入以下命令后重启电脑


netsh winsock reset



报错: Update the WSL kernel by running “wsl --update” or follow instructions at https://docs.microsoft.com/windows/wsl/wsl2-kernel.

b92b24ba000144899638daba0267acfe.png


解决:

管理员运行CMD,执行 wsl --update

C:\Program Files\Docker\Docker>wsl --update
正在检查更新...
正在下载更新...
正在安装更新...
此更改将在 WSL 下次完全重启时生效。若要强制重启,请运行“wsl --shutdown”。
内核版本: 5.10.102.1

再启动服务正常

报错:error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get “http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/json”: open //./pipe/docker_engine: The system cannot find the file specified.

C:\Windows\system32>docker images

error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/json": open //./pipe/docker_engine: The system cannot find the file specified.


解决:

管理员运行CMD,执行DockerCli.exe -SwitchDaemon若还不行,执行 wsl --update

报错:Error response from daemon: open \.\pipe\docker_engine_linux: The system cannot find the file specified.

C:\Program Files\Docker\Docker>docker images

Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified.


解决:

管理员运行CMD,执行如下命令

Net stop com.docker.service
Net start com.docker.service

演示:

C:\Program Files\Docker\Docker>Net stop com.docker.service
Docker Desktop Service 服务正在停止.
Docker Desktop Service 服务已成功停止。


C:\Program Files\Docker\Docker>Net start com.docker.service
Docker Desktop Service 服务正在启动 .
Docker Desktop Service 服务已经启动成功。

报错:docker for windows requires windows 10 pro or enterprise version 14393 to run


解决:

该错误意味着您需要Windows 10专业版或企业版版本14393才能运行Docker for Windows。 切换到Windows的高级版本即可。如果您正在使用家庭版或低于专业版的版本,则无法安装Docker for Windows。

报错:Unable to start: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer ‘localhost’ because the object was not found. The object might have been deleted.

解决方案:

确保已启用Hyper-V,并且计算机已重启。如果有,禁用任何错误的虚拟交换机。在运行的命令中使用“–debug”选项以获得更多详细信息。

报错:Docker Desktop requires server version ‘18.06.0+’ or ‘API version 1.38’ to run.


解决方案:

的Docker Desktop版本过旧,需要升级。


请按照以下步骤进行操作:

打开Docker Desktop。单击“ Docker”菜单并选择“ Settings”。在左侧面板中,选择“ General”。将Docker Desktop升级到最新版本。

报错:Failed to initialize Docker: Error with pre-create check: “Hyper-V is not available on this version of Windows. (Virtual machine ID 4D7C8B02-881B-491A-9FBF-3D8EA2CF0CEA)”


解决方案:

确保您的计算机支持Hyper-V。确保已启用Hyper-V,并且计算机已重启。如果有,禁用任何错误的虚拟交换机。如果MobyLinuxVM没有正确配置,请尝试卸载和重新安装Docker。



版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章

运用大厂严格培训标准
拥有海量精品培训课程
汇聚众多行业优质机构
打造完善职业教育体系
正规监管 工商认证 工商监管
Copyright © 2012-2023 派维基网站 版权所有
网站备案号:粤ICP备013578445号