FROM node:24-bookworm # 1. Install system dependencies for Playwright/Chromium # These are required to actually open the web versions of Claude/ChatGPT RUN apt-get update && apt-get install -y socat \ libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ libxkbcommon0 libxcomposite1 libxdamage1 libxext6 libxfixes3 \ libxrandr2 libgbm1 libasound2 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # 2. FIXED: Clone the official OpenClaw repository RUN git clone https://github.com/openclaw/openclaw.git . # 3. Official Build Steps RUN corepack enable RUN pnpm install RUN pnpm build RUN pnpm ui:install RUN pnpm ui:build # 4. Install Browsers for "No API" mode RUN npx playwright install chromium # 5. Hugging Face Environment Setup ENV NODE_ENV=production ENV PORT=7860 ENV OPENCLAW_PORT=7860 EXPOSE 7860 # 6. Startup Command # Force port 7860 and "auto" network binding so HF can detect the app CMD ["node", "dist/index.js", "gateway", "--port", "7860", "--bind", "auto", "--allow-unconfigured"]