forked from severalnines/galera-docker-mariadb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (19 loc) · 943 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
FROM centos:7
MAINTAINER Severalnines <[email protected]>
RUN echo -e "[mariadb]\nname = MariaDB\nbaseurl = http://yum.mariadb.org/10.1/centos7-amd64\nenabled = 1\ngpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\ngpgcheck = 1" > /etc/yum.repos.d/MariaDB.repo
RUN rpmkeys --import https://www.percona.com/downloads/RPM-GPG-KEY-percona && \
yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
RUN yum install -y which MariaDB-server MariaDB-client socat percona-xtrabackup && \
yum clean all
ADD my.cnf /etc/my.cnf
VOLUME /var/lib/mysql
COPY entrypoint.sh /entrypoint.sh
COPY report_status.sh /report_status.sh
COPY healthcheck.sh /healthcheck.sh
COPY jq /usr/bin/jq
RUN chmod a+x /usr/bin/jq
EXPOSE 3306 4567 4568
ONBUILD RUN yum update -y
HEALTHCHECK --interval=10s --timeout=3s --retries=15 \
CMD /bin/sh /healthcheck.sh || exit 1
ENTRYPOINT ["/entrypoint.sh"]