File size: 920 Bytes
b48551d 2a8812f a94c6cd 5e3be0f a94c6cd b48551d a94c6cd 5e3be0f f15794b d5eb8c9 2b18df8 1e497a9 2b18df8 6ea307a d5eb8c9 a94c6cd e3be79a 2b18df8 e3be79a 2b18df8 2a8812f d841a2f 2b18df8 d728896 5e3be0f d728896 | 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 31 32 33 34 35 | 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"] |