FROM node:22-slim # 1. Install system dependencies 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/* # 2. Install Python dependencies (Hugging Face Hub) RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages # 3. Install OpenClaw globally (latest stable version) RUN npm install -g openclaw@latest --unsafe-perm # 4. Set working directory WORKDIR /app # 5. Copy script files COPY sync.py . COPY start-openclaw.sh . RUN chmod +x start-openclaw.sh # 6. Set environment variables ENV PORT=7860 ENV HOME=/root EXPOSE 7860 # 7. Startup command CMD ["./start-openclaw.sh"]