Spaces:
Sleeping
Sleeping
File size: 2,902 Bytes
eaa272b | 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 36 37 38 39 40 41 42 43 44 45 46 47 | FROM node:22-slim
# โโโ 1. ็ณป็ปๅบ็กไพ่ต โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RUN apt-get update && apt-get install -y --no-install-recommends \
git openssh-client build-essential python3 python3-pip \
make g++ curl wget ca-certificates tini procps jq unzip zip \
locales \
&& sed -i '/zh_CN.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
# โโโ 2. Python ๅทฅๅ
ท โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RUN pip3 install --no-cache-dir huggingface_hub requests httpx --break-system-packages
# โโโ 3. ๅ
จๅฑๅฎ่ฃ
OpenClaw โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RUN npm install -g openclaw@latest --registry https://registry.npmmirror.com && npm cache clean --force
# โโโ 4. ็ฏๅขๅ้ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ENV LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CN:zh \
LC_ALL=zh_CN.UTF-8 \
HOME=/home/node \
PORT=7860 \
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
# โโโ 5. Git ๅผบๅถ HTTPS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ \
&& git config --global url."https://github.com/".insteadOf git@github.com:
# โโโ 6. ๅทฅไฝ็ฎๅฝ & ่ๆฌ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WORKDIR /app
COPY --chown=node:node sync.py .
COPY --chown=node:node start-openclaw.sh .
RUN chmod +x start-openclaw.sh
# โโโ 7. ๆ้่ฐๆด โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RUN mkdir -p /home/node/.openclaw \
&& chown -R node:node /home/node
# โโโ 8. ๅๆข่ณ้ root ็จๆท๏ผๅ
็ฝฎ node ็จๆท UID = 1000๏ผ็ฌฆๅ HF ่ง่๏ผโโโโโโโโโ
USER 1000
# โโโ 9. ๆด้ฒ็ซฏๅฃๅนถๅฏๅจ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
EXPOSE 7860
ENTRYPOINT ["tini", "--"]
CMD ["./start-openclaw.sh"]
|