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
网友评论