FROM node:22-slim # 1. ตั้งค่าพื้นฐาน ENV TZ=Asia/Bangkok \ PORT=7860 \ HOME=/root \ DEBIAN_FRONTEND=noninteractive \ PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright \ CHROMIUM_FLAGS='--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage' # 2. ติดตั้ง System Packages RUN apt-get update && apt-get install -y --no-install-recommends \ curl wget git ca-certificates \ zip unzip rsync \ python3 python3-pip python3-venv \ libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 libpango-1.0-0 \ && rm -rf /var/lib/apt/lists/* # 3. ติดตั้ง Python Libraries RUN pip3 install --no-cache-dir \ huggingface_hub \ playwright \ --break-system-packages # 4. ติดตั้ง Playwright Browsers และ Dependencies RUN playwright install chromium && \ playwright install-deps chromium # 5. ติดตั้ง OpenClaw RUN npm install -g openclaw@latest --unsafe-perm # 6. ตั้งค่าไดเรกทอรีทำงานและคัดลอกสคริปต์ WORKDIR /app # แก้ไขจุดนี้: เติม . ไว้ข้างหลังเพื่อระบุว่า copy ลงใน current directory (/app) COPY sync_manager.py . COPY start_openclaw.sh . RUN chmod +x start_openclaw.sh # 7. เปิดพอร์ตและรัน EXPOSE 7860 # ใช้ชื่อไฟล์ให้ตรงกับที่ COPY มา ENTRYPOINT ["./start_openclaw.sh"]