mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 17:35:58 +03:00
[GH-ISSUE #178] [Bug] Docker Compose 部署方式无法在后台面板检查更新 #136
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @moonjoke001 on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/178
问题描述
使用 Docker Compose 方式部署时,后台面板的"检查更新"功能无法检测到最新版本,始终显示"已是最新版本"。
环境信息
复现步骤
docker compose up -d启动服务原因分析
检查更新功能 (
checkForUpdates) 的逻辑:git rev-parse --git-dir检测是否在 Git 仓库中git fetch --tags获取最新 tags问题在于:Docker 容器内没有安装
git命令,但代码只检测了.git目录是否存在,没有检测git命令是否可用。导致:git rev-parse --git-dir失败(因为没有 git 命令)建议修复方案
修改
src/ui-manager.js中的checkForUpdates函数,先检测git命令是否可用:临时解决方案
Docker 用户升级需要手动拉取新镜像:
@justlovemaki commented on GitHub (Jan 8, 2026):
v2.4.6 版本之后可以
@moonjoke001 commented on GitHub (Jan 8, 2026):
谢谢