Skip to content

Commit

Permalink
fix default repos for centos8 (noobaa#8113)
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Prinz Setter <aprinzse@li-56a4e0cc-353c-11b2-a85c-9bc45442ed4b.ibm.com>
Co-authored-by: Amit Prinz Setter <aprinzse@li-56a4e0cc-353c-11b2-a85c-9bc45442ed4b.ibm.com>
  • Loading branch information
alphaprinz and Amit Prinz Setter committed Jun 5, 2024
1 parent e4e5efe commit f9a3444
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/deploy/NVA_build/builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ARG CENTOS_VER=9
FROM quay.io/centos/centos:stream${CENTOS_VER}
#Needs to reapply ARG, it was cleaned by FROM command.
ARG CENTOS_VER
LABEL maintainer="Liran Mauda (lmauda@redhat.com)"

##############################################################
Expand All @@ -10,6 +12,10 @@ LABEL maintainer="Liran Mauda (lmauda@redhat.com)"
##############################################################
# RUN dnf --enablerepo=PowerTools install -y -q nasm && \
# dnf clean all

COPY ./src/deploy/NVA_build/fix_centos8_repo.sh ./src/deploy/NVA_build/
#default repos for centos8 are outdated, this will point to new repos
RUN CENTOS_VER=${CENTOS_VER} ./src/deploy/NVA_build/fix_centos8_repo.sh
RUN dnf update -y -q --nobest && \
dnf clean all
COPY ./src/deploy/NVA_build/install_arrow_build.sh ./src/deploy/NVA_build/install_arrow_build.sh
Expand Down
6 changes: 6 additions & 0 deletions src/deploy/NVA_build/fix_centos8_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [ "$CENTOS_VER" == "8" ]; then
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi

0 comments on commit f9a3444

Please sign in to comment.