-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 944 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
31
32
33
34
35
FROM centos:7
ENV MAXSCALE_VERSION 2.0.5
RUN rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB \
&& yum -y install https://downloads.mariadb.com/enterprise/yzsw-dthq/generate/10.0/mariadb-enterprise-repository.rpm \
&& yum -y update \
&& yum -y install maxscale-$MAXSCALE_VERSION \
&& yum clean all \
&& rm -rf /tmp/*
# Move configuration file in directory for exports
RUN mkdir -p /etc/maxscale.d \
&& cp /etc/maxscale.cnf.template /etc/maxscale.d/maxscale.cnf \
&& ln -sf /etc/maxscale.d/maxscale.cnf /etc/maxscale.cnf
RUN mkdir -p /data/maxscale/data /data/maxscale/logs /data/maxscale/cache /data/maxscale/tmp
# VOLUME for custom configuration
VOLUME ["/etc/maxscale.d"]
# EXPOSE the MaxScale default ports
## RW Split Listener
EXPOSE 4006
## Read Connection Listener
EXPOSE 4008
## Debug Listener
EXPOSE 4442
## CLI Listener
EXPOSE 6603
# Running MaxScale
ENTRYPOINT ["/usr/bin/maxscale", "-d"]