Docker deployment RabbitMQ container implementation process analysis

Docker deployment RabbitMQ container implementation process analysis

1. Pull the image

First, execute the following command to download the image to your local computer:

Note: rabbitmq is an official image and does not come with a console. If you want to install an image with a console, you need to include a tag when pulling the image, for example: rabbitmq:management.

docker pull rabbitmq:management

2. Create and mount a local data directory

mkdir -p /home/rabbitmq/data

3. Start the container

(1) Execute the following command to instantiate the RabbitMQ service:

docker run --name rabbitmq -d -p 15672:15672 -p 5672:5672 -v /home/rabbitmq/data:/data -e RABBITMQ_DEFAULT_USER=ling -e RABBITMQ_DEFAULT_PASS=123456 rabbitmq:management

Parameter Description:

--name: Specify the container name
-d: Run in the background
-p: Map the mq port number to the local
-v: mount /home/rabbitmq/data to the /data directory in the container
-e RABBITMQ_DEFAULT_USER=ling: Set the user name to ling
-e RABBITMQ_DEFAULT_PASS=123456: Set the password to 123456

(2) Then execute the docker ps command to check that the RabbitMQ container has indeed run successfully:

Notice:

docker stop xxxxxx (stop running container)
docker rm xxxxxx (delete container)

3. Access test

Use a browser to access http://IP:15672. If you see the following page, it means RabbitMQ has been started successfully.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed operations of building RabbitMq's common cluster and mirror cluster with Docker
  • A detailed introduction to deploying RabbitMQ environment with docker
  • Two problems encountered when deploying rabbitmq with Docker
  • The problem of being unable to enter the management page when installing rabbitmq in docker
  • How to quickly install RabbitMQ in Docker
  • Docker installs and runs the rabbitmq example code
  • How to deploy rabbitmq cluster with docker
  • How to build a rabbitmq cluster environment with docker
  • Docker installation and configuration steps for RabbitMQ

<<:  Ideas and codes for realizing magnifying glass effect in js

>>:  MySQL master-slave synchronization, implementation principle of transaction rollback

Recommend

How to recompile Nginx and add modules

When compiling and installing Nginx, some modules...

Analyze how to automatically generate Vue component documentation

Table of contents 1. Current situation 2. Communi...

Get / delete method to pass array parameters in Vue

When the front-end and back-end interact, sometim...

Detailed example of concatenating multiple fields in mysql

The MySQL query result row field splicing can be ...

Zookeeper stand-alone environment and cluster environment construction

1. Single machine environment construction# 1.1 D...

Docker container time zone error issue

Table of contents background question Problem ana...

Mysql implements three functions for field splicing

When exporting data to operations, it is inevitab...

Thumbnail hover effect implemented with CSS3

Achieve resultsImplementation Code html <heade...

Implementation of WeChat applet message push in Nodejs

Select or create a subscription message template ...

How to set static IP for Ubuntu 18.04 Server

1. Background Netplan is a new command-line netwo...

Analysis of MySQL Aborted connection warning log

Preface: Sometimes, the session connected to MySQ...

How to view the IP address of the Docker container

I always thought that Docker had no IP address. I...