废话少说!直接来上docker-compose.yaml文件(切记格式)
version: '2'
networks:
myweb:
external:
name: mysql-docker-compose_myweb
services:
redis-master:
container_name: 'redis-master'
image: 'redis:5.0.3'
restart: always
networks:
- myweb
volumes:
- ./master/data:/data
ports:
- 6371:6371
command: redis