Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -22
Dockerfile
CHANGED
|
@@ -3,35 +3,22 @@ FROM node:20-slim
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
| 5 |
|
| 6 |
-
# 安装 Playwright 系统依赖
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
-
libnss3 \
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
libdrm2 \
|
| 14 |
-
libdbus-1-3 \
|
| 15 |
-
libxkbcommon0 \
|
| 16 |
-
libatspi2.0-0 \
|
| 17 |
-
libxcomposite1 \
|
| 18 |
-
libxdamage1 \
|
| 19 |
-
libxfixes3 \
|
| 20 |
-
libxrandr2 \
|
| 21 |
-
libgbm1 \
|
| 22 |
-
libasound2 \
|
| 23 |
-
libpango-1.0-0 \
|
| 24 |
-
libcairo2 \
|
| 25 |
-
fonts-noto-cjk \
|
| 26 |
&& rm -rf /var/lib/apt/lists/*
|
| 27 |
|
| 28 |
WORKDIR /app
|
| 29 |
|
| 30 |
-
# 安装 Playwright MCP 和浏览器
|
| 31 |
RUN npm install @playwright/mcp@latest
|
| 32 |
RUN npx playwright install chromium
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
-
|
| 37 |
-
CMD ["npx", "@playwright/mcp@latest", "--host", "0.0.0.0", "--port", "7860", "--allowed-origins", "*"]
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
| 5 |
|
|
|
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
+
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 \
|
| 8 |
+
libcups2 libdrm2 libdbus-1-3 libxkbcommon0 \
|
| 9 |
+
libatspi2.0-0 libxcomposite1 libxdamage1 libxfixes3 \
|
| 10 |
+
libxrandr2 libgbm1 libasound2 libpango-1.0-0 \
|
| 11 |
+
libcairo2 fonts-noto-cjk \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
WORKDIR /app
|
| 15 |
|
|
|
|
| 16 |
RUN npm install @playwright/mcp@latest
|
| 17 |
RUN npx playwright install chromium
|
| 18 |
|
| 19 |
+
# 复制配置文件
|
| 20 |
+
COPY config.json /app/config.json
|
| 21 |
+
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
CMD ["npx", "@playwright/mcp@latest", "--config", "/app/config.json"]
|
|
|