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 %}