fix: 添加 ca-certificates 解决 Docker 容器内 SSL 证书验证失败

python:3.12-slim 镜像缺少系统级 CA 证书,导致 httpx 请求外部
HTTPS 服务时出现 CERTIFICATE_VERIFY_FAILED 错误。
This commit is contained in:
fawney19
2026-01-19 18:02:04 +08:00
parent 0265849ed3
commit b6a9969aee
4 changed files with 4 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y \
supervisor \
libpq5 \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 从 base 镜像复制 Python 包

View File

@@ -21,6 +21,7 @@ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.li
supervisor \
libpq5 \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 从 base 镜像复制 Python 包

View File

@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \
gcc \
nodejs \
npm \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Python 依赖

View File

@@ -12,6 +12,7 @@ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.li
gcc \
nodejs \
npm \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# pip 镜像源