Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files4 unmodified lines5678910116 unmodified lines1819202122232410 unmodified lines353637383940414247 unmodified lines9091929394959620 unmodified lines1171181191201211221231241251264 unmodified linesFROM node:22-slimRUN apt-get update && apt-get install -y --no-install-recommends \git ca-certificates build-essential python3 python3-pip curl socat \&& rm -rf /var/lib/apt/lists/*RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages6 unmodified linesOPENCLAW_GATEWAY_MODE=local \HOME=/root# 复制 ChatClaw 文件COPY --from=chatclaw /server /usr/local/bin/chatclaw-serverCOPY --from=chatclaw /frontend /app/chatclaw-frontendRUN chmod +x /usr/local/bin/chatclaw-server10 unmodified linespython3 /usr/local/bin/sync.py restore# 清理 Telegram 残留(从原 OpenClaw 脚本中复制完整命令,请补充)# ...mkdir -p /root/.openclaw/sessionsmkdir -p /root/.openclaw/workspace47 unmodified lines},"gateway": {"mode": "local","bind": "lan","port": 8081,"trustedProxies": ["0.0.0.0/0", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],"auth": { "mode": "token", "token": "$OPENCLAW_GATEWAY_PASSWORD" },20 unmodified linesopenclaw gateway run --port 8081 &OPENCLAW_PID=$!# 启动 ChatClaw 服务(内部 8080)/usr/local/bin/chatclaw-server --port 8080 &CHATCLAW_PID=$!# 端口转发 7860 -> ChatClaw 的 8080socat TCP-LISTEN:7860,fork,reuseaddr TCP:127.0.0.1:8080 &SOCAT_PID=$!4 unmodified lines5678910116 unmodified lines18192021222310 unmodified lines343536373839404142434447 unmodified lines9293949596979820 unmodified lines1191201211221231241251261271281291301311321331341351361371381391401411424 unmodified linesFROM node:22-slimRUN apt-get update && apt-get install -y --no-install-recommends \git ca-certificates build-essential python3 python3-pip curl socat netcat-openbsd \&& rm -rf /var/lib/apt/lists/*RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages6 unmodified linesOPENCLAW_GATEWAY_MODE=local \HOME=/rootCOPY --from=chatclaw /server /usr/local/bin/chatclaw-serverCOPY --from=chatclaw /frontend /app/chatclaw-frontendRUN chmod +x /usr/local/bin/chatclaw-server10 unmodified linespython3 /usr/local/bin/sync.py restore# 清理 Telegram 残留(请补充完整)rm -rf /root/.openclaw/agents/main/agent/channels/telegramrm -rf /root/.openclaw/credentials/telegramrm -f /root/.openclaw/agents/main/agent/auth-profiles.jsonfind /root/.openclaw -name "*telegram*" -exec rm -rf {} + 2>/dev/null || truemkdir -p /root/.openclaw/sessionsmkdir -p /root/.openclaw/workspace47 unmodified lines},"gateway": {"mode": "local","bind": "loopback","port": 8081,"trustedProxies": ["0.0.0.0/0", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],"auth": { "mode": "token", "token": "$OPENCLAW_GATEWAY_PASSWORD" },20 unmodified linesopenclaw gateway run --port 8081 &OPENCLAW_PID=$!# 等待网关就绪echo "Waiting for OpenClaw gateway on 8081..."for i in $(seq 1 30); doif nc -z 127.0.0.1 8081 2>/dev/null; thenecho "OpenClaw gateway ready."breakfiecho "Attempt $i/30: waiting..."sleep 1done# 启动 ChatClaw 服务(内部 8080)/usr/local/bin/chatclaw-server --port 8080 &CHATCLAW_PID=$!# 等待 ChatClaw 就绪sleep 3# 端口转发 7860 -> ChatClaw 的 8080socat TCP-LISTEN:7860,fork,reuseaddr TCP:127.0.0.1:8080 &SOCAT_PID=$!
Dockerfile+21-5