Docker - MAC 电脑运行 docker-compose up -d 报 File "docker/transport/unixconn.py", line 43, in connect FileNotFoundError: [Errno 2] No such file or directory

简介: Docker - MAC 电脑运行 docker-compose up -d 报 File "docker/transport/unixconn.py", line 43, in connect FileNotFoundError: [Errno 2] No such file or directory

背景


在本地有一个 docker-compose.yml 文件,要运行它

docker-compose up -d

结果报错了


Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests/adapters.py", line 449, in send
File "urllib3/connectionpool.py", line 727, in urlopen
File "urllib3/util/retry.py", line 403, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/api/client.py", line 205, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 228, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bin/docker-compose", line 3, in
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 123, in perform_command
File "compose/cli/command.py", line 69, in project_from_options
File "compose/cli/command.py", line 132, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 188, in init
File "docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))


检查我的 docker 命令

docker

是正常可找到命令的(后来才发现这个不行)

 

解决方案


https://github.com/prisma/prisma1/issues/5120

最后还是根据这个 issue 提供的思路解决了

 

根因

本地的 docker-desktop 没有启动......

image.png

相关文章
|
2月前
|
安全 Docker 容器
|
28天前
|
安全 Linux Shell
docker运行centos提示Operation not permitted
通过上述步骤,可以有效排查和解决在Docker中运行CentOS容器时遇到的"Operation not permitted"错误。这些措施涵盖了从权限配置、安全策略到容器运行参数的各个方面,确保在不同环境和使用场景下都能顺利运行容器。如果你需要进一步优化和管理你的Docker环境
50 3
|
2月前
|
Shell Docker 容器
LangChain-10(2) 加餐 编写Agent获取本地Docker运行情况 无技术含量只是思路
LangChain-10(2) 加餐 编写Agent获取本地Docker运行情况 无技术含量只是思路
18 4
LangChain-10(2) 加餐 编写Agent获取本地Docker运行情况 无技术含量只是思路
|
2月前
|
NoSQL Linux Redis
Docker学习二(Centos):Docker安装并运行redis(成功运行)
这篇文章介绍了在CentOS系统上使用Docker安装并运行Redis数据库的详细步骤,包括拉取Redis镜像、创建挂载目录、下载配置文件、修改配置以及使用Docker命令运行Redis容器,并检查运行状态和使用Navicat连接Redis。
254 3
|
2月前
|
安全 Docker 容器
Docker中运行容器时Operation not permitted报错问题解决
【10月更文挑战第2天】Docker中运行容器时Operation not permitted报错问题解决
379 3
|
2月前
|
前端开发 应用服务中间件 nginx
docker运行nginx镜像
这篇文章详细说明了如何在Docker中部署并运行Nginx服务,包括拉取镜像、配置文件的挂载以及容器的启动配置。
296 0
docker运行nginx镜像
|
2月前
|
缓存 NoSQL Redis
docker运行redis镜像
这篇文章介绍了如何使用Docker运行Redis镜像,并提供了启动和配置Redis容器的具体命令和步骤。
138 0
|
2月前
|
NoSQL Redis Docker
Docker获取镜像和运行镜像
这篇文章介绍了如何使用Docker获取镜像以及运行镜像的具体步骤和命令。
250 0
|
2月前
|
应用服务中间件 Shell nginx
Docker容器运行
Docker容器运行
31 0
|
3月前
|
Unix 数据安全/隐私保护
Mac电脑如何启用root用户
Mac电脑如何启用root用户
下一篇
无影云桌面