-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (23 loc) · 872 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This is a Dockerfile to build a opensuse image which run mariadb
FROM mengzyou/docker-opensuse-base:latest
MAINTAINER Mengz You <mengz.you@outlook.com>
ENV MARIADB_MAJOR 5.5
ENV MARIADB_VERSION 5.5.45
# Default password for root of mariadb
ENV MYSQL_ROOT_PASSWORD mysecretpassword
# Add repo for the latest mariadb
RUN zypper -q ar -f -r http://download.opensuse.org/repositories/server:/database/openSUSE_13.2/server:database.repo \
&& zypper -qn --gpg-auto-import-keys ref \
&& zypper -qn in -l --no-recommends mariadb-$MARIADB_VERSION net-tools \
&& zypper clean --all
# Config for mariadb
RUN rm -rf /var/lib/mysql \
&& mkdir -p /var/lib/mysql \
&& mkdir -p /var/log/mysql \
&& chown mysql:mysql /var/log/mysql
VOLUME ["/var/lib/mysql"]
COPY docker-entrypoint.sh /
# ENTRYPOINT
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 3306
CMD ["mysqld_safe"]