FROM node:22-slim # 1. 安装系统依赖 RUN apt-get update && apt-get install -y --no-install-recommends \ git openssh-client build-essential python3 python3-pip python3-venv \ g++ make ca-certificates curl && rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages # 2. 安装 OpenClaw RUN npm install -g openclaw@latest --unsafe-perm # 3. 配置工作目录 WORKDIR /app COPY sync.py . COPY start-openclaw.sh . RUN chmod +x start-openclaw.sh # 4. 环境变量 ENV PORT=7860 HOME=/root EXPOSE 7860 CMD ["./start-openclaw.sh"]