Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20-bullseye
|
| 2 |
+
|
| 3 |
+
# Install system dependencies for Playwright/Chromium
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
|
| 6 |
+
libxkbcommon0 libxcomposite1 libxdamage1 libxext6 libxfixes3 \
|
| 7 |
+
libxrandr2 libgbm1 libasound2 \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Install OpenClaw globally
|
| 13 |
+
RUN npm install -g @openclaw/cli
|
| 14 |
+
|
| 15 |
+
# Pre-install Playwright browsers for the "No API" mode
|
| 16 |
+
RUN npx playwright install chromium
|
| 17 |
+
|
| 18 |
+
# Copy your local config if you have one
|
| 19 |
+
# COPY openclaw.json .
|
| 20 |
+
|
| 21 |
+
# Expose the port (Hugging Face typically uses 7860)
|
| 22 |
+
EXPOSE 7860
|
| 23 |
+
|
| 24 |
+
# Start OpenClaw in Gateway mode
|
| 25 |
+
CMD ["openclaw", "gateway", "--port", "7860"]
|