From 2eac7ab9cef18134f435b7e47cbdc81611fbbac1 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 27 Aug 2015 09:45:15 +0000 Subject: [PATCH] Unify Centos and Ubuntu Source Install - Glance A change merged in the base allows for Centos and Ubuntu to install all python things to the same locations. This updates the source section to reflect that change. Change-Id: Icc6c4ab8dee644a297f7a75b734466e617e0ee30 Partially-Implements: blueprint install-from-ubuntu --- docker_templates/glance/glance-base/Dockerfile.j2 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docker_templates/glance/glance-base/Dockerfile.j2 b/docker_templates/glance/glance-base/Dockerfile.j2 index 181a78d56a..8fad821060 100644 --- a/docker_templates/glance/glance-base/Dockerfile.j2 +++ b/docker_templates/glance/glance-base/Dockerfile.j2 @@ -17,16 +17,12 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD ./glance.tar / -RUN ln -s /glance-* /glance - -RUN cd /glance \ +ADD glance.tar / +RUN ln -s /glance-* glance \ && useradd --user-group glance \ - && pip install -r requirements.txt \ - && pip install --install-option="--install-scripts=/usr/bin" /glance \ + && pip --no-cache-dir install /glance \ && mkdir -p /etc/glance /var/log/glance /home/glance \ && cp -r /glance/etc/* /etc/glance/ \ - && chown -R glance: /etc/glance /var/log/glance /home/glance \ - && rm -rf /root/.cache + && chown -R glance: /etc/glance /var/log/glance /home/glance {% endif %}