diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 index 2e1aec4cd9..bde6d4bed9 100644 --- a/docker/glance/glance-api/Dockerfile.j2 +++ b/docker/glance/glance-api/Dockerfile.j2 @@ -4,4 +4,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start +USER glance + {{ include_footer }} diff --git a/docker/glance/glance-api/extend_start.sh b/docker/glance/glance-api/extend_start.sh index fd70962ebd..6f3cab8307 100644 --- a/docker/glance/glance-api/extend_start.sh +++ b/docker/glance/glance-api/extend_start.sh @@ -3,6 +3,6 @@ # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # of the KOLLA_BOOTSTRAP variable being set, including empty. if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - sudo -H -u glance glance-manage db_sync + glance-manage db_sync exit 0 fi diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index 5ce5397bc8..447c2d5b9f 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -43,3 +43,5 @@ RUN ln -s glance-base-source/* glance \ && chown -R glance: /etc/glance /var/log/glance /home/glance {% endif %} + +RUN usermod -a -G kolla glance diff --git a/docker/glance/glance-registry/Dockerfile.j2 b/docker/glance/glance-registry/Dockerfile.j2 index 54710da06f..c3bdef8d80 100644 --- a/docker/glance/glance-registry/Dockerfile.j2 +++ b/docker/glance/glance-registry/Dockerfile.j2 @@ -1,4 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}glance-base:{{ tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) +USER glance + {{ include_footer }}