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 4b792b9a43)
This commit is contained in:
Mark Goddard 2020-11-17 14:40:32 +00:00 committed by Radosław Piliszek
parent 36126c0825
commit 297c15de4b
7 changed files with 11 additions and 4 deletions

View File

@ -35,4 +35,3 @@ RUN chmod 750 /etc/sudoers.d \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cyborg_extend_start
{% block cyborg_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

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

View File

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

View File

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

View File

@ -32,4 +32,3 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block ovsdpdk_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -12,4 +12,3 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{{ macros.install_packages(rsyslog_base_packages | customizable("packages")) }}
{% block rsyslog_base_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -27,4 +27,3 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block skydive_base_footer %}{% endblock %}
{% block footer %}{% endblock %}