Files
agent/mcp/video_gen/Dockerfile
T
kicer 4300c8e5b4 构建提速:npm 默认走腾讯云镜像(可用 --build-arg NPM_REGISTRY 覆盖)
- image_gen/Dockerfile、video_gen/Dockerfile: 加 ARG NPM_REGISTRY + npm config set registry
  (web_search 零依赖、不需要)
2026-09-15 21:00:02 +08:00

20 lines
742 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:22-slim
WORKDIR /app
# 国内构建慢:npm 默认源在国外。想换回官方:
# docker compose build --build-arg NPM_REGISTRY=https://registry.npmjs.org/ mcp_video_gen
ARG NPM_REGISTRY=https://mirrors.cloud.tencent.com/npm/
# 复制 package.json 并安装依赖
COPY package.json ./
RUN npm config set registry "$NPM_REGISTRY" && npm install --omit=dev
# 复制源码
COPY . .
EXPOSE 3000
# HTTP 模式:只提供 MCP(/mcp)与 /health;容器外不映射,只在 my-app-network 内被 agent 访问。
# 本地图片需要公网 URL 时,AI 去 curl agent 的内网签发入口(env PUBLIC_LINK_URL),本服务不搬字节。
CMD ["node", "src/mcp-server.js", "--http", "--port", "3000", "--host", "0.0.0.0"]