Make rabbitmq container work with it's proper hostname set

Change-Id: I0f79ba151dbb290378e2db0d1af9feb71cb84e6d
This commit is contained in:
Steven Dake 2015-03-18 15:24:16 -07:00
parent 904c8db96e
commit ac930b33dd
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base
MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Install required packages
RUN yum -y install rabbitmq-server && yum clean all
RUN yum -y install rabbitmq-server hostname && yum clean all
# Run the management plugin
RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management

View File

@ -17,4 +17,8 @@ sed -i '
s|@RABBITMQ_LOG_BASE@|'"$RABBITMQ_LOG_BASE"'|g
' /etc/rabbitmq/rabbitmq-env.conf
# work around:
# https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/653405
echo "${RABBITMQ_SERVICE_HOST} `/usr/bin/hostname -s`" > /etc/hosts
exec /usr/sbin/rabbitmq-server