Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Fix Use Of mirrorlist.centos.org in dockerfiles for arm64 & ppc64le #3647

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions ansible/docker/Dockerfile.CentOS7
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@ FROM centos:7
ARG git_sha
ARG user=jenkins

RUN sed -i -e 's!mirrorlist!#mirrorlist!g' /etc/yum.repos.d/CentOS-Base.repo; \
sed -i -e 's!#baseurl=http://mirror.centos.org/centos/\$releasever!baseurl=https://vault.centos.org/7.9.2009/!g' /etc/yum.repos.d/CentOS-Base.repo; \
yum -y update; yum clean all; \
RUN sed -i -e 's!mirrorlist!#mirrorlist!g' /etc/yum.repos.d/CentOS-Base.repo

RUN if [ "$(uname -m)" = "aarch64" ]; then \
steelhead31 marked this conversation as resolved.
Show resolved Hide resolved
echo "Running on arm64 architecture"; \
sed -i 's|#baseurl=http://mirror.centos.org/altarch/\$releasever/|baseurl=http://vault.centos.org/altarch/7.9.2009/|' /etc/yum.repos.d/CentOS-Base.repo; \
elif [ "$(uname -m)" = "ppc64le" ]; then \
echo "Running on ppc64le architecture"; \
sed -i 's|#baseurl=http://mirror.centos.org/altarch/\$releasever/|baseurl=http://vault.centos.org/altarch/7.9.2009/|' /etc/yum.repos.d/CentOS-Base.repo; \
else \
# Default To x64; \
echo "Running on another architecture"; \
karianna marked this conversation as resolved.
Show resolved Hide resolved
sed -i -e 's!#baseurl=http://mirror.centos.org/centos/\$releasever!baseurl=https://vault.centos.org/7.9.2009/!g' /etc/yum.repos.d/CentOS-Base.repo; \
fi

RUN yum -y update; yum clean all; \
yum -y install epel-release; \
yum -y install ansible sudo; yum clean all

Expand Down