1 Star 0 Fork 0

Neighbor.wang/docker-compose-all-mysql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yml 4.74 KB
一键复制 编辑 原始数据 按行查看 历史
tree 提交于 2020-03-22 21:33 . Bug fixes add new feature (#10)
version: "3"
services:
mysql5.5:
image: mysql:5.5
container_name: ${MYSQL_CONTAINER_NAME_PREFIX}5.5
ports:
- 3355:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mysql5.5/conf.d:/etc/mysql/conf.d:ro
- ./mysql5.5/logs:/var/log/mysql:rw
- ./mysql5.5/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mysql5.6:
image: mysql:5.6
container_name: ${MYSQL_CONTAINER_NAME_PREFIX}5.6
ports:
- 3356:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mysql5.6/conf.d:/etc/mysql/conf.d:ro
- ./mysql5.6/logs:/var/log/mysql:rw
- ./mysql5.6/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mysql5.7:
image: mysql:5.7
container_name: ${MYSQL_CONTAINER_NAME_PREFIX}5.7
ports:
- 3357:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mysql5.7/conf.d:/etc/mysql/conf.d:ro
- ./mysql5.7/logs:/var/log/mysql:rw
- ./mysql5.7/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mysql8.0:
image: mysql:8.0
container_name: ${MYSQL_CONTAINER_NAME_PREFIX}8.0
ports:
- 3380:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mysql8.0/conf.d:/etc/mysql/conf.d:ro
- ./mysql8.0/logs:/var/log/mysql:rw
- ./mysql8.0/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mariadb10.0:
image: mariadb:10.0
container_name: ${MARIADB_CONTAINER_NAME_PREFIX}10.0
ports:
- 3310:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mariadb10.0/conf.d:/etc/mysql/conf.d:ro
- ./mariadb10.0/logs:/var/log/mysql:rw
- ./mariadb10.0/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mariadb10.1:
image: mariadb:10.1
container_name: ${MARIADB_CONTAINER_NAME_PREFIX}10.1
ports:
- 3311:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mariadb10.1/conf.d:/etc/mysql/conf.d:ro
- ./mariadb10.1/logs:/var/log/mysql:rw
- ./mariadb10.1/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mariadb10.2:
image: mariadb:10.2
container_name: ${MARIADB_CONTAINER_NAME_PREFIX}10.2
ports:
- 3312:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mariadb10.2/conf.d:/etc/mysql/conf.d:ro
- ./mariadb10.2/logs:/var/log/mysql:rw
- ./mariadb10.2/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
mariadb10.3:
image: mariadb:10.3
container_name: ${MARIADB_CONTAINER_NAME_PREFIX}10.3
ports:
- 3313:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- ./my.cnf:/root/.my.cnf:ro
- ./mariadb10.3/conf.d:/etc/mysql/conf.d:ro
- ./mariadb10.3/logs:/var/log/mysql:rw
- ./mariadb10.3/initdb.d:/docker-entrypoint-initdb.d:ro
- ./common:${MOUNTED_SHARED_DIRECTORY}:ro
- ./auto-generate:/auto-generate:rw
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tmhulw/docker-compose-all-mysql.git
git@gitee.com:tmhulw/docker-compose-all-mysql.git
tmhulw
docker-compose-all-mysql
docker-compose-all-mysql
master

搜索帮助