Drop root for cinder
Updates to ensure commands run in the cinder containers are done as the 'cinder' user rather than root. Change-Id: Ibbe04e3a92195dfb957fa56f762c60a80dbe30ca Partially-Implements: blueprint drop-root
This commit is contained in:
parent
917b4df01e
commit
a8661deac6
@ -14,3 +14,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|||||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||||
|
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
|
USER cinder
|
||||||
|
@ -4,6 +4,6 @@ set -o errexit
|
|||||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
sudo -H -u cinder cinder-manage db sync
|
cinder-manage db sync
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -2,3 +2,5 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
|
|||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
|
USER cinder
|
||||||
|
@ -37,3 +37,5 @@ RUN ln -s cinder-base-source/* cinder \
|
|||||||
&& chown -R cinder: /etc/cinder /var/log/cinder /home/cinder
|
&& chown -R cinder: /etc/cinder /var/log/cinder /home/cinder
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN usermod -a -G kolla cinder
|
||||||
|
@ -2,3 +2,5 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
|
|||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
|
USER cinder
|
||||||
|
@ -13,3 +13,5 @@ RUN yum install -y \
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
|
USER cinder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user