diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile index 977cdd23ad..e269e1f42c 100644 --- a/docker/rabbitmq/Dockerfile +++ b/docker/rabbitmq/Dockerfile @@ -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 diff --git a/docker/rabbitmq/start.sh b/docker/rabbitmq/start.sh index 6d90c410af..7ad7fbe75c 100755 --- a/docker/rabbitmq/start.sh +++ b/docker/rabbitmq/start.sh @@ -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