diff options
| author | akwasniewska <alicja.kwasniewska@intel.com> | 2015-08-12 04:31:42 +0200 |
|---|---|---|
| committer | akwasniewska <alicja.kwasniewska@intel.com> | 2015-08-12 08:05:22 +0200 |
| commit | f373e81b20c7bcaaf093a86b9778ca858c7b892d (patch) | |
| tree | 4c955aef695d7a8e656a5d71db94f663bc29fac5 | |
| parent | 671014e7a6451bf8a7f8ea7c04208d6a22f27370 (diff) | |
| download | kolla-f373e81b20c7bcaaf093a86b9778ca858c7b892d.tar.gz kolla-f373e81b20c7bcaaf093a86b9778ca858c7b892d.zip | |
Add Dockerfile template for horizon
Change-Id: I2210a75c6803e41fa8cfd49a377e7948dcb64bc6
Partially-Implements: blueprint dockerfile-template
| -rw-r--r-- | docker_templates/horizon/Dockerfile.j2 | 50 | ||||
| l--------- | docker_templates/horizon/config-external.sh | 1 | ||||
| l--------- | docker_templates/horizon/start.sh | 1 |
3 files changed, 52 insertions, 0 deletions
diff --git a/docker_templates/horizon/Dockerfile.j2 b/docker_templates/horizon/Dockerfile.j2 new file mode 100644 index 000000000..d1ee8592e --- /dev/null +++ b/docker_templates/horizon/Dockerfile.j2 @@ -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"] diff --git a/docker_templates/horizon/config-external.sh b/docker_templates/horizon/config-external.sh new file mode 120000 index 000000000..32f0838d6 --- /dev/null +++ b/docker_templates/horizon/config-external.sh @@ -0,0 +1 @@ +../../docker/common/horizon/config-external.sh
\ No newline at end of file diff --git a/docker_templates/horizon/start.sh b/docker_templates/horizon/start.sh new file mode 120000 index 000000000..16347cc9b --- /dev/null +++ b/docker_templates/horizon/start.sh @@ -0,0 +1 @@ +../../docker/common/horizon/start.sh
\ No newline at end of file |
