title: Use rabbitmq in Ubuntu 16.04 inside Docker
body: <p>I am new to Docker. I want to create an image in Docker which to run a microservice that needs RabbitMQ and Redis. For Redis, I include redis in the line <code>RUN apt-get install -y python python-pip libsasl2-dev libmysqlclient-dev redis-server wget</code> inside <code>Dockerfile</code>. To install RabbitMQ, I use </p>
  
  <pre><code>RUN apt-get update
  RUN apt-get -y -q --allow-unauthenticated install rabbitmq-server
  RUN /usr/sbin/rabbitmq-plugins enable rabbitmq_management
  RUN echo "[{rabbit, [{loopback_users, []}]}]." &gt; 
  /etc/rabbitmq/rabbitmq.config
  # Port to expose
  EXPOSE 9060 5672 15672
  </code></pre>
  
  <p>However, the rabbitmq server is not running in default which will prompt error when I run the built image. I have a line <code>ENTRYPOINT ["/docker-entrypoint.sh"]</code> to run my microservice. How can I run the rabbitMQ service from Dockerfile?</p>