Add Apache2 to Cinder containers (#5)

* Add Apache2 to Cinder containers

* Fix Cinder config

* Fix typo in cinder

* remove centos-logos package
This commit is contained in:
Pete Birley 2017-01-16 19:24:49 +00:00 committed by Sam Yaple
parent 057889e1ed
commit 0d4576901a
3 changed files with 43 additions and 4 deletions

View File

@ -12,6 +12,9 @@ RUN set -x \
&& yum install --setopt=tsflags=nodocs -y \
# Project specific packages start
python \
httpd \
mod_ssl \
mod_wsgi \
# Project specific packages end
&& yum install --setopt=tsflags=nodocs -y git \
# common install start
@ -41,9 +44,25 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/cinder/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
# Disable default apache config:
&& sed -i 's/^Listen 80/#Listen 80/' /etc/httpd/conf/httpd.conf \
&& rm /etc/httpd/conf.d/* \
# Provide compatibility with ubuntu/debian apache:
&& ln -s /usr/sbin/httpd /usr/sbin/apache2 \
&& mkdir -p /etc/apache2/conf-enabled \
&& echo "IncludeOptional /etc/apache2/conf-enabled/*.conf" >> /etc/httpd/conf/httpd.conf \
&& mkdir -p /etc/apache2/mods-available \
&& echo "Include /etc/apache2/mods-available/*.conf" >> /etc/httpd/conf/httpd.conf \
&& touch /etc/apache2/envvars \
# Project specific command block end
&& yum history -y undo $(yum history list git | tail -2 | head -1 | awk '{ print $1}') \
&& rpm -e --nodeps centos-logos \
&& yum clean all \
&& rm -rf /tmp/* /root/.cache \
&& pip uninstall pip wheel -y \

View File

@ -1,6 +1,6 @@
FROM debian:jessie
ENV PROJECT=keystone
ENV PROJECT=cinder
ARG DOCKER_REPO=yaodu/openstack-requirements
ARG DOCKER_TAG=latest
ARG WHEELS
@ -16,6 +16,8 @@ RUN set -x \
# Project specific packages start
python \
python-rados \
apache2 \
libapache2-mod-wsgi \
# Project specific packages end
&& apt-get install -y --no-install-recommends ca-certificates curl git \
# common install start
@ -45,7 +47,15 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/cinder/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
# Disable default apache config:
&& rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/* /etc/apache2/sites-available/* \
&& touch /etc/apache2/ports.conf \
# Project specific command block end
&& apt-get purge -y --auto-remove ca-certificates curl git \
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \

View File

@ -16,6 +16,8 @@ RUN set -x \
# Project specific packages start
python \
python-rados \
apache2 \
libapache2-mod-wsgi \
# Project specific packages end
&& apt-get install -y --no-install-recommends ca-certificates curl git \
# common install start
@ -45,7 +47,15 @@ RUN set -x \
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
# common install end
# Project specific command block start
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt \
python-memcached \
pymysql \
&& cp -rfv /tmp/${PROJECT}/etc/cinder/* /etc/${PROJECT}/ \
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
&& chown root:root /etc/${PROJECT}/policy.json \
# Disable default apache config:
&& rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/* /etc/apache2/sites-available/* \
&& touch /etc/apache2/ports.conf \
# Project specific command block end
&& apt-get purge -y --auto-remove ca-certificates curl git \
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \