docker-compose 安装rabbitmq
2022-05-13 本文已影响0人
夜清溟
cat docker-compose.yml
version: '2.2'
services:
rabbitmq:
image: rabbitmq:management
hostname: nestle_rabbitmq
restart: always
ports:
- 15672:15672 #客户端连接端口映射
- 5672:5672
restart: always
volumes:
- ./.data:/var/lib/rabbitmq
- /etc/localtime:/etc/localtime:ro
cpus: '2'
mem_limit: 2048m
container_name: rabbitmq
启动
docker-compose up -d
查看日志,修改默认用户名密码guest/guest