forked from mariadb-corporation/MaxScale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
38 lines (31 loc) · 1012 Bytes
/
Dockerfile.build
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
36
37
FROM centos:7
COPY MariaDB.repo /etc/yum.repos.d/MariaDB.repo
# Install Prerequisites
RUN yum install -y epel-release
RUN yum update -y
RUN yum install -y lsb
RUN yum install -y gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake libgcc perl make libtool \
openssl-devel libaio libaio-devel librabbitmq-devel libcurl-devel pcre-devel rpm-build libedit-devel \
git xz-devel
RUN yum install -y mariadb-server
RUN yum install -y mariadb-devel
RUN git clone https://github.com/cbegin/GPLScale.git
# Install PCRE2
RUN mkdir -p /GPLScale/pcre2/build
WORKDIR /GPLScale/pcre2/build
RUN cmake .. -DCMAKE_C_FLAGS=-fPIC -DBUILD_SHARED_LIBS=N -DPCRE2_BUILD_PCRE2GREP=N -DPCRE2_BUILD_TESTS=N
RUN make
RUN make install
# Install MaxScale
RUN mkdir -p /GPLScale/build
WORKDIR /GPLScale/build
RUN cmake .. -DPACKAGE=Y
RUN make
RUN make install
# Test MaxScale
RUN make testcore
# Package MaxScale
RUN make package
RUN mkdir /packages && \
mv maxscale*.rpm /packages && \
mv maxscale*.tar.gz /packages