kolla/docker/rabbitmq/Dockerfile.j2
Marcin Juszkiewicz 4d31ca695b Move to Debian 'buster'
Buster is at freeze phase so safe to update and use. Will give us
Python 3 based OpenStack packages (usually release delayed).

Change-Id: I48c2d252a834716f1bcf10b18f2d32fe541e8137
2019-03-14 10:20:27 +00:00

80 lines
2.2 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block rabbitmq_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='rabbitmq') }}
{% block rabbitmq_install %}
{% if base_package_type == 'rpm' %}
# NOTE(mandre) Remove rabbitmq-server pinning once package dependencies are met
# https://bugs.launchpad.net/kolla/+bug/1814233
{% set rabbitmq_packages = [
'erlang-hipe',
'hostname',
'rabbitmq-server-3.7.10'
] %}
{% elif base_package_type == 'deb' %}
{% set rabbitmq_packages = [
'erlang-nox',
'logrotate'
] %}
{% if base_distro == 'debian' %}
{% set rabbitmq_packages = rabbitmq_packages + [
'rabbitmq-server',
] %}
{% else %}
{% set rabbitmq_packages = rabbitmq_packages + [
'rabbitmq-server=3.7.10-1',
] %}
{% endif %}
{% if base_arch == 'aarch64' %}
{% set rabbitmq_packages = rabbitmq_packages + [
'erlang-base',
] %}
{% else %}
{% set rabbitmq_packages = rabbitmq_packages + [
'erlang-base-hipe',
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }}
{% endblock %}
{% block rabbitmq_install_plugins %}
RUN rm -rf /var/lib/rabbitmq/* \
&& mkdir -p /usr/lib/rabbitmq/plugins \
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
rabbitmq_management
{% set rabbitmq_plugins = [
'accept-0.3.3.ez',
'prometheus-3.5.1.ez',
'prometheus_cowboy-0.1.4.ez',
'prometheus_httpd-2.1.8.ez',
'prometheus_rabbitmq_exporter-3.7.2.4.ez'
] %}
{{ macros.install_rabbitmq_plugins(rabbitmq_plugins | customizable("plugins"), version="v3.7.2.4") }}
{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY rabbitmq_get_gospel_node.py /usr/local/bin/rabbitmq_get_gospel_node
RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/rabbitmq_get_gospel_node
{% block rabbitmq_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER rabbitmq