赞
踩
win
和mac
和 Linux
通用使用docker-compose启动rabbit mq
配置挂载在本地文件夹,可迁移,无关平台性
一个docker-compose.yml文件即可在Windows,Mac或者Linux环境下,快速启动rabbit mq
Docker
下面列举的是mysql与redis的配置,后续的配置请关注后续博客
version: '3' services: mysql5.7: image: mysql:5.7 restart: always environment: MYSQL_ROOT_PASSWORD: root # 设置root用户密码 ports: - 3306:3306 volumes: # 挂载持久化地址(个人理解) - ./mysql/:/var/lib/mysql/ - ./conf/:/etc/mysql/ redis: image: redis:4.0.2 container_name: my_redis volumes: - ./redis/data:/data - ./redis/conf/:/usr/local/etc/redis/ command: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf" ports: - 8089:6379
docker-compose up -d
docker-compose down
https://github.com/Gleans/SpringBootLearn/tree/master/docker-compose
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。