docker安装rabbitmq
1、创建docker-compose.yml文件
version: "3.0"
services:
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'rabbitmq'
ports:
- 5672:5672
- 15672:15672
hostname: rabbitmq_localdev
volumes:
- /Users/mac/docker/rabbitmq/data/:/var/lib/rabbitmq/
- /Users/mac/docker/rabbitmq/log/:/var/log/rabbitmq
networks:
- rabbitmq_go_net
networks:
rabbitmq_go_net:
driver: bridge
2、运行docker-compose up -d
macdeMacBook-Pro:rabbitmq mac$ docker-compose up -d
[+] Running 12/12
✔ rabbitmq 11 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 55.3s
✔ 31e352740f53 Pull complete 5.6s
✔ 4f04ff171192 Pull complete 5.6s
✔ b29ce3b224d6 Pull complete 5.6s
✔ 632149245453 Pull complete 45.7s
✔ 2b00c4007bd2 Pull complete 46.4s
✔ 9849413c9963 Pull complete 47.3s
✔ 9d479daa7056 Pull complete 47.3s
✔ 4294a3466344 Pull complete 47.3s
✔ fdaa4736fbf7 Pull complete 47.3s
✔ fe36568c63dd Pull complete 47.3s
✔ af247ed7e71a Pull complete 49.7s
[+] Running 2/2
✔ Network rabbitmq_rabbitmq_go_net Created 0.1s
✔ Container rabbitmq Started 0.8s
3、http://localhost:15672/#/
账号密码都是guest文章来源地址https://www.toymoban.com/news/detail-576584.html
文章来源:https://www.toymoban.com/news/detail-576584.html
到了这里,关于docker-compose安装rabbitmq的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!