更新 Dockerfile
This commit is contained in:
parent
8fe0e49ef8
commit
86a647eaa7
12
Dockerfile
12
Dockerfile
@ -50,13 +50,13 @@ RUN mkdir -p /app/publish && \
|
||||
# ===== 第二阶段:运行阶段 =====
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
|
||||
# 配置 apt-get 使用 apt-cacher-ng 作为代理
|
||||
RUN echo 'Acquire::http::Proxy "http://192.168.1.140:3142";' > /etc/apt/apt.conf.d/01proxy
|
||||
# 清除所有现有源
|
||||
RUN rm -rf /etc/apt/sources.list /etc/apt/sources.list.d/*
|
||||
|
||||
# 创建并配置 Debian 镜像源
|
||||
RUN echo "deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list
|
||||
# 配置阿里云镜像源
|
||||
RUN echo "deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free" > /etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free" >> /etc/apt/sources.list
|
||||
|
||||
# 允许使用不安全的软件源
|
||||
RUN echo 'Acquire::AllowInsecureRepositories "true";' > /etc/apt/apt.conf.d/99allow-insecure && \
|
||||
|
Loading…
Reference in New Issue
Block a user