Docker install and run rabbitmq instance code


Pull image:

[[email protected]_0_7_centos ~]$ sudo docker pull rabbitmq:3.7.15
[sudo] password for mall: 
3.7.15: Pulling from library/rabbitmq
5b7339215d1d: Pull complete 
14ca88e9f672: Pull complete 
a31c3b1caad4: Pull complete 
b054a26005b7: Pull complete 
eef17c6cb6cf: Pull complete 
d5a267fdfe2c: Pull complete 
d499647c68af: Pull complete 
ad88e7bd384a: Pull complete 
ae1d871f3f62: Pull complete 
7ceac8eb91d4: Pull complete 
Digest: sha256:78dff08cefc9fef5c9cbaabab99d783d72d37cb7bbb66a08c4f59877ef406c1f
Status: Downloaded newer image for rabbitmq:3.7.15

Start rabbitmq in container:

[[email protected]_0_7_centos ~]$ sudo docker run -d --name rabbitmq \
>  --publish 5671:5671 --publish 5672:5672 --publish 4369:4369 \
>  --publish 25672:25672 --publish 15671:15671 --publish 15672:15672 \
>  rabbitmq:3.7.15

Enter the container and open the management function:

[[email protected]_0_7_centos ~]$ sudo docker exec -it rabbitmq /bin/bash
[email protected]:/# rabbitmq-plugins enable rabbitmq_management 
Enabling plugins on node [email protected]:
The following plugins have been configured:
Applying plugin configuration to [email protected]
The following plugins have been enabled:

started 3 plugins.

Open the browser, input IP and 15672 port of the machine:

Log in with the default account password guest / guest and add a new user mall / Mall:

New virtual host:

Configure the virtual host / mall to the mall user. Click the mall in the red box below to set it


The above is all the knowledge content of this introduction. Thank you for your study and support for developer.

Recommended Today

SQL exercise 20 – Modeling & Reporting

This blog is used to review and sort out the common topic modeling architecture, analysis oriented architecture and integration topic reports in data warehouse. I have uploaded these reports to GitHub. If you are interested, you can have a lookAddress: recorded a relatively complete development process in my hexo blog deployed on GitHub. You can […]