File size: 1,058 Bytes
b1d3ca9
3ccf31c
88d8c8c
 
f6c484b
88d8c8c
 
8fa8ea8
7f6fd57
 
 
d9192f1
7f6fd57
 
 
88d8c8c
f6c484b
9b02187
88d8c8c
3177091
88d8c8c
 
f6c484b
88d8c8c
f6c484b
5afa9ee
9b02187
72abd57
7f6fd57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# OpenClaw for HuggingFace Spaces (fixed 2026.9.7, node 24)
FROM node:24-slim

RUN apt-get update && apt-get install -y \
    ca-certificates curl netcat-openbsd git python3 make g++ \
    --no-install-recommends && \
    rm -rf /var/lib/apt/lists/*

RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && \
    git config --global url."https://github.com/".insteadOf git@github.com:

ARG OPENCLAW_VERSION=2026.9.7
RUN npm config set fetch-retries 5 && \
    npm config set fetch-retry-mintimeout 20000 && \
    npm install -g openclaw@${OPENCLAW_VERSION} --no-audit --no-fund

RUN mkdir -p /app/spaces/huggingface /home/user && chmod 777 /home/user

COPY openclaw.json        /app/openclaw-template.json
COPY setup-hf-config.mjs  /app/spaces/huggingface/setup-hf-config.mjs
COPY entrypoint.sh        /app/entrypoint.sh
COPY security-check.sh    /app/security-check.sh
COPY tg-net-fix.cjs       /app/tg-net-fix.cjs

RUN chmod +x /app/entrypoint.sh /app/security-check.sh

USER root
EXPOSE 7860
ENTRYPOINT ["/app/entrypoint.sh"]