2015-09-17 09:35:33 -07:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
2015-11-23 12:38:58 +05:30
|
|
|
MAINTAINER {{ maintainer }}
|
2015-08-12 02:49:35 +00:00
|
|
|
|
2015-09-04 02:15:03 -07:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
2015-08-12 02:49:35 +00:00
|
|
|
|
|
|
|
RUN yum -y install \
|
|
|
|
hostname \
|
2016-03-13 22:47:35 +00:00
|
|
|
https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_7/rabbitmq-server-3.5.7-1.noarch.rpm \
|
|
|
|
&& yum clean all
|
2015-08-12 02:49:35 +00:00
|
|
|
|
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
|
|
|
2016-05-17 10:04:59 +05:30
|
|
|
RUN apt-get -y install --no-install-recommends \
|
2016-03-13 22:47:35 +00:00
|
|
|
rabbitmq-server \
|
|
|
|
&& apt-get clean
|
2015-08-12 02:49:35 +00:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2015-10-16 06:19:07 +00:00
|
|
|
# NOTE(sdake): the /bin/true unblocks the rabbitmq-plugins tool. Not sure how
|
2015-10-06 09:09:26 -07:00
|
|
|
# or why. My suspicion is it sends a signal to the parent
|
|
|
|
# process.
|
2016-03-13 22:47:35 +00:00
|
|
|
RUN rm -rf /var/lib/rabbitmq/* \
|
|
|
|
&& curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/plugins/rabbitmq_clusterer-3.5.x-189b3a81.ez http://www.rabbitmq.com/community-plugins/v3.5.x/rabbitmq_clusterer-3.5.x-189b3a81.ez \
|
|
|
|
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
|
2015-10-16 06:19:07 +00:00
|
|
|
rabbitmq_management \
|
|
|
|
rabbitmq_clusterer \
|
2015-10-06 09:09:26 -07:00
|
|
|
&& /bin/true
|
2015-08-12 02:49:35 +00:00
|
|
|
|
2015-09-30 11:23:39 +00:00
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
2015-11-12 10:46:10 -05:00
|
|
|
COPY rabbitmq_sudoers /etc/sudoers.d/rabbitmq_sudoers
|
2016-03-03 16:43:02 +00:00
|
|
|
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 \
|
2015-11-12 10:46:10 -05:00
|
|
|
&& chmod 750 /etc/sudoers.d \
|
|
|
|
&& chmod 440 /etc/sudoers.d/rabbitmq_sudoers \
|
|
|
|
&& usermod -a -G kolla rabbitmq
|
2015-08-28 13:17:41 +03:00
|
|
|
|
|
|
|
{{ include_footer }}
|
2015-11-12 10:46:10 -05:00
|
|
|
|
2016-03-13 22:47:35 +00:00
|
|
|
USER rabbitmq
|