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 \