Drop root for Magnum

This change ensures commands run in the magnum containers are done as the
'magnum' user rather than root.

Change-Id: I18e2febae98aae6d6fc6c61cc2817442f408cb75
Partially-Implements: blueprint drop-root
This commit is contained in:
Paul Bourke 2015-11-17 17:54:21 +00:00
parent df0ef8ddb5
commit 1a536124ad
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -16,3 +16,5 @@ RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/release
{% endif %}
{{ include_footer }}
USER magnum