mateclaw icon indicating copy to clipboard operation
mateclaw copied to clipboard

[Bug] 运行镜像 Node 版本与 dsh 自动安装要求不一致,且缺少 bwrap 沙箱依赖

Open mateaix opened this issue 1 month ago • 0 comments

问题描述

拉取最新镜像并部署后,dsh 自动安装失败。用户检查发现镜像内为 Node.js 24,但自动安装器要求 Node.js 22。另外,镜像内缺少 dsh 使用 Bash 工具所需的 bwrap(bubblewrap)沙箱依赖。

复现步骤

  1. 拉取最新 MateClaw 镜像并部署。
  2. 在 dsh 管理中执行自动安装。
  3. 安装因 Node.js 版本检查失败而中断。
  4. 镜像内未提供 bwrap,dsh 的 Bash 工具所需沙箱依赖不完整。

实际行为及代码依据

  • 用户反馈运行镜像中的 Node.js 为 24;尚未独立运行该镜像复现。
  • mateclaw-server/src/main/java/vip/mate/agent/runtime/dsh/management/DshPinnedInstaller.java 中通过 v22\..* 检查版本,非 22 会抛出 dsh.node_version_unverified: Node.js 22 is required,发生在 npm 安装之前。
  • mateclaw-server/Dockerfile 的前端构建阶段使用 node:22-alpine,但最终运行阶段基于 mcr.microsoft.com/playwright:v1.62.0-noble,没有显式配置 Node.js 22。前端构建阶段的版本不决定最终镜像中的 Node 版本。
  • 最终运行阶段的 apt 安装列表没有 bubblewrap,也没有显式安装 bwrap 的步骤。
  • 独立 dsh 容器的 mateclaw-server/src/main/resources/dsh/container/Dockerfile 同样没有显式安装 bubblewrap,应一并检查。

预期行为

  • 官方运行镜像中的 Node.js 版本与锁定的 dsh 安装要求保持一致,自动安装可成功完成。
  • Linux 镜像提供 dsh Bash 工具所需的 bubblewrap,并验证在实际容器权限下能够运行沙箱。

建议验收

  • 在最终运行镜像内检查 node --version,并完成一次真实 dsh 自动安装。
  • 检查 command -v bwrap,并通过 dsh 实际执行一次 Bash 工具调用,验证沙箱可用。

待补充信息

具体镜像 tag/digest、完整报错日志及部署环境尚未提供。

mateaix avatar Oct 22 '26 09:10 mateaix