R1000 commited on
Commit
32c8532
·
verified ·
1 Parent(s): e6f1d0f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +47 -0
Dockerfile ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:22-slim
2
+
3
+ # 1. ตั้งค่าพื้นฐาน
4
+ ENV TZ=Asia/Bangkok \
5
+ PORT=7860 \
6
+ HOME=/root \
7
+ DEBIAN_FRONTEND=noninteractive \
8
+ PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright \
9
+ CHROMIUM_FLAGS='--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage'
10
+
11
+ # 2. ติดตั้ง System Packages
12
+ RUN apt-get update && apt-get install -y --no-install-recommends \
13
+ python3 \
14
+ python3-pip \
15
+ git \
16
+ zip \
17
+ curl \
18
+ ca-certificates \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # 3. ติดตั้ง Python Libraries
22
+ RUN pip3 install --no-cache-dir \
23
+ huggingface_hub \
24
+ playwright \
25
+ --break-system-packages
26
+
27
+ # 4. ติดตั้ง Playwright Browsers และ Dependencies
28
+ RUN playwright install chromium && \
29
+ playwright install-deps chromium
30
+
31
+ # 5. ติดตั้ง OpenClaw
32
+ RUN npm install -g openclaw@latest --unsafe-perm
33
+
34
+ # 6. ตั้งค่าไดเรกทอรีทำงานและคัดลอกสคริปต์
35
+ WORKDIR /app
36
+
37
+ # แก้ไขจุดนี้: เติม . ไว้ข้างหลังเพื่อระบุว่า copy ลงใน current directory (/app)
38
+ COPY sync_manager.py .
39
+ COPY start_openclaw.sh .
40
+
41
+ RUN chmod +x start_openclaw.sh
42
+
43
+ # 7. เปิดพอร์ตและรัน
44
+ EXPOSE 7860
45
+
46
+ # ใช้ชื่อไฟล์ให้ตรงกับที่ COPY มา
47
+ ENTRYPOINT ["./start_openclaw.sh"]