kolla/docker/heat/heat-base/Dockerfile.j2
Vladislav Belogrudov c22cf33268 Allow arbitrary source archive name to be imported into Dockerfile
Currently we cannot import source archives with names different
than expected by hardcoded line in Dockerfiles. This worked well
for Openstack services' tarballs where we expected SERVICE-* root
folder after extraction or kanaka-noVNC for nova-novncproxy docker.
The latter fails if one tries to clone or get tarball under other
names. This fix allows any archive (tar,tgz,zip) or repo name to be
imported into dockerfile.

Change-Id: I869a6a19afaf0e93925572746c22b7589b6600c9
Closes-Bug: #1491415
2015-09-03 16:49:50 +03:00

28 lines
812 B
Django/Jinja

FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install \
python-oslo-reports \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% elif install_type == 'source' %}
ADD heat-base-archive /heat-base-source
RUN ln -s heat-base-source/* heat \
&& useradd --user-group heat \
&& pip --no-cache-dir install /heat \
&& mkdir -p /etc/heat /var/log/heat /home/heat \
&& cp -r /heat/etc/heat/* /etc/heat/ \
&& chown -R heat: /etc/heat /var/log/heat /home/heat
{% endif %}