1. Pull rabbitmq mirror:
docker pull rabbitmq:3.7-management
2. Create a container:
docker run -d --restart=always -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=123456 --name myrabbitmq -p 35672:5672 -p 35673:15672 rabbitmq:3.7-management
- -e RABBITMQ_DEFAULT_USER = admin set the user name admin
- RABBITMQ_DEFAULT_PASS = -e 123456 password 123456
- RabbitMQ container port: 5672 RabbitMQ represented listening port, the application may be carried out by the TCP communication port, for performing subsequent asynchronous communication.
- RabbittMQ container port: 15672 represents RabbitMQ console port, access to operate in your browser.
3. Browser Access: IP: 35673 /
success page!