-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (46 loc) · 1.56 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
FROM ubuntu:16.04
MAINTAINER loyating <[email protected]>
ENV BUILD_TYPE release
ENV LIB_TYPE shared
ADD ./sources.list /etc/apt/
ADD ./ninja-1.8.2.tar.gz /root/
ADD ./meson-0.48.1.tar.gz /root/
ADD ./jsoncpp-1.8.4.tar.gz /root/
ADD ./protobuf-cpp-3.3.0.tar.gz /root/
# install modules
RUN apt-get update && apt-get install -y \
python3 \
python3-setuptools \
re2c \
gcc \
g++ \
autoconf \
automake \
libtool \
make \
unzip \
libmysqlclient-dev \
libcurl4-openssl-dev && \
ln -s /usr/bin/python3.5 /usr/bin/python && \
python --version && \
echo "===>Install ninja-1.8.2..." && \
cd /root/ninja-1.8.2/ && \
./configure.py --bootstrap && \
cp /root/ninja-1.8.2/ninja /usr/bin/ && \
echo "===>Install meson-0.48.1..." && \
cd /root/meson-0.48.1/ && \
python setup.py install && \
echo "===>Install jsoncpp-1.8.4..." && \
cd /root/jsoncpp-1.8.4/ && \
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE} && \
ninja -v -C build-${LIB_TYPE} && \
cd build-${LIB_TYPE}/ && \
meson test --no-rebuild --print-errorlogs && \
ninja install && \
echo "===>Install protobuf-cpp-3.3.0..." && \
cd /root/protobuf-3.3.0/ && \
./configure && make && make check && make install && ldconfig && \
echo "===> Clean up..." && \
apt-get remove -y --auto-remove make python3 python3-setuptools re2c libtool unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && rm -rf /root/*