Docker 部署 RabbitMq 与 RabbitMq 管理后台 Web 页面打不开问题

  • 查询可用镜像

docker search rabbitmq

NAME                                       DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
rabbitmq                                   RabbitMQ is an open source multi-protocol me…   3276                [OK]
bitnami/rabbitmq                           Bitnami Docker Image for RabbitMQ               49                                      [OK]
tutum/rabbitmq                             Base docker image to run a RabbitMQ server      20
kbudde/rabbitmq-exporter                   rabbitmq_exporter for prometheus                13                                      [OK]
  • 获取镜像

docker pull rabbitmq

c4102ef22c29: Pull complete
fefc8e1aa4b5: Pull complete
a271d400045b: Pull complete
b0d4c40c62de: Pull complete
Digest: sha256:8761de2c22badfc86dfe89791dc9dbf122f67ff0f8981966573d267af421b97f
[root@localhost ~]#
  • 运行镜像 

[root@localhost ~]# docker run -dit --name rabbitmq_demo -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 rabbitmq:latest
e194a2dbeb52f2296dfb6d1c527cf052d82be5ed9a4c974d70dcd6af3da3eb7e
[root@localhost ~]#
  • 访问RabbitMq 管理后台 Web 页面

http://localhost:15672

Docker 部署 RabbitMq 与 RabbitMq 管理后台 Web 页面打不开问题_第1张图片

  • 如果管理后台有访问不了的情况

进入容器
docker exec -it 271fb90e783d /bin/bash
执行以下命令
rabbitmq-plugins enable rabbitmq_management
➜  ~ docker exec -it 271fb90e783d /bin/bash
root@myRabbit:/# rabbitmq-plugins enable rabbitmq_management

Enabling plugins on node rabbit@myRabbit:
rabbitmq_management
The following plugins have been configured:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@myRabbit...
Plugin configuration unchanged.
root@myRabbit:/#
root@myRabbit:/#

 

你可能感兴趣的:(后端,消息队列)