添加数据库compose文件
parent
5fd5b7854e
commit
eb63fd5088
@ -0,0 +1,20 @@
|
||||
version: '3'
|
||||
services:
|
||||
hadoop_mysql:
|
||||
restart: always
|
||||
image: mysql:8
|
||||
container_name: hadoop_mysql
|
||||
# volumes:
|
||||
# - /apps/mysql/mydir:/mydir
|
||||
# - /apps/mysql/datadir:/var/lib/mysql
|
||||
# - /apps/mysql/conf/my.cnf:/etc/my.cnf
|
||||
# # 数据库还原目录 可将需要还原的sql文件放在这里
|
||||
# - /apps/mysql/source:/docker-entrypoint-initdb.d
|
||||
environment:
|
||||
- "MYSQL_ROOT_PASSWORD=root"
|
||||
- "MYSQL_DATABASE=hadoopdb"
|
||||
- "TZ=Asia/Shanghai"
|
||||
ports:
|
||||
# 使用宿主机的3306端口映射到容器的3306端口
|
||||
# 宿主机:容器
|
||||
- 3306:3306
|
Loading…
Reference in New Issue