dockerfile add 命令无法复制,导致没有初始化数据库。

使用数据卷来关联目录

Signed-off-by: 云飞扬 <15678871232@qq.com>
pull/250/head
云飞扬 3 years ago committed by Gitee
parent adbba02cb8
commit 062122e762
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -24,6 +24,7 @@ services:
ports:
- "3306:3306"
volumes:
- ./mysql/db:/docker-entrypoint-initdb.d
- ./mysql/conf:/etc/mysql/conf.d
- ./mysql/logs:/logs
- ./mysql/data:/var/lib/mysql

@ -2,6 +2,3 @@
FROM mysql:5.7
# author
MAINTAINER ruoyi
# 执行sql脚本
ADD ./db/*.sql /docker-entrypoint-initdb.d/

Loading…
Cancel
Save