forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.staticbuild
99 lines (83 loc) · 2.37 KB
/
Dockerfile.staticbuild
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
FROM centos:7
RUN yum install -y epel-release
RUN yum install -y yum install https://centos7.iuscommunity.org/ius-release.rpm
RUN set -x \
&& yum -y install \
libstdc++ \
libstdc++-static \
readline \
openssl \
lz4 \
binutils \
ncurses \
libgomp \
lua \
curl \
tar \
zip \
unzip \
libunwind \
zlib \
&& yum -y install \
perl \
gcc-c++ \
cmake \
lz4-devel \
binutils-devel \
lua-devel \
make \
git \
autoconf \
automake \
libtool \
wget
RUN yum -y install ncurses-static readline-static zlib-static pcre-static glibc-static
RUN yum -y install python-devel python-pip
RUN set -x && \
cd / && \
curl -O -L https://www.openssl.org/source/openssl-1.1.0h.tar.gz && \
tar -xvf openssl-1.1.0h.tar.gz && \
cd openssl-1.1.0h && \
./config --libdir=lib && \
make && make install
RUN set -x && \
cd / && \
wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz && \
tar -xvf icu4c-62_1-src.tgz && \
cd icu/source && \
./configure --with-data-packaging=static --enable-static --enable-shared && \
make && make install
RUN set -x && \
cd / && \
LD_LIBRARY_PATH=/usr/local/lib64 curl -O -L http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.3-rc1.tar.gz && \
tar -xvf libunwind-1.3-rc1.tar.gz && \
cd libunwind-1.3-rc1 && \
./configure --enable-static --enable-shared && \
make && make install
COPY . /tarantool
RUN set -x && \
cd tarantool && \
git submodule init && \
git submodule update
WORKDIR /tarantool
RUN set -x && \
find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
find . -name 'CMakeCache.txt' -type f -delete
RUN pip install -r /tarantool/test-run/requirements.txt
RUN set -x \
&& (cd /tarantool; \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_DIST:BOOL=ON \
-DBUILD_STATIC=ON \
-DOPENSSL_USE_STATIC_LIBS=ON \
-DOPENSSL_ROOT_DIR=/usr/local \
.) \
&& make -C /tarantool -j
RUN cd /tarantool && make install
ARG RUN_TESTS
RUN if [ -n "${RUN_TESTS}" ]; then \
set -x && \
cd test && \
/usr/bin/python test-run.py --force; \
fi
ENTRYPOINT /bin/bash