-
Notifications
You must be signed in to change notification settings - Fork 114
/
Dockerfile
34 lines (28 loc) · 1.45 KB
/
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
31
32
33
34
FROM ubuntu:14.04
MAINTAINER Dr. Stefan Schimanski <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# setup repos
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
RUN echo 'deb http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.0/ubuntu trusty main' >> /etc/apt/sources.list
RUN apt-get -y update
# install packages
RUN apt-get -y --no-install-recommends --no-install-suggests install host socat unzip ca-certificates wget
RUN apt-get -y install mariadb-galera-server-10.0 galera-3 mariadb-client xtrabackup
# install galera-healthcheck
RUN wget -O /bin/galera-healthcheck 'https://github.com/sttts/galera-healthcheck/releases/download/v20150303/galera-healthcheck_linux_amd64'
RUN test "$(sha256sum /bin/galera-healthcheck | awk '{print $1;}')" = "86f60d9d82b1f9d2d474368ed7e81a0a361508031a292244847136b0ed2ee770"
RUN chmod +x /bin/galera-healthcheck
# configure mysqld
RUN sed -i 's/#? *bind-address/# bind-address/' /etc/mysql/my.cnf
RUN sed -i 's/#? *log-error/# log-error/' /etc/mysql/my.cnf
ADD conf.d/utf8.cnf /etc/mysql/conf.d/utf8.cnf
ADD conf.d/galera.cnf /etc/mysql/conf.d/galera.cnf
RUN chmod 0644 /etc/mysql/conf.d/utf8.cnf
RUN chmod 0644 /etc/mysql/conf.d/galera.cnf
EXPOSE 3306 4444 4567 4568
VOLUME ["/var/lib/mysql"]
COPY mysqld.sh /mysqld.sh
COPY start /start
RUN chmod 555 /start /mysqld.sh
ENTRYPOINT ["/start"]