50 lines
1.2 KiB
Django/Jinja
50 lines
1.2 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
{% block tacker_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{{ macros.configure_user(name='tacker') }}
|
|
|
|
{% if install_type == 'binary' %}
|
|
|
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
{% set tacker_packages = [
|
|
'openstack-tacker'
|
|
] %}
|
|
|
|
{% elif base_distro in ['debian', 'ubuntu'] %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(tacker_packages | customizable("packages")) }}
|
|
|
|
{% elif install_type == 'source' %}
|
|
|
|
ADD tacker-archive /tacker-source
|
|
|
|
{% set tacker_pip_packages = [
|
|
'/tacker'
|
|
] %}
|
|
|
|
RUN ln -s tacker-source/* tacker \
|
|
&& {{ macros.install_pip(tacker_pip_packages | customizable("pip_packages")) }} \
|
|
&& mkdir -p /etc/tacker \
|
|
&& cp -r /tacker/etc/tacker/* /etc/tacker \
|
|
&& chown -R tacker: /etc/tacker
|
|
|
|
{% endif %}
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
|
|
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
|
|
|
{% block tacker_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER tacker
|