aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-09-12 07:47:13 -0700
committerSteven Dake <stdake@cisco.com>2015-09-12 18:39:31 -0700
commit4a79ce404198568a86571b0c9c32567a725aac1a (patch)
treeee3e16f45e50efd85fc46572396f890f05bf3712 /docker
parent7740c2aa25a567a038d0fbd8609d697ac196243b (diff)
downloadkolla-4a79ce404198568a86571b0c9c32567a725aac1a.tar.gz
kolla-4a79ce404198568a86571b0c9c32567a725aac1a.zip
Make RHEL build from source
This patch enables building from source in RHEL. It works by making the repositoroies specific to RHEL7 run in either from source or from binary/rhos builds. Change-Id: I795284cccc87c4a87d58c93ec73b3f9ea08878f2 Partially-Implements: blueprint rhel-based-image-support
Diffstat (limited to 'docker')
-rw-r--r--docker/base/Dockerfile.j217
1 files changed, 9 insertions, 8 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 71e6edf53..26bb55add 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -14,6 +14,15 @@ COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo
RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm \
&& sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo
+{% if base_distro == 'rhel' %}
+# Turn on EPEL, rhel7-extras, and rhel7-optional throughout all builds for RHEL
+RUN yum install -y \
+ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+ && subscription-manager repos --enable rhel-7-server-optional-rpms \
+ && subscription-manager repos --enable rhel-7-server-extras-rpms \
+ && yum clean all
+{% endif %}
+
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
@@ -41,14 +50,6 @@ RUN yum install -y \
RUN yum-config-manager --enable ol7_optional_latest ol7_addons
{% endif %}
-{% if base_distro == 'rhel' %}
-RUN yum install -y \
- https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
- && subscription-manager repos --enable rhel-7-server-optional-rpms \
- && subscription-manager repos --enable rhel-7-server-extras-rpms \
- && yum clean all
-{% endif %}
-
# Endif for base_distro centos/oraclelinux
{% elif base_distro == 'fedora' %}