I would like to have my customized image based on rabbitmq. That customized image I like to create with docker-compose. I want management plugi started
If I use docker compose as
rabbitmq: # https://registry.hub.docker.com/_/rabbitmq/
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
- 8080:8080
it does bring up management plugin.
If I use docker compose
version: '2'
services:
# Rabbit service. See https://hub.docker.com/_/rabbitmq/
rabbit:
container_name: dev-rabbit
image: rabbitmq-our:3-management
build: ./rabbitmq-our
environment:
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=mq
- RABBITMQ_DEFAULT_VHOST=my_vhost
ports:
- "4369:4369"
- "5671:5671"
- "5672:5672"
- "15672:15672"
- "8080:8080"
and Dockerfile in rabbitmq-our/ folder such as
FROM rabbitmq
Then no plugins are started and I am not getting the management console.
How I can specify running that "3-management" plugin in my custom image startup ?
In the docker-compose.yaml we tell it what docker image we would like to use. Give our container a name, and configure the ports. services: rabbitmq: image: rabbitmq:3-management container_name: rabbitmq ports: - 5672:5672 - 15672:15672 To run the docker compose file we only need to run the following command.
To run the docker compose file we only need to run the following command. This will install RabbitMQ and the ManagmentUI in docker and open it to the preconfigured standard RabbitMQ ports. This will cause the container to then stop running. It is a very good idea to set up your development environment.
In order to define and run our multi-container environment I’m goint to use Docker Compose, which will help us to organize everything in one place. To use Docker Compose you need 2 things: 1. Define your environment in a Dockerfile. 2. Define your services in a docker-compose.ymlfile.
rabbitmq-node-1:creates a container based on a RabbitMQ image, defines its hostname, exposed ports, networks, storage volumes and some specific RabbitMQ environment variables rabbitmq-node-2:the same for node 2
I've my compose like this and works the RabbitMQ admin plugin.
rabbit:
container_name: dev_rabbit
hostname: rabbit
image: rabbitmq:3.6.6-management
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=user
ports:
- "5672:5672"
- "15672:15672"
I take it from the hub.docker official page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With