|
|
@ -1,8 +1,8 @@ |
|
|
FROM docker.io/python:3.10.16-slim |
|
|
FROM docker.io/python:3.10.16-slim |
|
|
|
|
|
|
|
|
# 替换 Debian12 的 .sources 文件到清华镜像 |
|
|
# 替换 Debian12 的 .sources 文件为清华镜像 |
|
|
RUN sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources \ |
|
|
RUN sed -i 's|deb.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources \ |
|
|
&& sed -i 's|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian-security.sources |
|
|
&& sed -i 's|security.debian.org|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources |
|
|
|
|
|
|
|
|
# 安装依赖(带重试) |
|
|
# 安装依赖(带重试) |
|
|
RUN apt-get update \ |
|
|
RUN apt-get update \ |
|
|
@ -20,7 +20,6 @@ RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua |
|
|
|
|
|
|
|
|
COPY . . |
|
|
COPY . . |
|
|
|
|
|
|
|
|
# 预置配置到宿主机可覆盖位置 |
|
|
|
|
|
RUN mkdir -p /opt/alert/model-lab \ |
|
|
RUN mkdir -p /opt/alert/model-lab \ |
|
|
&& cp /app/config.py /opt/alert/model-lab/config.py |
|
|
&& cp /app/config.py /opt/alert/model-lab/config.py |
|
|
|
|
|
|
|
|
|