FROM node:20-slim WORKDIR /app RUN apt-get update && apt-get install -y \ git \ python3 \ python3-pip \ python3-venv \ bash \ make \ g++ \ && rm -rf /var/lib/apt/lists/* RUN npm install -g openclaw ENV PATH="/usr/local/bin:$PATH" RUN printf '#!/usr/bin/env node\nrequire("openclaw");\n' > /usr/local/bin/openclaw && chmod +x /usr/local/bin/openclaw RUN git clone https://github.com/cft0808/edict.git /app/edict WORKDIR /app/edict RUN mkdir -p /root/.openclaw && \ echo '{}' > /root/.openclaw/openclaw.json RUN bash -c 'export PATH="/usr/local/bin:$PATH" && ./install.sh' # 修改 server.py 绑定到 0.0.0.0 RUN sed -i 's/127.0.0.1/0.0.0.0/g' dashboard/server.py RUN printf '#!/bin/bash\nexport PATH="/usr/local/bin:$PATH"\ncd /app/edict\nbash scripts/run_loop.sh &\npython3 dashboard/server.py\n' > /app/start.sh && chmod +x /app/start.sh EXPOSE 7891 CMD ["/app/start.sh"]