Delfino Curado 965e897c71 Add priority to repositories in base-image
Now it's possible to add a priority for each repo through
--repo-priority on command line and cfg file as well.

This is need because of the usage of ceph mirror and to force the
images to use ceph packages on that repo.

Test plan:

Docker images build succeeded.
stx-openstack apply succeeded.

Closes-Bug: #1949518
Signed-off-by: Delfino Curado <delfinogomes.curadofilho@windriver.com>
Change-Id: I202904dccdd727a05bb4d621c4ad735f60221b81
2021-11-09 11:47:48 -05:00

34 lines
833 B
Docker

# Expected build arguments:
# RELEASE: centos release
# REPO_OPTS: yum options to enable StarlingX repo
#
ARG RELEASE=7.5.1804
FROM centos:${RELEASE}
ARG REPO_OPTS
# The stx.repo file must be generated by the build tool first
COPY stx.repo /
RUN set -ex ;\
sed -i '/\[main\]/ atimeout=120' /etc/yum.conf ;\
mv /stx.repo /etc/yum.repos.d/ ;\
yum upgrade --disablerepo=* ${REPO_OPTS} -y ;\
yum install --disablerepo=* ${REPO_OPTS} -y \
yum-priorities ;\
yum install --disablerepo=* ${REPO_OPTS} -y \
qemu-img \
openssh-clients \
python3 \
python3-pip \
python3-wheel \
rh-python36-mod_wsgi \
;\
rm -rf \
/var/log/* \
/tmp/* \
/var/tmp/*
# root CA cert expired on October 1st, 2021
RUN yum update -y ca-certificates