docker rabbitmq - TuPengXiong/TuPengXiong.github.io GitHub Wiki

docker rabbitmq

  • 下载rabbitmq
sudo docker pull hub.c.163.com/library/rabbitmq:latest
  • 显示images
sudo docker images
REPOSITORY                       TAG           IMAGE ID            CREATED           SIZE
mysql                            latest        cf725f136fd2        3 days ago        383.4 MB
hub.c.163.com/library/rabbitmq   latest        0463354ada4d        9 weeks ago       180.8 MB
hello-world                      latest        c54a2cc56cbb        3 months ago      1.848 kB

  • 启动 rabbitmq

sudo docker run -i -t -d -p 5672:5672 hub.c.163.com/library/rabbitmq

  • 启动 rabbitmq 的mqtt 插件
docker exec -it  'rabbitmq container' rabbitmq-plugins enable rabbitmq_mqtt
  • java-rabbitmq-client
git clone https://github.com/rabbitmq/rabbitmq-java-client.git
强制删除容器
sudo docker rm -f container
强制删除镜像
sudo docker rmi -f image