R1000 commited on
Commit
edb80eb
·
verified ·
1 Parent(s): 9b5a0de

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -21
Dockerfile CHANGED
@@ -1,29 +1,32 @@
1
  FROM node:22-slim
2
 
3
- # 1. 基础依赖
 
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
- git openssh-client build-essential python3 python3-pip \
6
- g++ make ca-certificates && npm install -g pnpm && rm -rf /var/lib/apt/lists/* \
7
-
8
-
9
- RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
10
-
11
- # 2. 安装 OpenClaw
12
- RUN npm install -g openclaw@latest --unsafe-perm
13
- # RUN npm install -g @larksuiteoapi/node-sdk --unsafe-perm && \
14
- # npm install -g openclaw@2026.2.26 --unsafe-perm
15
- RUN pnpm install && \
16
- pnpm ui:build && \
17
- pnpm build
18
-
19
- # 3. 设置工作目录并拷贝脚本
 
 
 
20
  WORKDIR /app
21
 
22
- COPY start_openclaw.sh .
23
- RUN chmod +x start_openclaw.sh
 
24
 
25
- # 4. 环境变量
26
  ENV PORT=7860 HOME=/root
27
-
28
  EXPOSE 7860
29
- CMD ["./start_openclaw.sh"]
 
1
  FROM node:22-slim
2
 
3
+ ENV CI=true
4
+
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ git \
7
+ python3 \
8
+ python3-pip \
9
+ make \
10
+ g++ \
11
+ ca-certificates \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ ENV TZ=Asia/Shanghai
15
+
16
+ RUN pip3 install --break-system-packages --no-cache-dir \
17
+ huggingface_hub>=0.23.0 \
18
+ requests>=2.31.0
19
+
20
+ RUN npm install -g openclaw@latest \
21
+ && openclaw --version \
22
+ && npx --version
23
+
24
  WORKDIR /app
25
 
26
+ COPY start-openclaw.sh /usr/local/bin/start-openclaw.sh
27
+ RUN chmod +x /usr/local/bin/start-openclaw.sh
28
+ RUN mkdir -p /root/.openclaw
29
 
 
30
  ENV PORT=7860 HOME=/root
 
31
  EXPOSE 7860
32
+ CMD ["/usr/local/bin/start-openclaw.sh"]