kolla/docker/zun/zun-cni-daemon/Dockerfile.j2
Marcin Juszkiewicz e21aeb5ae9 flatten images a bit
As we have one type of images now some RUN calls could be merged so we
will have less layers in resulting images.

Change-Id: I5178c58fbd8c65efe825dc249c0f1368ef0fe8e0
2022-04-21 18:53:14 +00:00

41 lines
1.2 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 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")) }}
{% 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-amd64-v${zun_cni_daemon_version}.tgz
{% endblock %}
COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers
RUN chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_zun_sudoers \
&& 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 %}