This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
69 lines (56 loc) · 2.46 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM centos:centos7 AS base-dependencies
LABEL maintainer="Abdelrahman Hosny <[email protected]>"
# Install dev and runtime dependencies
RUN yum group install -y "Development Tools" \
&& yum install -y https://repo.ius.io/ius-release-el7.rpm \
&& yum install -y centos-release-scl \
&& yum install -y wget devtoolset-8 \
devtoolset-8-libatomic-devel tcl-devel tcl tk libstdc++ tk-devel pcre-devel \
python36u python36u-libs python36u-devel python36u-pip && \
yum clean -y all && \
rm -rf /var/lib/apt/lists/*
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc \
CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp \
CXX=/opt/rh/devtoolset-8/root/usr/bin/g++ \
PATH=/opt/rh/devtoolset-8/root/usr/bin:$PATH \
LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:$LD_LIBRARY_PATH
# Install CMake
RUN wget https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh && \
chmod +x cmake-3.14.0-Linux-x86_64.sh && \
./cmake-3.14.0-Linux-x86_64.sh --skip-license --prefix=/usr/local && rm -rf cmake-3.14.0-Linux-x86_64.sh \
&& yum clean -y all
# Install epel repo
RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum install -y epel-release-latest-7.noarch.rpm && rm -rf epel-release-latest-7.noarch.rpm \
&& yum clean -y all
# Install any git version > 2.6.5
RUN yum remove -y git* && yum install -y git224
# Install SWIG
RUN yum remove -y swig \
&& wget https://github.com/swig/swig/archive/rel-4.0.1.tar.gz \
&& tar xfz rel-4.0.1.tar.gz \
&& rm -rf rel-4.0.1.tar.gz \
&& cd swig-rel-4.0.1 \
&& ./autogen.sh && ./configure --prefix=/usr && make -j $(nproc) && make install \
&& cd .. \
&& rm -rf swig-rel-4.0.1
# boost
RUN wget https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download && \
tar -xf download && \
cd boost_1_72_0 && \
./bootstrap.sh && \
./b2 install --with-iostreams --with-test -j $(nproc)
RUN pip3 install testtools
# spdlog for logging
RUN git clone -b v1.8.1 https://github.com/gabime/spdlog.git \
&& cd spdlog \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install -j
FROM base-dependencies AS builder
COPY . /OpenDB
WORKDIR /OpenDB
# Build
RUN mkdir build
RUN cd build && cmake .. && make -j 4