| FROM alpine:latest | |
| # 安装 OpenClaw 和依赖 | |
| RUN apk add --no-cache \ | |
| bash \ | |
| nodejs \ | |
| npm \ | |
| python3 \ | |
| py3-pip \ | |
| && npm install -g openclaw@latest \ | |
| && pip install pusher | |
| # 配置工作目录 | |
| WORKDIR /app | |
| COPY openclaw.json /root/.openclaw/openclaw.json | |
| # 初始化工作区(持久化) | |
| RUN mkdir -p /data/workspace && \ | |
| ln -s /data/workspace /root/.openclaw/workspace | |
| ENV OPENCLAW_WORKSPACE=/data/workspace | |
| # Pusher 中转脚本(用于 Telegram Bot) | |
| COPY pusher_proxy.py /app/ | |
| # 暴露端口 | |
| EXPOSE 3030 3031 | |
| # 启动 OpenClaw Gateway + Pusher 转发 | |
| CMD (openclaw gateway start --bind 0.0.0.0:3030 &) && \ | |
| python3 /app/pusher_proxy.py |