From 8ba0faf6337b50696862c0b712e1deb6441555e5 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 27 Aug 2015 10:38:24 +0000 Subject: [PATCH] Unify Centos and Ubuntu Source Install - Swift 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: Ie6f81d4d1ce8e6d8bc830f0af3c684671df5545f Partially-Implements: blueprint install-from-ubuntu --- docker_templates/swift/swift-base/Dockerfile.j2 | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docker_templates/swift/swift-base/Dockerfile.j2 b/docker_templates/swift/swift-base/Dockerfile.j2 index eee2324d01..7102916f17 100644 --- a/docker_templates/swift/swift-base/Dockerfile.j2 +++ b/docker_templates/swift/swift-base/Dockerfile.j2 @@ -15,16 +15,13 @@ RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} -ADD ./swift.tar / -RUN ln -s /swift-* /swift - -RUN cd /swift \ +ADD swift.tar / +RUN ln -s /swift-* swift \ && useradd --user-group swift \ - && pip install -r requirements.txt \ - && pip install /swift \ - && mkdir /etc/swift /var/log/swift \ + && pip --no-cache-dir install /swift \ + && mkdir -p /etc/swift /var/log/swift /home/swift \ && cp -r /swift/etc/* /etc/swift/ \ - && rm -rf /root/.cache + && chown -R swift: /etc/swift /var/log/swift /home/swift {% endif %}