Add Dockerfile template for horizon
Change-Id: I2210a75c6803e41fa8cfd49a377e7948dcb64bc6 Partially-Implements: blueprint dockerfile-template
This commit is contained in:
parent
671014e7a6
commit
f373e81b20
50
docker_templates/horizon/Dockerfile.j2
Normal file
50
docker_templates/horizon/Dockerfile.j2
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
|
||||||
|
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||||
|
|
||||||
|
{% if install_type == 'binary' %}
|
||||||
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||||
|
|
||||||
|
RUN yum -y install \
|
||||||
|
openstack-dashboard \
|
||||||
|
httpd \
|
||||||
|
mod_wsgi \
|
||||||
|
&& yum clean all \
|
||||||
|
&& chown -R apache:apache /usr/share/openstack-dashboard/static
|
||||||
|
|
||||||
|
# The chown is required because of this packaging bug:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1219006
|
||||||
|
|
||||||
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
|
||||||
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||||
|
&& /bin/false
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% elif install_type == 'source' %}
|
||||||
|
|
||||||
|
ADD ./horizon.tar /
|
||||||
|
RUN ln -s /horizon-* /horizon
|
||||||
|
|
||||||
|
RUN yum install -y \
|
||||||
|
httpd \
|
||||||
|
mod_wsgi \
|
||||||
|
&& yum clean all
|
||||||
|
|
||||||
|
RUN cd /horizon \
|
||||||
|
&& useradd --user-group horizon \
|
||||||
|
&& pip install -r requirements.txt \
|
||||||
|
&& pip install /horizon \
|
||||||
|
&& mkdir -p /etc/openstack-dashboard /var/log/horizon /usr/share/openstack-dashboard/static \
|
||||||
|
&& chown -R apache:apache /usr/share/openstack-dashboard/static \
|
||||||
|
&& rm -rf /root/.cache
|
||||||
|
|
||||||
|
# The chown is required because of this packaging bug:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1219006
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
COPY config-external.sh /opt/kolla/
|
||||||
|
COPY start.sh /
|
||||||
|
|
||||||
|
CMD ["/start.sh"]
|
1
docker_templates/horizon/config-external.sh
Symbolic link
1
docker_templates/horizon/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../docker/common/horizon/config-external.sh
|
1
docker_templates/horizon/start.sh
Symbolic link
1
docker_templates/horizon/start.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../docker/common/horizon/start.sh
|
Loading…
Reference in New Issue
Block a user