docker compose redis sqlserver rabbirmq

version: ‘2’
services:
#rabbitmq container
rabbitmq:
restart: always
#setup host name
hostname: rabbitmq
#use docker images
image: rabbitmq
#ports setting
ports:
- 15673:15672
- 5673:5672
restart: always
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=root
- RABBITMQ_ERLANG_COOKIE=rabbitmq
- RABBITMQ_DEFAULT_VHOST=/
#volumes setting
volumes:
- ./data:/var/lib/rabbitmq
redis:
image: redis
container_name: redis
restart: always
command: --appendonly yes
ports:
- 6379:6379
volumes:
- ./redis_data:/data
#服务名称
mssql:
#容器名称
container_name: mssql
#镜像名称
image: mcr.microsoft.com/mssql/server:2017-latest
#总是重启后启动
restart: always
#端口映射
ports:
- 14333:1433
#挂载
volumes:
- ./data:/var/lib/sqlserver
#环境变量
environment:
- ACCEPT_EULA=Y
#SA用户密码
- SA_PASSWORD=1qaz@4321

你可能感兴趣的:(docker)