aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-11-09 18:24:06 -0500
committerSteven Dake <stdake@cisco.com>2015-11-11 14:50:02 -0500
commitd11b8f260b2f557302ee6c4b69921d5b9c1c6f57 (patch)
treea445b85eb70a434a57e80dd089dcc8cf56cd53a7 /docker
parent5e15ee16deddfa84c765a6cbf72df0a63ef7c78d (diff)
downloadkolla-d11b8f260b2f557302ee6c4b69921d5b9c1c6f57.tar.gz
kolla-d11b8f260b2f557302ee6c4b69921d5b9c1c6f57.zip
Drop root for heat
Drop root user for heat containers. Change-Id: Ib07c0193f97bb18cc6154b4015b4056fd983f6c1 Partially-Implements: blueprint drop-root
Diffstat (limited to 'docker')
-rw-r--r--docker/heat/heat-api-cfn/Dockerfile.j22
-rw-r--r--docker/heat/heat-api/Dockerfile.j22
-rw-r--r--docker/heat/heat-api/extend_start.sh2
-rw-r--r--docker/heat/heat-base/Dockerfile.j22
-rw-r--r--docker/heat/heat-engine/Dockerfile.j22
5 files changed, 9 insertions, 1 deletions
diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2
index 1146ee326..658b6aa28 100644
--- a/docker/heat/heat-api-cfn/Dockerfile.j2
+++ b/docker/heat/heat-api-cfn/Dockerfile.j2
@@ -10,4 +10,6 @@ RUN yum -y install openstack-heat-api-cfn \
{% endif %}
{% endif %}
+USER heat
+
{{ include_footer }}
diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2
index e425e4ebc..026d8fc59 100644
--- a/docker/heat/heat-api/Dockerfile.j2
+++ b/docker/heat/heat-api/Dockerfile.j2
@@ -13,4 +13,6 @@ RUN yum -y install openstack-heat-api \
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
+USER heat
+
{{ include_footer }}
diff --git a/docker/heat/heat-api/extend_start.sh b/docker/heat/heat-api/extend_start.sh
index f04438a78..6c4fc431f 100644
--- a/docker/heat/heat-api/extend_start.sh
+++ b/docker/heat/heat-api/extend_start.sh
@@ -3,7 +3,7 @@
# 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 heat heat-manage db_sync
+ heat-manage db_sync
openstack domain create heat_user_domain
openstack user create --domain heat_user_domain heat_domain_admin --password ${HEAT_DOMAIN_ADMIN_PASSWORD}
openstack role add --domain heat_user_domain --user heat_domain_admin admin
diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2
index c9ab54efc..9d47d3b3d 100644
--- a/docker/heat/heat-base/Dockerfile.j2
+++ b/docker/heat/heat-base/Dockerfile.j2
@@ -20,3 +20,5 @@ RUN ln -s heat-base-source/* heat \
&& chown -R heat: /etc/heat /var/log/heat /home/heat
{% endif %}
+
+RUN usermod -a -G kolla heat
diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2
index 1a0b9b1dc..7dcf0735c 100644
--- a/docker/heat/heat-engine/Dockerfile.j2
+++ b/docker/heat/heat-engine/Dockerfile.j2
@@ -15,4 +15,6 @@ RUN yum -y install \
{% endif %}
{% endif %}
+USER heat
+
{{ include_footer }}