基于docker-compose部署rabbitmq

新建文件夹

mkdir /usr/local/docker/rabbitmq
cd /usr/local/docker/rabbitmq

创建docker-compose.yml文件

version: '3.1'
services:
  rabbitmq:
    hostname: jcs-rabbitmq
    image: rabbitmq:3-management
    ports:
      - 15672:15672
      - 5672:5672
    restart: always
    volumes:
      - ./data:/var/lib/rabbitmq

启动容器

docker-compose up -d

浏览器访问RabbitMQ服务

http://192.168.50.245:15672

登录RabbitMQ服务

基于docker-compose部署rabbitmq_第1张图片

你可能感兴趣的:(Docker,docker,docker-compose,rabbitmq)