From 503120657e9e4def55a2d3397c44bd4d1e110c52 Mon Sep 17 00:00:00 2001 From: Shaun Smekel Date: Fri, 12 Aug 2016 07:16:19 +1000 Subject: Customizations for Swift This patchset contains customization of Dockerfile of Swift containers. Change-Id: I69250c4d9f6cc3949c9b9b52ea4b0cc2aec0231e Partially-implements: blueprint third-party-plugin-support --- docker/swift/swift-base/Dockerfile.j2 | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'docker/swift/swift-base') diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 index 2e05ac29f..15bf9ee49 100644 --- a/docker/swift/swift-base/Dockerfile.j2 +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -1,35 +1,25 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} + {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - openstack-swift \ - && yum clean all - + {% set swift_base_packages = ['openstack-swift'] %} {% elif base_distro in ['ubuntu'] %} + {% set swift_base_packages = ['swift'] %} + {% endif %} -RUN apt-get -y install --no-install-recommends \ - swift \ - && apt-get clean +RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }} - {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - liberasurecode-devel \ - && yum clean all - + {% set swift_base_packages = ['liberasurecode-devel'] %} {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get -y install --no-install-recommends \ - liberasurecode-dev \ - && apt-get clean - + {% set swift_base_packages = ['liberasurecode-dev'] %} {% endif %} +RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }} ADD swift-base-archive /swift-base-source RUN ln -s swift-base-source/* swift \ && useradd --user-group swift \ @@ -56,3 +46,6 @@ COPY build-swift-ring.py /usr/local/bin/kolla_build_swift_ring RUN mkdir -p /opt/swift RUN usermod -a -G kolla swift + +{% block swift_base_footer %}{% endblock %} +{% block footer %}{% endblock %} -- cgit v1.2.3