@@ -3,7 +3,7 @@ ARG COMPILER_VERSION=13
3
3
ARG CLANG_VERSION=19
4
4
5
5
# First rebuild glibc with a special option and provide some .deb files:
6
- FROM ubuntu:24.04 as glibcdebs
6
+ FROM ubuntu:24.04 AS glibcdebs
7
7
8
8
COPY ./static /static
9
9
RUN /static/prepare.sh
@@ -12,52 +12,60 @@ RUN /static/rebuild_glibc.sh
12
12
# Now prepare a standard Ubuntu image and install the provided .deb files
13
13
# for glibc as a preparation:
14
14
15
- FROM ubuntu:24.04 as prepare
15
+ FROM ubuntu:24.04 AS prepare
16
16
17
- RUN apt-get update && apt-get upgrade -y && apt-get install -y libgd3 linux-libc-dev libcrypt-dev libnsl-dev rpcsvc-proto libtirpc-dev
17
+ RUN apt-get update --fix-missing && \
18
+ apt-get upgrade -y && \
19
+ apt-get install -y \
20
+ software-properties-common net-tools lsb-release \
21
+ build-essential cmake make bison flex python3 ccache git libjemalloc-dev \
22
+ vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq libdb-dev \
23
+ gcovr prometheus bc tcpdump liburing-dev cppcheck libopenblas-dev gfortran \
24
+ cmake ninja-build git liblapack-dev python3-pip libgd3 linux-libc-dev libcrypt-dev \
25
+ libnsl-dev rpcsvc-proto libtirpc-dev curl gnupg gnupg2 \
26
+ && rm -rf /var/cache/apt/archives /var/lib/apt/lists
18
27
19
28
COPY --from=glibcdebs /root/debs /debs
20
29
RUN dpkg -i /debs/*.deb
21
30
22
31
# Now build V8:
23
32
24
- #FROM ubuntu:24.04 as v81
33
+ #FROM ubuntu:24.04 AS v81
25
34
#
26
35
#COPY ./tools/build_v8_arm64.sh /tools/build_v8_arm64.sh
27
36
#RUN /tools/build_v8_arm64.sh
28
37
#
29
- #FROM v81 as v8
38
+ #FROM v81 AS v8
30
39
#
31
40
#COPY ./tools/install_v8_arm64.sh /tools/install_v8_arm64.sh
32
41
#RUN /tools/install_v8_arm64.sh
33
42
34
43
# Build OpenMP static library
35
- FROM ubuntu:24.04 as openmp
44
+ FROM ubuntu:24.04 AS openmp
36
45
37
46
ARG COMPILER_VERSION
38
47
ARG CLANG_VERSION
39
48
ARG CLANG_FULL_VERSION
40
49
41
50
RUN apt-get update --fix-missing && \
42
51
apt-get upgrade -y && \
43
- apt-get install -y software-properties-common net-tools wget gnupg lsb-release
52
+ apt-get install -y software-properties-common net-tools curl lsb-release dpkg-dev git \
53
+ && rm -rf /var/cache/apt/archives /var/lib/apt/lists
44
54
45
55
WORKDIR /
46
56
47
57
COPY static/llvm.sources ./
48
58
49
59
RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources
50
60
51
- RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
52
-
53
- RUN apt-get update && apt-get install dpkg-dev -y
61
+ RUN curl -o- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
54
62
55
- RUN apt-get source llvm-${CLANG_VERSION}-dev -y && \
56
- apt-get build-dep llvm-${CLANG_VERSION}-dev -y
57
-
58
- RUN apt-get update --fix-missing && apt-get install -y \
59
- clang-${CLANG_VERSION} clang++-${CLANG_VERSION} \
60
- cmake ninja-build git
63
+ RUN apt-get update --fix-missing && \
64
+ apt-get source llvm-${CLANG_VERSION}-dev -y && \
65
+ apt-get build-dep -y llvm-${CLANG_VERSION}-dev && \
66
+ apt-get update --fix-missing && \
67
+ apt-get install -y clang-${CLANG_VERSION} clang++-${CLANG_VERSION} && \
68
+ rm -rf /var/cache/apt/archives /var/lib/apt/lists
61
69
62
70
COPY patches/diff_llvm.patch .
63
71
@@ -73,14 +81,35 @@ WORKDIR build
73
81
RUN cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;openmp" -DCMAKE_C_COMPILER=clang-${CLANG_VERSION} \
74
82
-DCMAKE_CXX_COMPILER=clang++-${CLANG_VERSION} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBOMP_ENABLE_SHARED=OFF \
75
83
-DENABLE_OMPT_TOOLS=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=/usr \
76
- -DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja
84
+ -DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja && \
85
+ mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a
77
86
78
- RUN mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a
79
87
88
+ FROM prepare AS nodejs
89
+ # yarn for UI build:
90
+ ARG NODE_VERSION="20.14.0"
91
+ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
92
+ export NVM_DIR="$HOME/.nvm" &&\
93
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
94
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
95
+ nvm install ${NODE_VERSION} && \
96
+ nvm use ${NODE_VERSION} && \
97
+ node --version && \
98
+ npm install -g yarn && \
99
+ ln -s /root/.nvm/versions/node/v${NODE_VERSION}/bin/* /usr/local/bin/
100
+
101
+
102
+ FROM nodejs AS node_modules
103
+
104
+ RUN cd / ; git clone -n --depth=1 --filter=tree:0 https://github.com/arangodb/arangodb && \
105
+ cd /arangodb && git sparse-checkout set --no-cone js/apps/system/_admin/aardvark/APP/react && \
106
+ git checkout && \
107
+ cd /arangodb/js/apps/system/_admin/aardvark/APP/react && yarn install && mv node_modules / && \
108
+ cd / && rm -rf /arangodb && tar -cvJf /root/node_modules.tar.xz node_modules && rm -rf /node_modules
80
109
81
110
# Finally, build the actual build image based on the above preparation:
82
111
83
- FROM prepare
112
+ FROM nodejs
84
113
85
114
MAINTAINER Max Neunhoeffer <
[email protected] >
86
115
@@ -94,30 +123,20 @@ ARG SCCACHE_VERSION="0.9.1"
94
123
ENV COMPILER_VERSION=${COMPILER_VERSION}
95
124
ENV CLANG_VERSION=${CLANG_VERSION}
96
125
97
- RUN apt-get update --fix-missing && \
98
- apt-get install -y software-properties-common net-tools gnupg2 wget && \
99
- apt-get update && \
100
- apt-get upgrade -y
101
-
102
126
COPY static/llvm.sources ./
103
127
104
128
RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources
105
129
106
- RUN wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
130
+ RUN curl -o - https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
107
131
108
132
ENV DEBIAN_FRONTEND=noninteractive
109
133
110
134
RUN apt-get update --fix-missing && \
111
- apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
112
- cmake make bison flex python3 ccache git libjemalloc-dev vim exuberant-ctags gdb fish \
113
- psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus bc tcpdump \
114
- liburing-dev cppcheck clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
115
- libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
116
- libclang-rt-${CLANG_VERSION}-dev nodejs npm libomp-${CLANG_VERSION}-dev liblapack-dev libopenblas-dev gfortran \
117
- && apt-get clean
118
-
119
- # yarn for UI build:
120
- RUN npm install -g yarn
135
+ apt-get install -y gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
136
+ clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
137
+ libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
138
+ libclang-rt-${CLANG_VERSION}-dev libomp-${CLANG_VERSION}-dev && \
139
+ rm -rf /var/cache/apt/archives /var/lib/apt/lists
121
140
122
141
# sccache for cloud compiler cache:
123
142
@@ -136,7 +155,7 @@ COPY --from=openmp /opt/omp /opt/omp
136
155
137
156
COPY ./tools/* /tools/
138
157
139
- RUN [ "/tools/install.sh", "3.4 ", "1 " ]
158
+ RUN [ "/tools/install.sh", "3.5 ", "0 " ]
140
159
141
160
COPY ./scripts /scripts
142
161
@@ -150,6 +169,8 @@ RUN LC_ALL="C" update-ccache-symlinks
150
169
151
170
RUN git config --global --add safe.directory '*'
152
171
153
- RUN apt-get install -y python3-pip && pip3 install py7zr psutil cppcheck-junit --break-system-packages
172
+ COPY --from=node_modules /root/node_modules.tar.xz /node_modules.tar.xz
173
+
174
+ RUN pip3 install py7zr psutil cppcheck-junit lcov_cobertura --break-system-packages
154
175
155
176
CMD [ "/usr/bin/fish" ]
0 commit comments