-
Notifications
You must be signed in to change notification settings - Fork 69
/
Dockerfile
30 lines (23 loc) · 856 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
FROM mariadb:10.1
MAINTAINER [email protected]
RUN apt-get update && apt-get upgrade -y \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/ /docker-entrypoint-initdb.d/.
# we need to touch and chown config files, since we cant write as mysql user
RUN touch /etc/mysql/conf.d/galera.cnf \
&& chown mysql.mysql /etc/mysql/conf.d/galera.cnf \
&& chown mysql.mysql /docker-entrypoint-initdb.d/*.sql
# we expose all Cluster related Ports
# 3306: default MySQL/MariaDB listening port
# 4444: for State Snapshot Transfers
# 4567: Galera Cluster Replication
# 4568: Incremental State Transfer
EXPOSE 3306 4444 4567 4568
# we set some defaults
ENV GALERA_USER=galera \
GALERA_PASS=galerapass \
MAXSCALE_USER=maxscale \
MAXSCALE_PASS=maxscalepass \
CLUSTER_NAME=docker_cluster \
MYSQL_ALLOW_EMPTY_PASSWORD=1
CMD ["mysqld"]