From 8f8e5c39fe962c4c7d1967e078b0f86a632a1ab8 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 1 Feb 2022 14:02:48 +0100 Subject: [PATCH] Update centos8 mirrors Signed-off-by: Evan Lezar --- docker/Dockerfile.centos | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/Dockerfile.centos b/docker/Dockerfile.centos index c899c622..f69de3e3 100644 --- a/docker/Dockerfile.centos +++ b/docker/Dockerfile.centos @@ -1,6 +1,15 @@ ARG BASEIMAGE 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 \ ca-certificates \ wget \