[Bug]部署版本过时报错
What happened / 发生了什么
使用docker compose部署的时候出现:WARN[0000] /Users/mayuanyuan/git/AstrBot/compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
unable to get image 'soulter/astrbot:latest': Cannot connect to the Docker daemon at unix:///Users/mayuanyuan/.orbstack/run/docker.sock. Is the docker daemon running?
Reproduce / 如何复现?
git clone https://github.com/AstrBotDevs/AstrBot cd AstrBot docker compose up -d
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
4.57.0 Docker
OS
macOS
Logs / 报错日志
Are you willing to submit a PR? / 你愿意提交 PR 吗?
- [x] Yes!
Code of Conduct
- [x] I have read and agree to abide by the project's Code of Conduct。
Hi @YuanyuanMa03! I'm Dosu and I’m helping the AstrBot team.
这个问题实际上包含两个不同的部分:
-
version属性警告 - 这只是一个警告,不会影响运行。Docker Compose V2 已废弃version字段,可以安全地从compose.yml中删除它。 -
Docker daemon 连接错误 - 这是主要问题。错误信息
Cannot connect to the Docker daemon表明 Docker 服务没有运行。在 macOS 上使用 OrbStack,请确保 OrbStack 应用已启动。
解决方法:
- 启动 OrbStack 应用(从应用程序中打开)
- 或者如果使用 Docker Desktop,确保 Docker Desktop 已运行
- 然后重新执行
docker compose up -d
您愿意提交 PR 移除 compose.yml 中的 version 字段吗?这是一个简单的改进。
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
与版本过时无关。像bot所说,这个警告只是说compose.yml可以不写version字段了,因为已经弃用,但是通常为了向前兼容会保留这个字段。 看起来问题是后面那句 unable to get image 'soulter/astrbot:latest': Cannot connect to the Docker daemon at unix:///Users/mayuanyuan/.orbstack/run/docker.sock. Is the docker daemon running?
docker需要运行守护进程猜测你的是mac的话,可能需要手动启动docker desktop,如果只想快速部署的话建议直接从 https://github.com/AstrBotDevs/AstrBot-desktop/releases 下载安装astrbot桌面安装包
谢谢你的帮助!