| FROM node:22-slim |
|
|
| ARG APP_HOME=/root/.openclaw |
| ARG SCRIPTS_DIR=/usr/local/bin |
|
|
| |
| RUN mkdir -p ${APP_HOME} |
|
|
| |
| |
| 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 |
| |
|
|
| |
| RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages |
|
|
| |
| RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && \ |
| git config --global --add safe.directory "*" |
|
|
| |
| RUN npm install -g openclaw@latest --unsafe-perm |
|
|
| |
| 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 |
|
|
| |
| ENV PORT=7860 \ |
| OPENCLAW_GATEWAY_MODE=local \ |
| HOME=/root \ |
| PYTHONUNBUFFERED=1 \ |
| PYTHONDONTWRITEBYTECODE=1 |
|
|
| |
| EXPOSE ${PORT} |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ |
| CMD curl -f http://localhost:${PORT}/health || exit 1 |
|
|
| |
| ENTRYPOINT ["/usr/local/bin/start-openclaw.sh"] |