hyf-backend/Dockerfile.base

20 lines
826 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.

# TH Agenter 基础镜像 - 包含所有依赖
# 使用方法:
# 1. 构建基础镜像docker build -f Dockerfile.base -t registry.t-aaron.com/hyf-backend-base:latest .
# 2. 推送到仓库docker push registry.t-aaron.com/hyf-backend-base:latest
# 3. 之后使用 Dockerfile.new 进行快速部署
FROM registry.t-aaron.com/python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件(排除 Windows 专用包 win32_setctime
COPY requirements.txt .
RUN grep -v '^win32_setctime' requirements.txt > /tmp/requirements.txt \
&& pip install --no-cache-dir -r /tmp/requirements.txt \
&& pip install --no-cache-dir fastapi-cdn-host langchain-tavily langgraph-checkpoint-postgres