AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug]VPS部署docker重新建容器提示失败

Open mywyp opened this issue 1 year ago • 1 comments

发生了什么

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/etc/timezone" to rootfs at "/etc/timezone": mount /etc/timezone:/etc/timezone (via /proc/self/fd/7), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

如何复现?

删除ASTRBOT之前容器及本地镜像后,重新克隆仓库成功,拉取容器镜像成功,但是ssh命令新建运行astrbot时提示失败。

AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

CENTOS7 VPSdocker部署

操作系统

Other

报错日志

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/etc/timezone" to rootfs at "/etc/timezone": mount /etc/timezone:/etc/timezone (via /proc/self/fd/7), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

你愿意提交 PR 吗?

  • [x] 是的,我愿意提交 PR!

Code of Conduct

  • [x] 我已阅读并同意遵守该项目的 行为准则。

mywyp avatar Mar 12 '25 02:03 mywyp

CentOS 可能没有etc/timezone, 你可以检查一下吗。 如果没有的话,可以手工新建

echo "Asia/Shanghai" > /etc/timezone

其他时区参考:https://www.wikiwand.com/en/articles/List_of_tz_database_time_zones

roeseth avatar Mar 14 '25 00:03 roeseth