-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.ubuntu
103 lines (89 loc) · 3 KB
/
Dockerfile.ubuntu
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
ARG VERSION=xenial
FROM ubuntu:${VERSION}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV LANG=en_US.utf8
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
ca-certificates \
curl \
gettext \
gnupg2 \
libc-dev \
libcurl4-gnutls-dev \
libexpat1-dev \
libldap2-dev \
libreadline-dev \
libssl-dev \
libz-dev \
locales-all \
lsb-core \
# FIXME: Please remove following libev libraries after third party rebuilt.
libev4 \
libev-dev \
m4 \
make \
ncurses-dev \
ninja-build \
openssh-client \
python3-dev \
python3-pip \
sudo \
tzdata \
unzip \
wget \
xz-utils \
lcov \
&& rm -rf /var/lib/apt/lists/*
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 CC=${TOOLSET_GCC_DIR}/bin/gcc
ENV CXX=${TOOLSET_GCC_DIR}/bin/g++
ENV CCACHE_CPP2=1
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-*
# fastcov
RUN pip3 install --no-cache-dir fastcov
# Install ossutil
RUN curl https://gosspublic.alicdn.com/ossutil/install.sh | bash
#Install mold
RUN mkdir /usr/local/mold && wget -qO- https://github.com/rui314/mold/releases/download/v2.1.0/mold-2.1.0-$(uname -m)-linux.tar.gz | tar xzf - --strip-components=1 -C /usr/local/mold/
ENV PATH=/usr/local/mold/bin:${PATH}
#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/