aboutsummaryrefslogtreecommitdiff
path: root/docker/zun
diff options
context:
space:
mode:
authorChao Guo <guochao@winhong.com>2017-01-17 16:49:13 +0800
committerMauricio Lima <mauriciolimab@gmail.com>2017-02-17 08:49:32 -0300
commit961224c6cf5ac24fc49fc52ab3c51a87348ee35d (patch)
tree23301c12bfd158395e089b7563f0c7058cd2fb6e /docker/zun
parentdab3b8e8b95cd09f7cc0f99e853cc84b0e1f2638 (diff)
downloadkolla-961224c6cf5ac24fc49fc52ab3c51a87348ee35d.tar.gz
kolla-961224c6cf5ac24fc49fc52ab3c51a87348ee35d.zip
Use install-pip macro in most source images
1. Enable customization of pip packages in source branch of most images 2. All pip packages install uniformly through install-pip macro, user can easily customize his own pip command (For example using a mirror) Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com> Change-Id: If09582039f690fa4136e8f33200d5da15e092da7
Diffstat (limited to 'docker/zun')
-rw-r--r--docker/zun/zun-base/Dockerfile.j29
1 files changed, 8 insertions, 1 deletions
diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2
index a7b0da834..fe0e97a08 100644
--- a/docker/zun/zun-base/Dockerfile.j2
+++ b/docker/zun/zun-base/Dockerfile.j2
@@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
{% block zun_base_header %}{% endblock %}
+{% import "macros.j2" as macros with context %}
+
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
@@ -11,9 +13,14 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% elif install_type == 'source' %}
ADD zun-base-archive /zun-base-source
+
+{% set zun_base_pip_packages = [
+ '/zun'
+] %}
+
RUN ln -s zun-base-source/* zun \
&& useradd --user-group --create-home --home-dir /var/lib/zun zun \
- && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /zun \
+ && {{ macros.install_pip(zun_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/zun \
&& cp -r /zun/etc/* /etc/zun/ \
&& chown -R zun: /etc/zun