R1000 commited on
Commit
36b60aa
·
verified ·
1 Parent(s): 5693207

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -25
Dockerfile CHANGED
@@ -1,36 +1,25 @@
1
  FROM node:22-slim
2
 
3
- # 1. ติดตั้ง Dependencies และ Libs สำหรับ Chrome
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
- git build-essential python3 python3-pip \
6
- g++ make ca-certificates \
7
- libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
8
- libdrm2 libdbus-1-3 libxcb1 libxkbcommon0 libx11-6 libxcomposite1 \
9
- libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
10
- libcairo2 libasound2 \
11
- && npm install -g pnpm \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
  RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
15
 
16
- # 2. Clone OpenClaw (ระบุจุด "." เพื่อลงใน /app โดยตรง ไม่ต้อง cd)
17
- WORKDIR /app
18
- RUN git clone --depth 1 https://github.com/openclaw/openclaw.git .
19
-
20
- # 3. ติดตั้งและ Build (ตอนนี้อยู่ถูกที่แล้ว pnpm จะเห็นไฟล์ครบ)
21
- RUN pnpm install && \
22
- pnpm ui:build && \
23
- pnpm build
24
 
25
- # 4. ติดตั้ง Playwright Chromium
26
- RUN npx playwright install chromium
27
-
28
- # 5. ตั้งค่าสภาพแวดล้อม
29
- ENV PORT=7860 HOME=/root
30
  COPY start_openclaw.sh .
31
  RUN chmod +x start_openclaw.sh
32
 
33
- EXPOSE 7860
 
34
 
35
- # 6. รัน Gateway
36
- CMD ["pnpm", "openclaw", "gateway", "--allow-unconfigured", "--port", "7860"]
 
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 && 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
+ # RUN npm install -g @larksuiteoapi/node-sdk --unsafe-perm && \
13
+ # npm install -g openclaw@2026.2.26 --unsafe-perm
 
 
 
 
14
 
15
+ # 3. 设置工作目录并拷贝脚本
16
+ WORKDIR /app
17
+ COPY sync.py .
 
 
18
  COPY start_openclaw.sh .
19
  RUN chmod +x start_openclaw.sh
20
 
21
+ # 4. 环境变量
22
+ ENV PORT=7860 HOME=/root
23
 
24
+ EXPOSE 7860
25
+ CMD ["./start_openclaw.sh"]