he1237596 commited on
Commit
01c6a4c
·
verified ·
1 Parent(s): b594057

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -5,19 +5,27 @@ 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 && rm -rf /var/lib/apt/lists/*
7
 
 
8
  RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
9
 
10
- # 2. 安装 OpenClaw
11
  RUN npm install -g openclaw@latest --unsafe-perm
12
 
13
- # 3. 设置工作目录并拷贝脚本
14
  WORKDIR /app
 
 
15
  COPY sync.py .
16
  COPY start-openclaw.sh .
 
17
  RUN chmod +x start-openclaw.sh
18
 
19
- # 4. 环境变量
 
 
 
20
  ENV PORT=7860 HOME=/root
21
 
22
  EXPOSE 7860
 
23
  CMD ["./start-openclaw.sh"]
 
5
  git openssh-client build-essential python3 python3-pip \
6
  g++ make ca-certificates && rm -rf /var/lib/apt/lists/*
7
 
8
+ # 2. Python 依赖
9
  RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
10
 
11
+ # 3. 安装 OpenClaw
12
  RUN npm install -g openclaw@latest --unsafe-perm
13
 
14
+ # 4. 工作目录
15
  WORKDIR /app
16
+
17
+ # 5. 拷贝文件
18
  COPY sync.py .
19
  COPY start-openclaw.sh .
20
+
21
  RUN chmod +x start-openclaw.sh
22
 
23
+ # 6. 创建数据目录(关键)
24
+ RUN mkdir -p /root/.openclaw/
25
+
26
+ # 7. 环境变量
27
  ENV PORT=7860 HOME=/root
28
 
29
  EXPOSE 7860
30
+
31
  CMD ["./start-openclaw.sh"]