Skip to content

Commit 9c14e63

Browse files
Allow a mounted repository to be injected into yum
Mounting a yum repository file at /var/run/secrets/overrides.repo will allow any image based on this to use those repositories.
1 parent 2cbabda commit 9c14e63

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

images/base/Dockerfile

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
#
22
# This is the base image from which all OpenShift Origin images inherit. Only packages
3-
# common to all downstream images should be here. Depends on Centos 7.2+
3+
# common to all downstream images should be here. Depends on Centos 7.2+.
4+
#
5+
# This image accepts a mounted secret at /var/run/secrets/overrides.repo that will be
6+
# used to access packages if specified.
47
#
58
# The standard name for this image is openshift/origin-base
69
#
710
FROM centos:centos7
811

9-
# Until nss-3.21.0-9.el7_2 and openssl-libs-1.0.1e-51.el7_2.5.x86_64 is
10-
# released in the base image we need to manually update this to workaround an
11-
# issue where some of the mirrors are using a certificate
12-
RUN yum update -y nss openssl-libs && \
13-
yum clean all
14-
1512
RUN INSTALL_PKGS="which git tar wget hostname sysvinit-tools util-linux bsdtar epel-release \
1613
socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof" && \
14+
ln -s /var/run/secrets/overrides.repo /etc/yum.repos.d/ && \
1715
yum install -y $INSTALL_PKGS && \
1816
rpm -V $INSTALL_PKGS && \
1917
yum clean all && \

images/openvswitch/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# The standard name for this image is openshift/openvswitch
55
#
6-
FROM centos:centos7
6+
FROM openshift/origin-base
77

88
COPY scripts/* /usr/local/bin/
99

0 commit comments

Comments
 (0)