forked from vesoft-inc/nebula-dev-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ubuntu
More file actions
102 lines (88 loc) · 2.94 KB
/
Copy pathDockerfile.ubuntu
File metadata and controls
102 lines (88 loc) · 2.94 KB
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
ARG VERSION=xenial
ARG DEBIAN_FRONTEND=noninteractive
FROM ubuntu:${VERSION}
ARG VERSION=xenial
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.3.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.3.0 \
&& /opt/vesoft/bin/install-llvm --version=10.0.0 \
&& /opt/vesoft/bin/install-cmake
# 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 1.0 and 2.0 and 3.0 and 3.3
RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \
&& cd nebula-third-party \
&& ./install-third-party.sh \
&& git checkout origin/release-3.3 \
&& ./install-third-party.sh \
&& git checkout origin/release-3.4-cloud \
&& ./install-third-party.sh \
&& git checkout origin/v3.0 \
&& ./install-third-party.sh \
&& git checkout origin/v2.0 \
&& ./install-third-party.sh \
&& git checkout origin/v1.0 \
&& ./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 ossutil64
RUN [[ $(uname -m) = "aarch64" ]] && ARCH="arm"; \
wget -q -O /usr/bin/ossutil64 "http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil${ARCH}64" \
&& chmod +x /usr/bin/ossutil64
#Install mold
RUN mkdir /usr/local/mold && wget -qO- https://github.com/rui314/mold/releases/download/v1.10.1/mold-1.10.1-$(uname -m)-linux.tar.gz | tar xzf - --strip-components=1 -C /usr/local/mold/
ENV PATH=/usr/local/mold/bin:${PATH}