refactor: 简化 Dockerfile 中的镜像源切换和依赖安装脚本
This commit is contained in:
parent
7ddeba3153
commit
ea6bddabf3
@ -8,10 +8,6 @@ RUN echo "btr9-${RANDOM_NAME}" > /etc/hostname
|
||||
|
||||
# 切换 rockylinux 镜像源为腾讯云源,更新包列表并安装依赖
|
||||
RUN sed -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.tencent.com/rocky|g' -i.bak /etc/yum.repos.d/rocky-*.repo && \
|
||||
sed -e 's!^metalink=!#metalink=!g' \
|
||||
-e 's!^#baseurl=!baseurl=!g' \
|
||||
-e 's!https\?://download\.fedoraproject\.org/pub/epel!https://mirrors.tencent.com/epel!g' \
|
||||
-e 's!https\?://download\.example/pub/epel!https://mirrors.tencent.com/epel!g' \
|
||||
-i /etc/yum.repos.d/epel{,-testing}.repo && \
|
||||
dnf makecache && \
|
||||
(dnf install -y epel-release || dnf install -y epol-release 'dnf-command(config-manager)') && \
|
||||
|
Loading…
x
Reference in New Issue
Block a user