作者:___墨浔 | 来源:互联网 | 2023-07-26 16:42
步骤
1、确保docker和docker-compose安装
2、创建docker-compose.yml
version: '3'
services:
rabbitmq:
image: rabbitmq:3.9.13-management
container_name: rabbitmq
restart: always
hostname: rabbitmq
ports:
- 15672:15672
volumes:
- ./data:/var/lib/rabbitmq
- ./config/rabbitmq.sh:/etc/rabbitmq/rabbitmq.sh
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
- RABBITMQ_ERLANG_COOKIE=helloCOOKIE
3、执行docker-compose up -d
如果没有安装镜像的话,就会拉取镜像