Install RabbitMQ using Docker Compose

RabbitMQ’s Docker Hub page provides us with Docker Images including the Management plugin using Alpine Linux (a Linux version is optimized for a very small size). You can use tags with names ending with management-alpine to install RabbitMQ using Docker Compose.

My example is as follows:

Here, I am installing the latest version of RabbitMQ 3.9.15. We need to expose 2 port 5672 of the RabbitMQ server and RabbitMQ Management UI for external use. The 2 folders inside the RabbitMQ container are also mounted to the external folders so that we can easily work with RabbitMQ.

The result when running the command “docker compose up” in the directory containing the docker-compose.yaml file with the above content is as follows:

So we have started a RabbitMQ server with the management UI. Now you can access RabbitMQ Management UI using the address http://localhost:15672/:

Login with username and password as guest, you will see the following results:

Add Comment