kolla-ansible/docker/rabbitmq/Dockerfile.j2
Benedikt Trefzer 10f2b59cf0 make rabbitmq container build with debian
- use rabbitmq official package since debian
    does not offer required version
  - force-depend since we do not install logrotate

Change-Id: I0818a6807210eb861aab5ef36d1f807a0ce435b2
Partially-implements: blueprint build-debian
2016-06-04 10:17:08 +02:00

48 lines
1.7 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
hostname \
https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_7/rabbitmq-server-3.5.7-1.noarch.rpm \
&& yum clean all
{% elif base_distro == 'ubuntu' %}
RUN apt-get -y install --no-install-recommends \
rabbitmq-server \
&& apt-get clean
{% elif base_distro == 'debian' %}
RUN apt-get -y install --no-install-recommends \
erlang-nox \
&& curl -s -O http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.7/rabbitmq-server_3.5.7-1_all.deb \
&& dpkg -i --force-depends rabbitmq-server_3.5.7-1_all.deb \
&& rm rabbitmq-server_3.5.7-1_all.deb
{% endif %}
# NOTE(sdake): the /bin/true unblocks the rabbitmq-plugins tool. Not sure how
# or why. My suspicion is it sends a signal to the parent
# process.
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 \
rabbitmq_management \
rabbitmq_clusterer \
&& /bin/true
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY rabbitmq_sudoers /etc/sudoers.d/rabbitmq_sudoers
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 \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/rabbitmq_sudoers \
&& usermod -a -G kolla rabbitmq
{{ include_footer }}
USER rabbitmq