StarrySkyWorld commited on
Commit
693f785
·
verified ·
1 Parent(s): d39bd4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM node:20-slim
2
 
3
- # 设置环境变量
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
6
 
@@ -26,15 +25,13 @@ RUN apt-get update && apt-get install -y \
26
  fonts-noto-cjk \
27
  && rm -rf /var/lib/apt/lists/*
28
 
29
- # 创建工作目录
30
  WORKDIR /app
31
 
32
- # 安装 Playwright MCP 和浏览器
33
- RUN npx @playwright/mcp@latest --help || true
34
  RUN npx playwright install chromium
35
 
36
- # 暴露端口(HuggingFace Spaces 默认使用 7860)
37
  EXPOSE 7860
38
 
39
- # 启动 Playwright MCP
40
- CMD ["npx", "@playwright/mcp@latest", "--port", "7860"]
 
1
  FROM node:20-slim
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
5
 
 
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
+ # 关键修改:添加 --host 0.0.0.0 允许远程访问
37
+ CMD ["npx", "@playwright/mcp@latest", "--host", "0.0.0.0", "--port", "7860"]