-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
27 lines (20 loc) · 913 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
FROM ubuntu:22.04
MAINTAINER Wei Zhou <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -qq && \
apt upgrade -y && \
apt install -y curl iproute2 net-tools iputils-ping apt-transport-https
RUN groupadd -r mysql && useradd -r -g mysql mysql && \
mkdir -p /var/run/mysqld && \
chown mysql:mysql /var/run/mysqld
RUN curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash && \
apt update -qq && \
apt install -y mariadb-server mariadb-client mariadb-backup && \
apt install -y galera-arbitrator-4 galera-4 && \
rm -rf /var/lib/mysql && \
mkdir /var/lib/mysql
COPY conf/ /etc/mysql/conf.d/
COPY my.cnf /etc/mysql/my.cnf
COPY init.sh /init.sh
EXPOSE 3306 4444 4567 4568
ENTRYPOINT ["/init.sh"]