summaryrefslogtreecommitdiff
path: root/docker/neutron
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2020-11-17 14:40:32 +0000
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2021-01-23 08:51:55 +0000
commit297c15de4b92425286cba2eb3977ec5d877a7e9a (patch)
tree3ae86dc043f64cd811fe378584f8da4c1f6f7d97 /docker/neutron
parent36126c08255fcf8a201167b5d63f23f6bfdeceec (diff)
downloadkolla-297c15de4b92425286cba2eb3977ec5d877a7e9a.tar.gz
kolla-297c15de4b92425286cba2eb3977ec5d877a7e9a.zip
Remove footer block from intermediate images
Only the final image in a hierarchy should have the footer block. neutron-infoblox-ipam-agent image still has two footers because it inherits from the neutron-server image. We set the user to root at the beginning of that Dockerfile, so that headers and footers have the right context. Change-Id: I95e5bb5583be2a76e289749e8adfc303a4e7197a (cherry picked from commit 4b792b9a43bee3bfb499cea14924527550f2bce0)
Diffstat (limited to 'docker/neutron')
-rw-r--r--docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j25
-rw-r--r--docker/neutron/neutron-server-opendaylight/Dockerfile.j23
-rw-r--r--docker/neutron/neutron-server-ovn/Dockerfile.j23
3 files changed, 11 insertions, 0 deletions
diff --git a/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2 b/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2
index bc7dd9764..27c21fee1 100644
--- a/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2
+++ b/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2
@@ -1,6 +1,11 @@
FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+# This image inherits from neutron-server image, which is also a leaf image,
+# and therefore sets the user to neutron. Set the user to root, so that any
+# headers or footers used have the right context.
+USER root
+
{% block neutron_infoblox_ipam_agent_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
diff --git a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2
index 287274a5e..b7a69e557 100644
--- a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2
+++ b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2
@@ -1,6 +1,9 @@
FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+# This image inherits from neutron-server image, which is also a leaf image,
+# and therefore sets the user to neutron. Set the user to root, so that any
+# headers or footers used have the right context.
USER root
{% block neutron_server_opendaylight_header %}{% endblock %}
diff --git a/docker/neutron/neutron-server-ovn/Dockerfile.j2 b/docker/neutron/neutron-server-ovn/Dockerfile.j2
index 6e2b10cb0..c6c070470 100644
--- a/docker/neutron/neutron-server-ovn/Dockerfile.j2
+++ b/docker/neutron/neutron-server-ovn/Dockerfile.j2
@@ -1,6 +1,9 @@
FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+# This image inherits from neutron-server image, which is also a leaf image,
+# and therefore sets the user to neutron. Set the user to root, so that any
+# headers or footers used have the right context.
USER root
{% block neutron_server_ovn %}{% endblock %}