bug fix
parent
c005964b5d
commit
0713edb261
|
|
@ -8,7 +8,8 @@ WORKDIR /app
|
|||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PIP_DEFAULT_TIMEOUT=120
|
||||
|
||||
# 替换为阿里云 Debian 镜像源(国内加速)
|
||||
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
|
||||
|
|
@ -16,7 +17,7 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debia
|
|||
|
||||
# 安装系统依赖(含 WeasyPrint 渲染库 + CJK/等宽系统字体)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
build-essential \
|
||||
default-libmysqlclient-dev \
|
||||
pkg-config \
|
||||
libpango-1.0-0 \
|
||||
|
|
@ -34,8 +35,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
# 复制依赖文件
|
||||
COPY requirements.txt .
|
||||
|
||||
# 升级打包工具,减少 PEP517/源码构建失败
|
||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
# 安装 Python 依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple || \
|
||||
pip install --no-cache-dir -r requirements.txt -i https://pypi.org/simple
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
|
|
|||
Loading…
Reference in New Issue