From f88ca0f862da4b040b9e0aaac7ac1b952bd0c08b Mon Sep 17 00:00:00 2001 From: Martin André Date: Thu, 23 Mar 2017 09:45:50 +0100 Subject: Prevent apache from listening on port 80 A few new images got apache as part of blueprint apache-packages-for-apis without restricting it to listen on port 80. This commit fixes it for all images with the exception of heat-base so that it can be cleanly backported to stable/ocata. Co-Authored-By: Juan Antonio Osorio Robles Change-Id: Idd3bbeffea9233eaed420798e22ea9a3a517c166 Closes-Bug: #1675308 --- docker/cinder/cinder-api/Dockerfile.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docker/cinder') diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index ac2860c89..6c6800fba 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -12,14 +12,17 @@ MAINTAINER {{ maintainer }} 'httpd', 'mod_wsgi' ] %} +{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} +RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf {% elif base_distro in ['ubuntu'] %} {% set cinder_api_packages = [ 'cinder-api', 'apache2', 'libapache2-mod-wsgi' ] %} - {% endif %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} +RUN echo > /etc/apache2/ports.conf + {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} @@ -27,13 +30,16 @@ MAINTAINER {{ maintainer }} 'httpd', 'mod_wsgi' ] %} +{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} +RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf {% elif base_distro in ['ubuntu'] %} {% set cinder_api_packages = [ 'apache2', 'libapache2-mod-wsgi' ] %} - {% endif %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} +RUN echo > /etc/apache2/ports.conf + {% endif %} {% endif %} -- cgit v1.2.3