293a1d9f8c
We would need socat tool to perform healthchecks on the various containers. Closes-Bug: #1749227 Change-Id: Ibda77a8d041d894f5efac6578e52b11651bca97f
70 lines
2.1 KiB
Django/Jinja
70 lines
2.1 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_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
{% set rabbitmq_packages = [
|
|
'erlang-hipe',
|
|
'hostname',
|
|
'rabbitmq-server'
|
|
] %}
|
|
|
|
{% elif base_distro in ['debian', 'ubuntu'] %}
|
|
{% set rabbitmq_packages = [
|
|
'erlang-nox',
|
|
'logrotate'
|
|
] %}
|
|
|
|
{% if base_distro == 'debian' %}
|
|
{% set rabbitmq_packages = rabbitmq_packages + [
|
|
'rabbitmq-server/stretch-backports'
|
|
] %}
|
|
{% else %}
|
|
{% set rabbitmq_packages = rabbitmq_packages + [
|
|
'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server_3.6.5-1_all.deb',
|
|
] %}
|
|
{% 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/* \
|
|
&& ln -s /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.* /usr/lib/rabbitmq/lib/rabbitmq_server-3.6 \
|
|
&& curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6/plugins/rabbitmq_clusterer-3.6.x-667f92b0.ez http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \
|
|
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
|
|
rabbitmq_management \
|
|
rabbitmq_clusterer
|
|
|
|
{% 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
|