Files
mysql-mcp-server-sse/Dockerfile

24 lines
436 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 python:3.12-slim
RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 复制本地代码到镜像
COPY . .
# 自动生成 .env如不存在则复制 example.env
RUN [ -f .env ] || cp example.env .env
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 暴露端口(如需)
EXPOSE 3000
# 支持环境变量覆盖
ENV HOST=0.0.0.0 \
PORT=3000
CMD ["python", "-m", "src.server"]