diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/docker/magnum/magnum-api/Dockerfile.j2 index 3a613ab34c..f1264f5dfc 100644 --- a/docker/magnum/magnum-api/Dockerfile.j2 +++ b/docker/magnum/magnum-api/Dockerfile.j2 @@ -14,3 +14,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start {{ include_footer }} + +USER magnum diff --git a/docker/magnum/magnum-api/extend_start.sh b/docker/magnum/magnum-api/extend_start.sh index f6db675568..0f92f6e7bf 100644 --- a/docker/magnum/magnum-api/extend_start.sh +++ b/docker/magnum/magnum-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 magnum magnum-db-manage upgrade + magnum-db-manage upgrade exit 0 fi diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/docker/magnum/magnum-conductor/Dockerfile.j2 index 4e9eaef437..e31e46f994 100644 --- a/docker/magnum/magnum-conductor/Dockerfile.j2 +++ b/docker/magnum/magnum-conductor/Dockerfile.j2 @@ -16,3 +16,5 @@ RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/release {% endif %} {{ include_footer }} + +USER magnum