docker基本命令:
拉取镜像:
bash
docker pull rabbitmq:3.9.7-management
查看镜像:
bash
docker images
这是一条启动rabbitmq镜像的命令,同时也创建了容器:
bash
docker run -d --name rabbit -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 -p 25672:25672 -p 61613:61613 -p 1883:1883 rabbitmq:3.9.7-management
移动mq插件到容器里面:
bash
docker cp ./rabbitmq_delayed_message_exchange-3.10.0.ez 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324:/plugins/
查看mq插件列表:
bash
rabbitmq-plugins list
停止mq插件运行:
bash
docker exec -it 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324 rabbitmqctl stop
启动容器:
bash
docker strat 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324
重启容器:
bash
docker restart 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324
进入容器:
bash
docker exec -it 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324 /bin/bash
退出容器:
bash
exit
过滤容器:
bash
docker ps | grep rabbit
docker ps | grep 1397e07eea98d54c8ef5427154fe2f0995c6f60e2b2d2d971ff0efbe97cc0324
配置延迟队列插件地址:
https://blog.csdn.net/ansdqasd/article/details/127615068