Files
Nexus/docs/changelog/2026-06-07-docker-rsync-push-fix.md
T
2026-07-08 22:31:31 +08:00

1.1 KiB
Raw Blame History

Changelog — 2026-06-07 Docker 镜像补 rsync 修复文件推送

摘要

生产 Docker 镜像未安装 rsync(及 SSH 依赖),导致 #/push 执行 POST /api/sync/files 时在 _rsync_push 抛出 FileNotFoundError: [Errno 2] No such file or directory,日志表现为 sync_files worker raised2/2 servers missing results

动机

用户反馈「推送失败」;容器日志确认 asyncio.create_subprocess_exec("rsync", ...) 找不到可执行文件,与源/目标路径配置无关。

变更

  • Dockerfile.prodapt 安装 rsyncopenssh-clientsshpass(与 sync_engine_v2._rsync_push 一致)
  • Dockerfile:同上,本地 Docker 开发与生产行为对齐

涉及文件

  • Dockerfile.prod
  • Dockerfile

迁移 / 重启

  • 需重建镜像并重启 API 容器docker compose build + up -d
  • 无数据库迁移

验证

docker exec nexus-prod-nexus-1 which rsync ssh sshpass
# 推送页选暂存目录 + 目标服务器 → POST /api/sync/files 应返回 task_idsync_logs 无 FileNotFoundError