52 字
1 分钟

✨Dockerfile 编译CentOS7基础镜像替换YUM源

2024-07-11
浏览量 加载中...

Dockerfile 编译CentOS7基础镜像替换YUM源

Dockerfile 文件编辑

yaml
FROM centos:7

# 设置镜像源并更新yum源,同时安装 epel-release 并替换 EPEL 源
RUN curl -o /etc/yum.repos.d/CentOS-Base.repo <http://mirrors.aliyun.com/repo/Centos-altarch-7.repo> && \\
    yum clean all && \\
    yum makecache && \\
    yum install -y epel-release && \\
    curl -o /etc/yum.repos.d/epel.repo <http://mirrors.aliyun.com/repo/epel-7.repo> && \\
    yum clean all && \\
    yum makecache

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!

赞助
✨Dockerfile 编译CentOS7基础镜像替换YUM源
https://dear7575.cn/posts/arm-centos7-yum
作者
北港不夏
发布于
2024-07-11
许可协议
CC BY-NC-SA 4.0
最后更新于 2024-07-11,距今已过 635 天

部分内容可能已过时

评论区

目录