FROM node:22-slim # 1. ติดตั้งแพ็กเกจพื้นฐานที่จำเป็น RUN apt-get update && apt-get install -y --no-install-recommends \ git openssh-client build-essential python3 python3-pip \ g++ make ca-certificates && rm -rf /var/lib/apt/lists/* # ติดตั้ง huggingface_hub ด้วย pip RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages # 2. ติดตั้ง Playwright RUN pip3 install --no-cache-dir playwright --break-system-packages && \ playwright install chromium && \ playwright install-deps # 3. ติดตั้ง OpenClaw #RUN npm install -g npm@latest && \ RUN npm install -g openclaw@latest # npm install -g @larksuiteoapi/node-sdk --unsafe-perm && \ # npm install -g openclaw@2026.2.26 --unsafe-perm # 4. ตั้งค่าไดเรกทอรีทำงานและคัดลอกสคริปต์ WORKDIR /app COPY sync.py . COPY start_openclaw.sh . RUN chmod +x start_openclaw.sh # 5. กำหนดตัวแปรสภาพแวดล้อม ENV PORT=7860 HOME=/root # เปิดพอร์ตที่ใช้ EXPOSE 7860 # คำสั่งรันเมื่อเริ่มคอนเทนเนอร์ CMD ["./start_openclaw.sh"]