FROM mysql:5.6.51

RUN echo "sql-mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'" >> /etc/mysql/conf.d/docker.cnf
RUN echo "character-set-server = utf8" >> /etc/mysql/conf.d/docker.cnf
RUN echo "collation-server = utf8_general_ci" >> /etc/mysql/conf.d/docker.cnf
RUN echo "lower_case_table_names = 1" >> /etc/mysql/conf.d/docker.cnf

COPY init-mysql-instance-legacy.sh /docker-entrypoint-initdb.d/

RUN chmod +x /docker-entrypoint-initdb.d/init-mysql-instance-legacy.sh
