Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 57 additions & 48 deletions containers/buildUbuntuDevel.docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG COMPILER_VERSION=13
ARG CLANG_VERSION=19

# First rebuild glibc with a special option and provide some .deb files:
FROM ubuntu:24.04 as glibcdebs
FROM ubuntu:24.04 AS glibcdebs

COPY ./static /static
RUN /static/prepare.sh
Expand All @@ -12,52 +12,60 @@ RUN /static/rebuild_glibc.sh
# Now prepare a standard Ubuntu image and install the provided .deb files
# for glibc as a preparation:

FROM ubuntu:24.04 as prepare
FROM ubuntu:24.04 AS prepare

RUN apt-get update && apt-get upgrade -y && apt-get install -y libgd3 linux-libc-dev libcrypt-dev libnsl-dev rpcsvc-proto libtirpc-dev curl gnupg gnupg2
RUN apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get install -y \
software-properties-common net-tools lsb-release \
build-essential cmake make bison flex python3 ccache git libjemalloc-dev \
vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq libdb-dev \
gcovr prometheus bc tcpdump liburing-dev cppcheck libopenblas-dev gfortran \
cmake ninja-build git liblapack-dev python3-pip libgd3 linux-libc-dev libcrypt-dev \
libnsl-dev rpcsvc-proto libtirpc-dev curl gnupg gnupg2 \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists

COPY --from=glibcdebs /root/debs /debs
RUN dpkg -i /debs/*.deb

# Now build V8:

#FROM ubuntu:24.04 as v81
#FROM ubuntu:24.04 AS v81
#
#COPY ./tools/build_v8_arm64.sh /tools/build_v8_arm64.sh
#RUN /tools/build_v8_arm64.sh
#
#FROM v81 as v8
#FROM v81 AS v8
#
#COPY ./tools/install_v8_arm64.sh /tools/install_v8_arm64.sh
#RUN /tools/install_v8_arm64.sh

# Build OpenMP static library
FROM ubuntu:24.04 as openmp
FROM ubuntu:24.04 AS openmp

ARG COMPILER_VERSION
ARG CLANG_VERSION
ARG CLANG_FULL_VERSION

RUN apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get install -y software-properties-common net-tools wget lsb-release
apt-get install -y software-properties-common net-tools curl lsb-release dpkg-dev git \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists

WORKDIR /

COPY static/llvm.sources ./

RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources

RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN apt-get update && apt-get install dpkg-dev -y
RUN curl -o- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN apt-get source llvm-${CLANG_VERSION}-dev -y && \
apt-get build-dep llvm-${CLANG_VERSION}-dev -y

RUN apt-get update --fix-missing && apt-get install -y \
clang-${CLANG_VERSION} clang++-${CLANG_VERSION} \
cmake ninja-build git
RUN apt-get update --fix-missing && \
apt-get source llvm-${CLANG_VERSION}-dev -y && \
apt-get build-dep -y llvm-${CLANG_VERSION}-dev && \
apt-get update --fix-missing && \
apt-get install -y clang-${CLANG_VERSION} clang++-${CLANG_VERSION} && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists

COPY patches/diff_llvm.patch .

Expand All @@ -73,14 +81,35 @@ WORKDIR build
RUN cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;openmp" -DCMAKE_C_COMPILER=clang-${CLANG_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${CLANG_VERSION} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBOMP_ENABLE_SHARED=OFF \
-DENABLE_OMPT_TOOLS=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja
-DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja && \
mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a


FROM prepare AS nodejs
# yarn for UI build:
ARG NODE_VERSION="20.14.0"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" &&\
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
node --version && \
npm install -g yarn && \
ln -s /root/.nvm/versions/node/v${NODE_VERSION}/bin/* /usr/local/bin/


RUN mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a
FROM nodejs AS node_modules

RUN cd / ; git clone -n --depth=1 --filter=tree:0 https://github.com/arangodb/arangodb && \
cd /arangodb && git sparse-checkout set --no-cone js/apps/system/_admin/aardvark/APP/react && \
git checkout && \
cd /arangodb/js/apps/system/_admin/aardvark/APP/react && yarn install && mv node_modules / && \
cd / && rm -rf /arangodb && tar -cvJf /root/node_modules.tar.xz node_modules && rm -rf /node_modules

# Finally, build the actual build image based on the above preparation:

FROM prepare
FROM nodejs

MAINTAINER Max Neunhoeffer <max@arangodb.com>

Expand All @@ -94,47 +123,25 @@ ARG SCCACHE_VERSION="0.9.1"
ENV COMPILER_VERSION=${COMPILER_VERSION}
ENV CLANG_VERSION=${CLANG_VERSION}

RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common net-tools wget && \
apt-get update && \
apt-get upgrade -y

COPY static/llvm.sources ./

RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources

RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN curl -o- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update --fix-missing && \
apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
cmake make bison flex python3 ccache git libjemalloc-dev vim exuberant-ctags gdb fish \
psmisc sudo debhelper debconf jq wget libdb-dev gcovr prometheus bc tcpdump \
liburing-dev cppcheck clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
libclang-rt-${CLANG_VERSION}-dev libomp-${CLANG_VERSION}-dev liblapack-dev libopenblas-dev gfortran \
&& apt-get clean
apt-get install -y gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
libclang-rt-${CLANG_VERSION}-dev libomp-${CLANG_VERSION}-dev && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists

# sccache for cloud compiler cache:

RUN curl -L https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl.tar.gz | tar xvz -C /tmp && mv /tmp/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl/sccache /usr/bin/sccache && chmod +x /usr/bin/sccache && rm -rf /tmp/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl


# yarn for UI build:
ARG NODE_VERSION="20.14.0"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" &&\
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
node --version && \
npm install -g yarn && \
ln -s /root/.nvm/versions/node/v${NODE_VERSION}/bin/* /usr/local/bin/



# Fetch V8:
#COPY --from=v8 /opt/v8/lib /opt/v8/lib
#COPY --from=v8 /opt/v8/include /opt/v8/include
Expand Down Expand Up @@ -162,6 +169,8 @@ RUN LC_ALL="C" update-ccache-symlinks

RUN git config --global --add safe.directory '*'

RUN apt-get install -y python3-pip && pip3 install py7zr psutil cppcheck-junit --break-system-packages
COPY --from=node_modules /root/node_modules.tar.xz /node_modules.tar.xz

RUN pip3 install py7zr psutil cppcheck-junit lcov_cobertura --break-system-packages

CMD [ "/usr/bin/fish" ]
105 changes: 57 additions & 48 deletions containers/buildUbuntuDevel.docker/Dockerfile.x86-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG COMPILER_VERSION=13
ARG CLANG_VERSION=19

# First rebuild glibc with a special option and provide some .deb files:
FROM ubuntu:24.04 as glibcdebs
FROM ubuntu:24.04 AS glibcdebs

COPY ./static /static
RUN /static/prepare.sh
Expand All @@ -12,51 +12,59 @@ RUN /static/rebuild_glibc.sh
# Now prepare a standard Ubuntu image and install the provided .deb files
# for glibc as a preparation:

FROM ubuntu:24.04 as prepare
FROM ubuntu:24.04 AS prepare

RUN apt-get update && apt-get upgrade -y && apt-get install -y libgd3 linux-libc-dev libcrypt-dev libnsl-dev rpcsvc-proto libtirpc-dev curl gnupg gnupg2
RUN apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get install -y \
software-properties-common net-tools lsb-release \
build-essential cmake make bison flex python3 ccache git libjemalloc-dev \
vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq libdb-dev \
gcovr prometheus bc tcpdump liburing-dev cppcheck libopenblas-dev gfortran \
cmake ninja-build git liblapack-dev python3-pip libgd3 linux-libc-dev libcrypt-dev \
libnsl-dev rpcsvc-proto libtirpc-dev curl gnupg gnupg2 \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists

COPY --from=glibcdebs /root/debs /debs
RUN dpkg -i /debs/*.deb

# Now build V8:

#FROM ubuntu:24.04 as v81
#FROM ubuntu:24.04 AS v81
#
#COPY ./tools/build_v8.sh /tools/build_v8.sh
#RUN /tools/build_v8.sh
#
#FROM v81 as v8
#FROM v81 AS v8
#
#COPY ./tools/install_v8.sh /tools/install_v8.sh
#RUN /tools/install_v8.sh

# Build OpenMP static library
FROM ubuntu:24.04 as openmp
FROM ubuntu:24.04 AS openmp

ARG COMPILER_VERSION
ARG CLANG_VERSION

RUN apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get install -y software-properties-common net-tools wget lsb-release
apt-get install -y software-properties-common net-tools curl lsb-release dpkg-dev git \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists

WORKDIR /

COPY static/llvm.sources ./

RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources

RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN apt-get update && apt-get install dpkg-dev -y
RUN curl -o- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN apt-get source llvm-${CLANG_VERSION}-dev -y && \
apt-get build-dep llvm-${CLANG_VERSION}-dev -y

RUN apt-get update --fix-missing && apt-get install -y \
clang-${CLANG_VERSION} clang++-${CLANG_VERSION} \
cmake ninja-build git
RUN apt-get update --fix-missing && \
apt-get source llvm-${CLANG_VERSION}-dev -y && \
apt-get build-dep -y llvm-${CLANG_VERSION}-dev && \
apt-get update --fix-missing && \
apt-get install -y clang-${CLANG_VERSION} clang++-${CLANG_VERSION} && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists

COPY patches/diff_llvm.patch .

Expand All @@ -72,14 +80,35 @@ WORKDIR build
RUN cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;openmp" -DCMAKE_C_COMPILER=clang-${CLANG_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${CLANG_VERSION} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBOMP_ENABLE_SHARED=OFF \
-DENABLE_OMPT_TOOLS=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja
-DENABLE_LIBOMPTARGET=OFF -DLIBOMP_INSTALL_ALIASES=OFF ../llvm && ninja && \
mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a


FROM prepare AS nodejs
# yarn for UI build:
ARG NODE_VERSION="20.14.0"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" &&\
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
node --version && \
npm install -g yarn && \
ln -s /root/.nvm/versions/node/v${NODE_VERSION}/bin/* /usr/local/bin/


RUN mkdir -p /opt/omp && cp ./lib/libomp.so.5 /opt/omp/libomp.a
FROM nodejs AS node_modules

RUN cd / ; git clone -n --depth=1 --filter=tree:0 https://github.com/arangodb/arangodb && \
cd /arangodb && git sparse-checkout set --no-cone js/apps/system/_admin/aardvark/APP/react && \
git checkout && \
cd /arangodb/js/apps/system/_admin/aardvark/APP/react && yarn install && mv node_modules / && \
cd / && rm -rf /arangodb && tar -cvJf /root/node_modules.tar.xz node_modules && rm -rf /node_modules

# Finally, build the actual build image based on the above preparation:

FROM prepare
FROM nodejs

MAINTAINER Max Neunhoeffer <max@arangodb.com>

Expand All @@ -93,47 +122,25 @@ ARG SCCACHE_VERSION="0.9.1"
ENV COMPILER_VERSION=${COMPILER_VERSION}
ENV CLANG_VERSION=${CLANG_VERSION}

RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common net-tools wget && \
apt-get update && \
apt-get upgrade -y

COPY static/llvm.sources ./

RUN cat llvm.sources >> /etc/apt/sources.list.d/ubuntu.sources

RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN curl -o- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update --fix-missing && \
apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
cmake make bison flex python3 ccache git libjemalloc-dev vim exuberant-ctags gdb fish \
psmisc sudo debhelper debconf jq wget libdb-dev gcovr prometheus bc tcpdump \
liburing-dev cppcheck clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
libclang-rt-${CLANG_VERSION}-dev libomp-${CLANG_VERSION}-dev liblapack-dev libopenblas-dev gfortran \
&& apt-get clean

apt-get install -y gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} \
clang-${CLANG_VERSION} lldb-${CLANG_VERSION} lld-${CLANG_VERSION} \
libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev libclang-common-${CLANG_VERSION}-dev \
libclang-rt-${CLANG_VERSION}-dev libomp-${CLANG_VERSION}-dev findutils && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists

# sccache for cloud compiler cache:

RUN curl -L https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl.tar.gz | tar xvz -C /tmp && mv /tmp/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl/sccache /usr/bin/sccache && chmod +x /usr/bin/sccache && rm -rf /tmp/sccache-v${SCCACHE_VERSION}-${ARCH}-unknown-linux-musl


# yarn for UI build:
ARG NODE_VERSION="20.14.0"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" &&\
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
node --version && \
npm install -g yarn && \
ln -s /root/.nvm/versions/node/v${NODE_VERSION}/bin/* /usr/local/bin/


# Fetch V8:
#COPY --from=v8 /opt/v8/lib /opt/v8/lib
#COPY --from=v8 /opt/v8/include /opt/v8/include
Expand Down Expand Up @@ -161,6 +168,8 @@ RUN LC_ALL="C" update-ccache-symlinks

RUN git config --global --add safe.directory '*'

RUN apt-get install -y python3-pip && pip3 install py7zr psutil cppcheck-junit lcov_cobertura --break-system-packages
COPY --from=node_modules /root/node_modules.tar.xz /node_modules.tar.xz

RUN pip3 install py7zr psutil cppcheck-junit lcov_cobertura --break-system-packages

CMD [ "/usr/bin/fish" ]
5 changes: 3 additions & 2 deletions containers/buildUbuntuDevel.docker/tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export OPENSSLPATH=`echo $OPENSSLVERSION | sed 's/\.[0-9]*$//g'`
[ "$ARCH" = "x86_64" -a ${OPENSSLPATH:0:1} = "3" ] && X86_64_SUFFIX=64

cd /tmp
wget https://www.openssl.org/source/openssl-$OPENSSLVERSION.tar.gz
tar xzf openssl-$OPENSSLVERSION.tar.gz
TARBALL=openssl-$OPENSSLVERSION.tar.gz
curl -L --output $TARBALL https://www.openssl.org/source/$TARBALL
tar xzf $TARBALL
cd openssl-$OPENSSLVERSION
./config --prefix=/opt no-async no-dso
make -j$(nproc) || exit 1
Expand Down
Loading