-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.centos7
117 lines (102 loc) · 3.63 KB
/
Dockerfile.centos7
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
FROM centos:7
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV LANG=en_US.utf8
RUN sed -i 's/^mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-Base.repo && \
sed -i "s|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Base.repo && \
yum update -y && yum install -y epel-release \
&& yum install -y \
autoconf \
curl \
curl-devel \
expat-devel \
gettext \
glibc-devel \
glibc-headers \
# FIXME: Please remove following libev libraries after third party rebuilt.
libev \
libev-devel \
m4 \
make \
ncurses-devel \
openldap-devel \
openssh-clients \
openssl-devel \
# for lcov
perl-JSON \
perl-PerlIO-gzip \
perl-Digest-MD5 \
python3-devel \
python3-pip \
readline-devel \
redhat-lsb-core \
rpm-build \
sudo \
unzip \
vim \
wget \
xz \
zlib-devel \
# client
libatomic \
ninja-build \
centos-release-scl && \
yum clean all && rm -rf /var/cache/yum
WORKDIR /root
ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0
ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.5.0
ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_GCC_DIR}/bin:${TOOLSET_CLANG_DIR}/bin:${PATH}
ENV CCACHE_CPP2=1
ENV CC=${TOOLSET_GCC_DIR}/bin/gcc
ENV CXX=${TOOLSET_GCC_DIR}/bin/g++
ENV GCOV=${TOOLSET_GCC_DIR}/bin/gcov
SHELL ["/bin/bash", "-c"]
# Install gcc and llvm by nebula-gears
RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \
&& /opt/vesoft/bin/install-gcc --version=9.5.0 \
&& /opt/vesoft/bin/install-llvm --version=10.0.0
# Install cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-$(uname -m).sh \
&& chmod +x cmake-3.20.0-linux-$(uname -m).sh \
&& ./cmake-3.20.0-linux-$(uname -m).sh --skip-license --prefix=/usr/local \
&& rm cmake-3.20.0-linux-$(uname -m).sh
# Install git 2.25
RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C ./ \
&& cd git-2.25.0 \
&& make configure \
&& ./configure --prefix=/usr \
&& make -j$(nproc) && make install \
&& cd ../ && rm -rf git-2.25.0
# Install nebula third-party master
RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \
&& cd nebula-third-party \
&& ./install-third-party.sh \
&& cd .. && rm -rf nebula-third-party
# Install ccache
RUN wget -qO- https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz | tar zxf - -C ./ \
&& cd ccache-3.7.7 \
&& ./configure \
&& make -j \
&& make install \
&& cd ../ && rm -rf ccache-*
# Install lcov to /usr/local/bin, require master to make gcc9 happy
RUN git clone --branch master --single-branch https://github.com/linux-test-project/lcov.git \
&& cd lcov && git checkout 75fbae1cfc5027f818a0bb865bf6f96fab3202da \
&& make install && cd ../ && rm -rf lcov
# fastcov
RUN pip3 install --no-cache-dir fastcov
# Install ossutil
RUN curl https://gosspublic.alicdn.com/ossutil/install.sh | bash
#Install minio client
RUN if [ "$(uname -m)" = "x86_64" ]; then \
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc; \
else \
curl -O https://dl.min.io/client/mc/release/linux-arm64/mc; \
fi \
&& chmod +x mc \
&& mv mc /usr/local/bin/
# Install Node.js
RUN cd /usr/src && \
wget https://unofficial-builds.nodejs.org/download/release/v20.12.1/node-v20.12.1-linux-x64-glibc-217.tar.gz && \
tar -zxf node-v20.12.1-linux-x64-glibc-217.tar.gz --strip-components=1 -C /usr/local/ && \
rm node-v20.12.1-linux-x64-glibc-217.tar.gz