Compare commits

..

2 Commits

Author SHA1 Message Date
70c4a813ef 修改python版本 2026-03-17 12:11:28 +08:00
14263e8ea3 使用阿里云镜像加速 2026-03-17 10:44:34 +08:00
2 changed files with 12 additions and 4 deletions

View File

@@ -4,16 +4,20 @@
# ============================================================
# ---- 基础层 ----
FROM python:3.11-slim AS base
FROM python:3.10-slim AS base
WORKDIR /app
# 使用阿里云镜像加速 apt 和 pip
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list 2>/dev/null || true
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc default-libmysqlclient-dev curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt
# 复制共享模块
COPY shared/ ./shared/

View File

@@ -2,15 +2,19 @@
# Weibo-HotSign Frontend Dockerfile (Flask)
# ============================================================
FROM python:3.11-slim
FROM python:3.10-slim
WORKDIR /app
# 使用阿里云镜像加速 apt 和 pip
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list 2>/dev/null || true
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt
COPY . .