Compare commits
2 Commits
4d3e70d1b2
...
70c4a813ef
| Author | SHA1 | Date | |
|---|---|---|---|
| 70c4a813ef | |||
| 14263e8ea3 |
@@ -4,16 +4,20 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
|
|
||||||
# ---- 基础层 ----
|
# ---- 基础层 ----
|
||||||
FROM python:3.11-slim AS base
|
FROM python:3.10-slim AS base
|
||||||
|
|
||||||
WORKDIR /app
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
gcc default-libmysqlclient-dev curl \
|
gcc default-libmysqlclient-dev curl \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt .
|
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/
|
COPY shared/ ./shared/
|
||||||
|
|||||||
@@ -2,15 +2,19 @@
|
|||||||
# Weibo-HotSign Frontend Dockerfile (Flask)
|
# Weibo-HotSign Frontend Dockerfile (Flask)
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|
||||||
FROM python:3.11-slim
|
FROM python:3.10-slim
|
||||||
|
|
||||||
WORKDIR /app
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt .
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user