Skip to content

Commit a11b99c

Browse files
committed
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 4b792b9)
1 parent e0d8772 commit a11b99c

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

docker/cyborg/cyborg-base/Dockerfile.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ RUN chmod 750 /etc/sudoers.d \
3737
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cyborg_extend_start
3838

3939
{% block cyborg_footer %}{% endblock %}
40-
{% block footer %}{% endblock %}

docker/mariadb/mariadb-base/Dockerfile.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2525
{{ macros.install_packages(mariadb_base_packages | customizable("packages")) }}
2626

2727
{% block mariadb_base_footer %}{% endblock %}
28-
{% block footer %}{% endblock %}

docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
33
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
44
{% endblock %}
55

6+
# This image inherits from neutron-server image, which is also a leaf image,
7+
# and therefore sets the user to neutron. Set the user to root, so that any
8+
# headers or footers used have the right context.
9+
USER root
10+
611
{% block neutron_infoblox_ipam_agent_header %}{% endblock %}
712

813
{% import "macros.j2" as macros with context %}

docker/neutron/neutron-server-ovn/Dockerfile.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
33
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
44
{% endblock %}
55

6+
# This image inherits from neutron-server image, which is also a leaf image,
7+
# and therefore sets the user to neutron. Set the user to root, so that any
8+
# headers or footers used have the right context.
9+
USER root
10+
611
{% block neutron_server_ovn %}{% endblock %}
712

813
{% import "macros.j2" as macros with context %}

docker/ovsdpdk/ovsdpdk/Dockerfile.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
3434
RUN chmod 755 /usr/local/bin/kolla_extend_start
3535

3636
{% block ovsdpdk_footer %}{% endblock %}
37-
{% block footer %}{% endblock %}

docker/rsyslog/rsyslog-base/Dockerfile.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1414
{{ macros.install_packages(rsyslog_base_packages | customizable("packages")) }}
1515

1616
{% block rsyslog_base_footer %}{% endblock %}
17-
{% block footer %}{% endblock %}

docker/skydive/skydive-base/Dockerfile.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
2525
RUN chmod 755 /usr/local/bin/kolla_extend_start
2626

2727
{% block skydive_base_footer %}{% endblock %}
28-
{% block footer %}{% endblock %}

0 commit comments

Comments
 (0)