标签:idg exp nbsp usr pre share ports mon red
直接上
version: ‘3‘
services:
mysql:
container_name: mysql
image: mysql:5.7.21
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ./data/mysql:/var/lib/mysql
expose:
- 3306
ports:
- 3306:3306
networks:
- mysql_bridge
restart: on-failure
redis:
container_name: redis
image: redis:4.0.6
expose:
- 6379
ports:
- 6379:6379
volumes:
- ./data/redis:/usr/share/redis/data:rw
networks:
- redis_bridge
mongo:
container_name: mongo
image: mongo:4.0.9
volumes:
- ./data/mongo:/data/db
expose:
- 27017
ports:
- 27017:27017
networks:
- mongo_bridge
restart: on-failure
networks:
mysql_bridge:
external: true
redis_bridge:
external: true
mongo_bridge:
external: true
记录下(同一个计算机)多个容器 dockr bridge(桥接) docker-compose 配置
标签:idg exp nbsp usr pre share ports mon red
原文地址:https://www.cnblogs.com/zjhblogs/p/10775667.html