Spaces:
Runtime error
Runtime error
| FROM node:22-slim | |
| ARG APP_HOME=/root/.openclaw | |
| ARG SCRIPTS_DIR=/usr/local/bin | |
| # 0. ๅๅปบๅบ็ก็ฎๅฝ | |
| RUN mkdir -p ${APP_HOME} | |
| # 1. ๅฎ่ฃ ็ณป็ปไพ่ต | |
| # ไผๅ๏ผๅๅนถ RUN ๆไปค๏ผๅๅฐๅฑๆฐ๏ผ็กฎไฟ่ฏไนฆๆดๆฐๅจๅฎ่ฃ ๅ็ซๅณๆง่ก | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| openssh-client \ | |
| build-essential \ | |
| g++ \ | |
| make \ | |
| python3 \ | |
| python3-pip \ | |
| python3-venv \ | |
| ca-certificates \ | |
| jq \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && update-ca-certificates | |
| # 2. ๅฎ่ฃ Hugging Face ๅฝไปค่กๅทฅๅ ท | |
| RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages | |
| # 3. ้ ็ฝฎ Git | |
| RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && \ | |
| git config --global --add safe.directory "*" | |
| # 4. ๅ จๅฑๅฎ่ฃ OpenClaw | |
| RUN npm install -g openclaw@latest --unsafe-perm | |
| # 5. ๅคๅถๆๆ่ๆฌๅๆจกๆฟ | |
| COPY scripts/sync.py ${SCRIPTS_DIR}/sync.py | |
| COPY scripts/pending.py ${SCRIPTS_DIR}/pending.py | |
| COPY scripts/start-openclaw.sh ${SCRIPTS_DIR}/start-openclaw.sh | |
| COPY scripts/telegram-dns-check.sh ${SCRIPTS_DIR}/telegram-dns-check.sh | |
| COPY config/openclaw.json ${APP_HOME}/openclaw.json | |
| # ่ตไบๆง่กๆ้ | |
| RUN chmod +x ${SCRIPTS_DIR}/sync.py ${SCRIPTS_DIR}/pending.py ${SCRIPTS_DIR}/start-openclaw.sh ${SCRIPTS_DIR}/telegram-dns-check.sh | |
| # 6. ่ฎพ็ฝฎ็ฏๅขๅ้ | |
| ENV PORT=7860 \ | |
| OPENCLAW_GATEWAY_MODE=local \ | |
| HOME=/root \ | |
| PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 | |
| # 7. ๆด้ฒ็ซฏๅฃ | |
| EXPOSE ${PORT} | |
| # 8. ๅฅๅบทๆฃๆฅ | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | |
| CMD curl -f http://localhost:${PORT}/health || exit 1 | |
| # 9. ๅ ฅๅฃ็น | |
| ENTRYPOINT ["/usr/local/bin/start-openclaw.sh"] |