This commit is contained in:
Michael RICOIS 2018-03-27 16:33:27 +02:00
parent 71a7aab135
commit b2f9132c4d
6 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,25 @@
FROM mysql:5.6
# Environment
ENV TERM xterm
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Europe/Paris
# Installation
RUN apt-get update && apt-get -y install gnupg procps nano pwgen \
&& echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
# Add MySQL configuration
ADD *.cnf /etc/mysql/conf.d/
RUN chmod 644 /etc/mysql/conf.d/*.cnf
# Add cli to run
ADD init_user.sh /docker-entrypoint-initdb.d/
RUN chmod 775 /docker-entrypoint-initdb.d/init_user.sh
# Add VOLUMEs to allow backup of config and databases
VOLUME ["/var/lib/mysql"]
# Expose and Run
EXPOSE 3306
CMD ["mysqld"]

View File

@ -0,0 +1,8 @@
[mysqld]
bind-address=0.0.0.0
skip-host-cache
skip_name_resolve
skip_external_locking
log_error=/var/log/errorlog.err
#server-id
#log-bin

View File

@ -0,0 +1,25 @@
FROM mysql:5.7
# Environment
ENV TERM xterm
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Europe/Paris
# Installation
RUN apt-get update && apt-get -y install gnupg procps nano pwgen \
&& echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
# Add MySQL configuration
ADD *.cnf /etc/mysql/conf.d/
RUN chmod 644 /etc/mysql/conf.d/*.cnf
# Add cli to run
ADD init_user.sh /docker-entrypoint-initdb.d/
RUN chmod 775 /docker-entrypoint-initdb.d/init_user.sh
# Add VOLUMEs to allow backup of config and databases
VOLUME ["/var/lib/mysql"]
# Expose and Run
EXPOSE 3306
CMD ["mysqld"]

View File

@ -0,0 +1,8 @@
[mysqld]
bind-address=0.0.0.0
skip-host-cache
skip_name_resolve
skip_external_locking
log_error=/var/log/errorlog.err
#server-id
#log-bin

View File

@ -0,0 +1,25 @@
FROM mysql:8.0
# Environment
ENV TERM xterm
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Europe/Paris
# Installation
RUN apt-get update && apt-get -y install gnupg procps nano pwgen \
&& echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
# Add MySQL configuration
ADD *.cnf /etc/mysql/conf.d/
RUN chmod 644 /etc/mysql/conf.d/*.cnf
# Add cli to run
ADD init_user.sh /docker-entrypoint-initdb.d/
RUN chmod 775 /docker-entrypoint-initdb.d/init_user.sh
# Add VOLUMEs to allow backup of config and databases
VOLUME ["/var/lib/mysql"]
# Expose and Run
EXPOSE 3306
CMD ["mysqld"]

View File

@ -0,0 +1,8 @@
[mysqld]
bind-address=0.0.0.0
skip-host-cache
skip_name_resolve
skip_external_locking
log_error=/var/log/errorlog.err
#server-id
#log-bin