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

Detailed explanation of JavaScript prototype chain

Table of contents 1. Constructors and instances 2...

Solve the problem of HTML automatic formatting after saving in vscode

The version of vsCode has been updated in recent ...

Use CSS to implement special logos or graphics

1. Introduction Since pictures take up a lot of s...

Recommend a cool interactive website made by a front-end engineer

Website link: http://strml.net/ By Samuel Reed Ti...

Mysql 5.6 "implicit conversion" causes index failure and inaccurate data

background When performing a SQL query, I tried t...

Detailed analysis of the chmod command to modify file permissions under Linux

Use the Linux chmod command to control who can ac...

Let's learn about the MySQL storage engine

Table of contents Preface 1. MySQL main storage e...

Detailed explanation of the JavaScript timer principle

Table of contents 1. setTimeout() timer 2. Stop t...

Introduction to MySQL <> and <=> operators

<> Operator Function: Indicates not equal t...

How to install Mysql5.7 in Centos6

environment Centos 6.6 MySQL 5.7 Install If the s...

A detailed introduction to HTML page loading and parsing process

The order in which the browser loads and renders H...

How to count down the date using bash

Need to know how many days there are before an im...

Implementation of tomcat image created with dockerfile based on alpine

1. Download the alpine image [root@docker43 ~]# d...

Bootstrap 3.0 learning notes button style

This article mainly explains the style of buttons...