FROM node:22-slim # 1. 基础依赖 RUN apt-get update && apt-get install -y --no-install-recommends \ git openssh-client build-essential python3 python3-pip \ g++ make ca-certificates curl && rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir huggingface_hub duckduckgo-search \ pypdf python-docx openpyxl pdfplumber \ --break-system-packages # 2. 安装 OpenClaw 与 QQ 官方 Bot 插件 RUN npm install -g openclaw --unsafe-perm && \ openclaw plugins install --dangerously-force-unsafe-install @openclaw/qqbot # RUN npm install -g @larksuiteoapi/node-sdk --unsafe-perm && \ # npm install -g openclaw@2026.2.26 --unsafe-perm # 3. 设置工作目录并拷贝脚本 WORKDIR /app COPY sync.py . COPY start-openclaw.sh . COPY skills/ /root/.openclaw/skills/ RUN chmod +x start-openclaw.sh # 4. 环境变量 ENV PORT=7860 HOME=/root EXPOSE 7860 HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD curl -f http://localhost:$PORT/health || exit 1 CMD ["./start-openclaw.sh"]