|
| 1 | +# First rebuild glibc with a special option and provide some .deb files: |
| 2 | + |
| 3 | +FROM ubuntu:24.04 as glibcdebs |
| 4 | + |
| 5 | +COPY ./static /static |
| 6 | +RUN /static/prepare.sh |
| 7 | +RUN /static/rebuild_glibc.sh |
| 8 | + |
| 9 | +# Now prepare a standard Ubuntu image and install the provided .deb files |
| 10 | +# for glibc as a preparation: |
| 11 | + |
| 12 | +FROM ubuntu:24.04 as prepare |
| 13 | + |
| 14 | +RUN apt-get update && apt-get upgrade -y && apt-get install -y libgd3 linux-libc-dev libcrypt-dev libnsl-dev rpcsvc-proto libtirpc-dev |
| 15 | + |
| 16 | +COPY --from=glibcdebs /root/debs /debs |
| 17 | +RUN dpkg -i /debs/*.deb |
| 18 | + |
| 19 | +# Now build V8: |
| 20 | + |
| 21 | +#FROM ubuntu:24.04 as v81 |
| 22 | +# |
| 23 | +#COPY ./tools/build_v8_arm64.sh /tools/build_v8_arm64.sh |
| 24 | +#RUN /tools/build_v8_arm64.sh |
| 25 | +# |
| 26 | +#FROM v81 as v8 |
| 27 | +# |
| 28 | +#COPY ./tools/install_v8_arm64.sh /tools/install_v8_arm64.sh |
| 29 | +#RUN /tools/install_v8_arm64.sh |
| 30 | + |
| 31 | +# Finally, build the actual build image based on the above preparation: |
| 32 | + |
| 33 | +FROM prepare |
| 34 | + |
| 35 | +MAINTAINER Max Neunhoeffer < [email protected]> |
| 36 | + |
| 37 | +ARG ARCH="aarch64" |
| 38 | +ARG SCCACHE_VERSION="0.9.1" |
| 39 | + |
| 40 | +# We provide gcc 13.2.0 as well as clang 16.0.6 from Ubunutu 24.04 |
| 41 | + |
| 42 | +ENV COMPILER_VERSION 13 |
| 43 | +ENV CLANG_VERSION 16 |
| 44 | + |
| 45 | +RUN apt-get update --fix-missing && \ |
| 46 | + apt-get install -y software-properties-common net-tools && \ |
| 47 | + apt-get update && \ |
| 48 | + apt-get upgrade -y |
| 49 | + |
| 50 | +ENV DEBIAN_FRONTEND=noninteractive |
| 51 | + |
| 52 | +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 curl gnupg2 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 nodejs npm && apt-get clean |
| 53 | + |
| 54 | +# yarn for UI build: |
| 55 | +RUN npm install -g yarn |
| 56 | + |
| 57 | +# sccache for cloud compiler cache: |
| 58 | + |
| 59 | +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 |
| 60 | + |
| 61 | +# Fetch V8: |
| 62 | +#COPY --from=v8 /opt/v8/lib /opt/v8/lib |
| 63 | +#COPY --from=v8 /opt/v8/include /opt/v8/include |
| 64 | +#COPY --from=v8 /opt/v8/third_party /opt/v8/third_party |
| 65 | + |
| 66 | +# Build openssl and openldap libraries in specific versions and with static |
| 67 | +# libraries, install with prefix /opt: |
| 68 | + |
| 69 | +COPY ./tools/* /tools/ |
| 70 | + |
| 71 | +RUN [ "/tools/install.sh", "3.4", "0" ] |
| 72 | + |
| 73 | +COPY ./scripts /scripts |
| 74 | + |
| 75 | +# Provide clang as "clang" and "clang++": |
| 76 | + |
| 77 | +RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 100 && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 100 |
| 78 | + |
| 79 | +RUN /scripts/create-sccache-hardlinks.sh |
| 80 | + |
| 81 | +RUN LC_ALL="C" update-ccache-symlinks |
| 82 | + |
| 83 | +RUN git config --global --add safe.directory '*' |
| 84 | + |
| 85 | +RUN apt-get install -y python3-pip && pip3 install py7zr psutil cppcheck-junit --break-system-packages |
| 86 | + |
| 87 | +CMD [ "/usr/bin/fish" ] |
0 commit comments