aboutsummaryrefslogtreecommitdiff
path: root/docker/swift/swift-base
diff options
context:
space:
mode:
authorShaun Smekel <shaun.smekel@theorem.net.au>2016-08-12 07:16:19 +1000
committerShaun Smekel <shaun.smekel@theorem.net.au>2016-08-12 07:16:19 +1000
commit503120657e9e4def55a2d3397c44bd4d1e110c52 (patch)
tree374a32dd5dc8818b4a2a88404590f3cec2eaf4e3 /docker/swift/swift-base
parente4259f805b91ce0859e7190f97f8dbf34ee92e45 (diff)
downloadkolla-503120657e9e4def55a2d3397c44bd4d1e110c52.tar.gz
kolla-503120657e9e4def55a2d3397c44bd4d1e110c52.zip
Customizations for Swift
This patchset contains customization of Dockerfile of Swift containers. Change-Id: I69250c4d9f6cc3949c9b9b52ea4b0cc2aec0231e Partially-implements: blueprint third-party-plugin-support
Diffstat (limited to 'docker/swift/swift-base')
-rw-r--r--docker/swift/swift-base/Dockerfile.j231
1 files changed, 12 insertions, 19 deletions
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 %}