From 2ea632a86163d4f6c80e8a52391054eac11a5ed9 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 14 Feb 2022 14:08:24 +0100 Subject: [PATCH] Update centos:8 mirrors for release tests Signed-off-by: Evan Lezar --- test/release/docker/centos8/Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/release/docker/centos8/Dockerfile b/test/release/docker/centos8/Dockerfile index b6015b18..20cc44f8 100644 --- a/test/release/docker/centos8/Dockerfile +++ b/test/release/docker/centos8/Dockerfile @@ -1,4 +1,14 @@ -FROM centos:8 +ARG BASEIMAGE=centos:8 +FROM ${BASEIMAGE} + +ARG BASEIMAGE +# See https://www.centos.org/centos-linux-eol/ +# and https://stackoverflow.com/a/70930049 +RUN [[ "${BASEIMAGE}" != "centos:8" ]] || \ + ( \ + sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \ + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* \ + ) RUN yum install -y \ yum-utils \