diff options
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/zun/zun-cni-daemon/Dockerfile.j2 | 40 | ||||
| -rw-r--r-- | docker/zun/zun-cni-daemon/zun_sudoers | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/docker/zun/zun-cni-daemon/Dockerfile.j2 b/docker/zun/zun-cni-daemon/Dockerfile.j2 new file mode 100644 index 000000000..dc4a05e37 --- /dev/null +++ b/docker/zun/zun-cni-daemon/Dockerfile.j2 @@ -0,0 +1,40 @@ +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_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/docker/zun/zun-cni-daemon/zun_sudoers b/docker/zun/zun-cni-daemon/zun_sudoers new file mode 100644 index 000000000..fd35f4cb5 --- /dev/null +++ b/docker/zun/zun-cni-daemon/zun_sudoers @@ -0,0 +1 @@ +zun ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/zun-rootwrap /etc/zun/rootwrap.conf * |
