|
|
@ -3,8 +3,11 @@ |
|
|
# ====================== |
|
|
# ====================== |
|
|
FROM python:3.10.16-slim AS builder |
|
|
FROM python:3.10.16-slim AS builder |
|
|
|
|
|
|
|
|
RUN sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources \ |
|
|
# 使用清华源(Debian 12 Bookworm) |
|
|
&& sed -i 's|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources |
|
|
RUN printf "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n\ |
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n\ |
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware\n" \ |
|
|
|
|
|
> /etc/apt/sources.list |
|
|
|
|
|
|
|
|
RUN apt-get update \ |
|
|
RUN apt-get update \ |
|
|
&& apt-get install -y --no-install-recommends \ |
|
|
&& apt-get install -y --no-install-recommends \ |
|
|
@ -23,10 +26,13 @@ RUN pip install --no-cache-dir --prefix=/python_install \ |
|
|
# ====================== |
|
|
# ====================== |
|
|
FROM python:3.10.16-slim |
|
|
FROM python:3.10.16-slim |
|
|
|
|
|
|
|
|
RUN sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources \ |
|
|
# 使用清华源(HTTPS) |
|
|
&& sed -i 's|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources |
|
|
RUN printf "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n\ |
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n\ |
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware\n" \ |
|
|
|
|
|
> /etc/apt/sources.list |
|
|
|
|
|
|
|
|
# ⭐ pyodbc 运行必须安装 libodbc1(提供 libodbc.so.2) |
|
|
# pyodbc 必须安装 libodbc1(提供 libodbc.so.2) |
|
|
RUN apt-get update \ |
|
|
RUN apt-get update \ |
|
|
&& apt-get install -y --no-install-recommends \ |
|
|
&& apt-get install -y --no-install-recommends \ |
|
|
libodbc1 unixodbc \ |
|
|
libodbc1 unixodbc \ |
|
|
|