1, into the docker hub mirroring warehouse address: https: //hub.docker.com/
2, search rabbitMq, enter the official mirror, you can see the following types of mirroring; we choose the version with "mangement" The ( includes web management page );
3, pulling the mirror
docker pull rabbitmq:3.7.7-management
Use: docker images View all mirrors
4, according to the downloaded image creation and launch container
docker run -d --name rabbitmq3.7.7 -p 5672:5672 -p 15672:15672 -v `pwd`/data:/var/lib/rabbitmq --hostname myRabbit -e RABBITMQ_DEFAULT_VHOST=my_vhost -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin df80af9ca0c9
Description:
-d background container;
--name specified container name;
-P port specified service running (5672: application access port; 15672: Web console port numbers);
-v map directory or file;
--hostname host name (a RabbitMQ important considerations is that it is based on the so-called "node name" stored data, the default is the host name);
-e specify environment variables; (RABBITMQ_DEFAULT_VHOST: default virtual machine name; RABBITMQ_DEFAULT_USER: the default user name; RABBITMQ_DEFAULT_PASS: The default password for the user name)
5, use the command: docker ps to see running container
6, can use the browser to open the web management side: http: // Server-IP: 15672