From 3eb82949c2cd2f4c308f62e5a3a0ddede3179854 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 28 Jul 2016 15:30:41 +0100 Subject: [PATCH] Customizations for haproxy This patchset contains customization of Dockerfile of haproxy containers Change-Id: I67790816766641ebc3138d6b3726f0bbd9c68038 Partially-implements: blueprint third-party-plugin-support Signed-off-by: Eduardo Gonzalez --- docker/haproxy/Dockerfile.j2 | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 index 922f520545..e1539d3b7b 100644 --- a/docker/haproxy/Dockerfile.j2 +++ b/docker/haproxy/Dockerfile.j2 @@ -1,19 +1,10 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} -{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} +{% import "macros.j2" as macros with context %} -RUN yum -y install \ - haproxy \ - && yum clean all - -{% elif base_distro in ['debian', 'ubuntu'] %} - -RUN apt-get -y install --no-install-recommends \ - haproxy \ - && apt-get clean - -{% endif %} +{% set haproxy_packages = ['haproxy'] %} +RUN {{ macros.install_packages(haproxy_packages | customizable("packages")) }} RUN usermod -a -G kolla haproxy \ && mkdir -p /var/lib/kolla/haproxy \ @@ -22,4 +13,6 @@ RUN usermod -a -G kolla haproxy \ COPY ensure_latest_config.sh /usr/local/bin/kolla_ensure_haproxy_latest_config RUN chmod 755 /usr/local/bin/kolla_ensure_haproxy_latest_config +{% block haproxy_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }}