83987b16a6
In the aarch64 image build, use debian_arch to determine packages of different architectures. Closes-Bug: #2036874 Change-Id: Ic86e6c22840f658bb68387aac688918d4db1f766 (cherry picked from commit 0eed86bb02e87c12098e52359897708e071aa07e)
50 lines
1.4 KiB
Django/Jinja
50 lines
1.4 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }}
|
|
{% block labels %}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
{% endblock %}
|
|
|
|
{% block zun_cni_daemon_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if install_type == 'binary' %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% elif install_type == 'source' %}
|
|
{% if base_package_type == 'rpm' %}
|
|
|
|
{% set zun_cni_daemon_packages = [
|
|
'openvswitch'
|
|
] %}
|
|
|
|
{% elif base_package_type == 'deb' %}
|
|
|
|
{% set zun_cni_daemon_packages = [
|
|
'bridge-utils',
|
|
'openvswitch-switch'
|
|
] %}
|
|
|
|
{% endif %}
|
|
{{ macros.install_packages(zun_cni_daemon_packages | customizable("packages")) }}
|
|
|
|
{% endif %}
|
|
|
|
COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers
|
|
|
|
RUN chmod 750 /etc/sudoers.d \
|
|
&& chmod 640 /etc/sudoers.d/kolla_zun_sudoers
|
|
|
|
{% block zun_cni_daemon_version %}
|
|
ARG zun_cni_daemon_version=0.7.1
|
|
ARG zun_cni_daemon_url=https://github.com/containernetworking/plugins/releases/download/v${zun_cni_daemon_version}/cni-plugins-{{debian_arch}}-v${zun_cni_daemon_version}.tgz
|
|
{% endblock %}
|
|
|
|
RUN curl -o /tmp/cni-plugins.tgz ${zun_cni_daemon_url} \
|
|
&& tar -C /opt -xzvf /tmp/cni-plugins.tgz ./loopback \
|
|
&& rm -f /tmp/cni-plugins.tgz
|
|
|
|
{% block zun_cni_daemon_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|