Files
kolla/docker/neutron/neutron-mlnx-agent/Dockerfile.j2
Marcin Juszkiewicz 19e40f1608 docker: implement macros to alter upper-constraints.txt
upper_constraints_remove() macro allows to remove line
upper_constraints_version_change() allows to change versions

This way we have cleaner way to alter u-c in those images which need it.

Change-Id: I8fc354b8aa4d03fcd3ecfb9cbfe75de67492a0e3
2023-04-21 14:13:24 +02:00

31 lines
933 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block neutron_mlnx_agent_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.enable_extra_repos(['libvirt']) }}
{% set neutron_mlnx_agent_packages = [
'python3-libvirt',
'python3-ethtool',
] %}
{{ macros.install_packages(neutron_mlnx_agent_packages | customizable("packages")) }}
{% set neutron_mlnx_agent_pip_packages = [
'networking-mlnx',
] %}
{# NOTE(hrw): pyzmq 20 fails to build while 19.* and 21.* build fine. #}
RUN {{ macros.upper_constraints_version_change("pyzmq", "20.0.0", "21.*") }} \
&& {{ macros.install_pip(neutron_mlnx_agent_pip_packages | customizable("pip_packages")) }}
{% block neutron_mlnx_agent_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER neutron