diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile index 57ad486ea1..a4389598af 100644 --- a/docker/rabbitmq/Dockerfile +++ b/docker/rabbitmq/Dockerfile @@ -1,8 +1,18 @@ FROM kollaglue/fedora-rdo-base MAINTAINER Kolla Project (https://launchpad.net/kolla) -RUN yum -y install rabbitmq-server; yum clean all +# Install required packages +RUN yum -y install rabbitmq-server && yum clean all + +# Run the management plugin +RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management + +# Copy Rabbit conf files ADD rabbitmq.config /etc/rabbitmq/ ADD rabbitmq-env.conf /etc/rabbitmq/ + +# Copy start-up script ADD start.sh /start.sh + +# Start Rabbit through the start script CMD ["/start.sh"] diff --git a/docker/rabbitmq/rabbitmq-env.conf b/docker/rabbitmq/rabbitmq-env.conf index c2b843e5ed..e76f18f0b1 100644 --- a/docker/rabbitmq/rabbitmq-env.conf +++ b/docker/rabbitmq/rabbitmq-env.conf @@ -1,3 +1,2 @@ -RABBITMQ_NODE_PORT=@RABBITMQ_PORT@ +RABBITMQ_NODENAME=@RABBITMQ_NODENAME@ RABBITMQ_LOG_BASE=@RABBITMQ_LOG_BASE@ - diff --git a/docker/rabbitmq/start.sh b/docker/rabbitmq/start.sh index d506364240..6d90c410af 100755 --- a/docker/rabbitmq/start.sh +++ b/docker/rabbitmq/start.sh @@ -4,7 +4,7 @@ set -e : ${RABBITMQ_USER:=guest} : ${RABBITMQ_PASS:=guest} -: ${RABBITMQ_NODE_PORT:=5672} +: ${RABBITMQ_NODENAME:=rabbit} : ${RABBITMQ_LOG_BASE:=/var/log/rabbitmq} sed -i ' @@ -13,9 +13,8 @@ sed -i ' ' /etc/rabbitmq/rabbitmq.config sed -i ' - s|@RABBITMQ_PORT@|'"$RABBITMQ_NODE_PORT"'|g + s|@RABBITMQ_NODENAME@|'"$RABBITMQ_NODENAME"'|g s|@RABBITMQ_LOG_BASE@|'"$RABBITMQ_LOG_BASE"'|g ' /etc/rabbitmq/rabbitmq-env.conf -exec /usr/lib/rabbitmq/bin/rabbitmq-server - +exec /usr/sbin/rabbitmq-server