From aa23b041b133c032efce238afb529e840fac58a8 Mon Sep 17 00:00:00 2001 From: Davlet Panech Date: Mon, 29 Jun 2020 10:45:31 -0400 Subject: [PATCH] Dockerfile: add mirror repos to global yum config Copy mirror repo files to /etc/yum.repos.d because tb.sh needs them. This change fixes a problem introduced by Commit: 78263e8784c5f596af2a20b9c6e214fc6fea4878 Dockerfile: pin centos & epel repo versions that caused centos-mirror-tools/download_mirror.sh to fail when executed from a docker container created by tb.sh -- "rpm not found" for most packages being downloaded. This is because download_mirror.sh without additional arguments expects toCOPY/yum.repos.d/ files to have been copied to /etc/yum.repos.d/ in the docker container by default. Change-Id: If214aea6560632837d0f196c21801fc2d06c8259 Closes-Bug: 1885624 Signed-off-by: Davlet Panech --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index da03b3ef..cf646b60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -251,6 +251,17 @@ RUN chown $MYUNAME /home/$MYUNAME && \ runuser -u $MYUNAME -- git config --global user.name $MYUNAME && \ runuser -u $MYUNAME -- git config --global color.ui false +# Customizations for mirror creation +RUN rm /etc/yum.repos.d/* +COPY centos-mirror-tools/yum.repos.d/* /etc/yum.repos.d/ +COPY centos-mirror-tools/rpm-gpg-keys/* /etc/pki/rpm-gpg/ + +# Import GPG keys +RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* + +# Try to continue a yum command even if a StarlingX repo is unavailable. +RUN yum-config-manager --setopt=StarlingX\*.skip_if_unavailable=1 --save + # When we run 'init' below, it will run systemd, and systemd requires RTMIN+3 # to exit cleanly. By default, docker stop uses SIGTERM, which systemd ignores. STOPSIGNAL RTMIN+3