osmith has uploaded this change for review.
centos7: use vault.centos.org
The centos7 images try to use mirrorlist.centos.org to determine the
fastest mirror, and then download binary packages from there. But
mirrorlist.centos.org isn't online anymore. Use the vault instead.
Without this patch, the mirrors that can't be reached are ignored, and
later on it fails to properly install packages because of missing
dependencies.
Related: https://serverfault.com/a/1161847
Change-Id: I0a8f93bb16dd9245760b8a1ad53f0642d446b4cf
---
M centos7-build/Dockerfile
M centos7-obs-latest/Dockerfile
2 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/67/37467/1
diff --git a/centos7-build/Dockerfile b/centos7-build/Dockerfile
index f449d42..d4b152c 100644
--- a/centos7-build/Dockerfile
+++ b/centos7-build/Dockerfile
@@ -5,6 +5,13 @@
ARG OSMOCOM_REPO_MIRROR="https://downloads.osmocom.org"
ARG OSMOCOM_REPO_PATH="packages/osmocom:"
+# Use vault.centos.org instead of mirrorlist.centos.org, which doesn't exist
+# anymore (see https://serverfault.com/a/1161847).
+RUN set -x && \
+ sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
+
# Use dnf package manager instead of yum, so we can use all the dnf codepaths
# that were originally written for CentOS8 in this CentOS7 image too
RUN yum install -y dnf
diff --git a/centos7-obs-latest/Dockerfile b/centos7-obs-latest/Dockerfile
index 2c06882..7da0db3 100644
--- a/centos7-obs-latest/Dockerfile
+++ b/centos7-obs-latest/Dockerfile
@@ -6,6 +6,13 @@
ARG OSMOCOM_REPO_PATH="packages/osmocom:"
ARG OSMOCOM_REPO_VERSION="latest"
+# Use vault.centos.org instead of mirrorlist.centos.org, which doesn't exist
+# anymore (see https://serverfault.com/a/1161847).
+RUN set -x && \
+ sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
+
# Use dnf package manager instead of yum, so we can use all the dnf codepaths
# that were originally written for CentOS8 in this CentOS7 image too
RUN yum install -y dnf
To view, visit change 37467. To unsubscribe, or for help writing mail filters, visit settings.