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

Implementation code for adding links to FLASH through HTML (div layer)

Today a client wants to run an advertisement, and ...

Implementing WeChat tap animation effect based on CSS3 animation attribute

Seeing the recent popular WeChat tap function, I ...

Tutorial on installing Android Studio on Ubuntu 19 and below

Based on past experience, taking notes after comp...

Detailed example of sorting function field() in MySQL

Preface In our daily development process, sorting...

Solution to ERROR 1366 when entering Chinese in MySQL

The following error occurs when entering Chinese ...

JavaScript implementation of verification code case

This article shares the specific code for JavaScr...

Solution to Ubuntu cannot connect to the network

Effective solution for Ubuntu in virtual machine ...

Detailed explanation of Vue3's sandbox mechanism

Table of contents Preface Browser compiled versio...

The whole process of configuring reverse proxy locally through nginx

Preface Nginx is a lightweight HTTP server that u...

An Incomplete Guide to JavaScript Toolchain

Table of contents Overview Static type checking C...

Mac VMware Fusion CentOS7 configuration static IP tutorial diagram

Table of contents Install CentOS7 Configuring Sta...

Vue implements the full selection function

This article example shares the specific code of ...

Solve the problem of the container showing Exited (0) after docker run

I made a Dockerfile for openresty on centos7 and ...

How to view and set the mysql time zone

1. Check the database time zone show variables li...