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:78263e8784
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. Partial-Bug: 1884944 Depends-On: https://review.opendev.org/#/c/737823/ Change-Id: If214aea6560632837d0f196c21801fc2d06c8259 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> (cherry picked from commitaa23b041b1
)
This commit is contained in:
parent
8332f66461
commit
ec379155ae
11
Dockerfile
11
Dockerfile
|
@ -247,6 +247,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
|
||||
|
|
Loading…
Reference in New Issue