FROM mysql:5.7

#定义会被容器自动执行的目录
ENV AUTO_RUN_DIR /docker-entrypoint-initdb.d

#把数据库初始化数据的文件复制到工作目录下
COPY ./1_cofortest_db.sql $AUTO_RUN_DIR/
COPY ./2_cofortest_structure_and_initdata.sql $AUTO_RUN_DIR/
COPY ./3_mooctest_user_structure_and_initdata.sql $AUTO_RUN_DIR/

#给执行文件增加可执行权限
RUN chmod -R 777 $AUTO_RUN_DIR/