Spaces:
Runtime error
Runtime error
File size: 1,650 Bytes
32c8532 874c8ea 32c8532 874c8ea 32c8532 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 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"]
|