diff --git a/docker/mysql-slave1/Dockerfile b/docker/mysql-slave1/Dockerfile new file mode 100755 index 00000000..10ea8938 --- /dev/null +++ b/docker/mysql-slave1/Dockerfile @@ -0,0 +1,20 @@ +ARG MYSQL_VERSION +FROM mysql:${MYSQL_VERSION} + +LABEL maintainer="Ludovic CANDELLIER " + +##################################### +# Set Timezone +##################################### + +ARG TZ=UTC +ENV TZ ${TZ} +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/ + +COPY my.cnf /etc/mysql/conf.d/my.cnf + +RUN chmod 0444 /etc/mysql/conf.d/my.cnf + +CMD ["mysqld"] + +EXPOSE 3306 diff --git a/docker/mysql-slave1/my.cnf b/docker/mysql-slave1/my.cnf new file mode 100755 index 00000000..ce2437cb --- /dev/null +++ b/docker/mysql-slave1/my.cnf @@ -0,0 +1,15 @@ +# The MySQL Client configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +[mysql] + +[mysqld] +sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" +character-set-server=utf8 +default-authentication-plugin=mysql_native_password +#[Must] Start Binary Logs +log-bin=mysql-bin +#[Must] Set the unique ID of the server, default 1, usually the last segment of IP +server-id=3002