Skip to content

Commit

Permalink
Merge pull request #244 from thaJeztah/fix_centos_repo_names
Browse files Browse the repository at this point in the history
rpm: fix repository-file names on CentOS
  • Loading branch information
thaJeztah authored Jul 19, 2021
2 parents 0188206 + 34dfdda commit 1496019
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dockerfiles/rpm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ RUN yum install -y yum-utils rpm-build git
FROM redhat-base AS rhel-base

FROM redhat-base AS centos-base
RUN if [ -f /etc/yum.repos.d/CentOS-PowerTools.repo ]; then sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo; fi
# Using a wildcard: CentOS 7 uses "CentOS-RepoName", CentOS 8 uses "CentOS-Linux-RepoName"
RUN if [ -f /etc/yum.repos.d/CentOS-*PowerTools.repo ]; then sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-*PowerTools.repo; fi
# In aarch64 (arm64) images, the altarch repo is specified as repository, but
# failing, so replace the URL.
RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi
RUN if [ -f /etc/yum.repos.d/CentOS-*Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-*Sources.repo; fi

FROM redhat-base AS amzn-base

Expand Down

0 comments on commit 1496019

Please sign in to comment.