f44366c722
Only attempt to install plugins in these images if the user has enabled them. Change-Id: I78dd929b0c43b577e443a8226a8d5b9a9c868626
35 lines
866 B
Django/Jinja
35 lines
866 B
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
USER root
|
|
|
|
{% block neutron_server_ovn %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if install_type == 'binary' %}
|
|
{% set neutron_server_ovn_packages = [
|
|
'python-networking-ovn',
|
|
] %}
|
|
|
|
{{ macros.install_packages(neutron_server_ovn_packages | customizable("packages")) }}
|
|
|
|
{% elif install_type == 'source' %}
|
|
|
|
ADD plugins-archive /
|
|
|
|
{% set neutron_server_ovn_plugins_pip_packages = [
|
|
'/plugins/*'
|
|
] %}
|
|
|
|
RUN if [ "$(ls /plugins)" ]; then \
|
|
{{ macros.install_pip(neutron_server_ovn_plugins_pip_packages | customizable("pip_packages")) }}; \
|
|
fi
|
|
|
|
{% endif %}
|
|
|
|
{% block neutron_server_ovn_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER neutron
|