Skip to content
Merged
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
31 changes: 21 additions & 10 deletions contrib/docker/ubuntu/noble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# the License.
#
#######################
FROM ubuntu:noble AS build
FROM ubuntu:noble AS build-setup

ARG LLVM_VERSION=18
ARG BASE=/opt
ARG ATS_VERSION=10.1.0
ARG GO_VERSION=1.26.2

RUN apt update \
&& apt upgrade --yes \
Expand All @@ -39,6 +39,7 @@ RUN apt update \
libtool \
make \
pkg-config \
libpsl-dev \
# ATS deps
libxml2-dev \
libjemalloc-dev \
Expand All @@ -61,12 +62,18 @@ RUN apt update \
libssl-dev \
&& apt clean --yes

# Set up cc (and optionally c++) to use clang-18 via alternatives
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100

RUN rustup default stable

RUN mkdir -p ${BASE} && chmod a+rX ${BASE}

RUN if [ `uname -m` = "arm64" -o `uname -m` = "aarch64" ]; then echo "arm64" > /arch; else echo "amd64" > /arch; fi \
&& wget -qO- https://go.dev/dl/go1.21.6.linux-$(cat /arch).tar.gz | tar -C ${BASE} -xzf -
&& wget -qO- https://go.dev/dl/go${GO_VERSION}.linux-$(cat /arch).tar.gz | tar -C ${BASE} -xzf -

ENV CC=clang-${LLVM_VERSION}
ENV CXX=clang++-${LLVM_VERSION}
Expand All @@ -82,7 +89,6 @@ RUN git clone https://boringssl.googlesource.com/boringssl \
-DCMAKE_INSTALL_PREFIX=${BASE}/boringssl \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS='-Wno-error=ignored-attributes -UBORINGSSL_HAVE_LIBUNWIND' \
-DCMAKE_C_FLAGS=${BSSL_C_FLAGS} \
-DBUILD_SHARED_LIBS=1 \
&& cmake \
-B build-static \
Expand All @@ -102,15 +108,15 @@ RUN git clone https://boringssl.googlesource.com/boringssl \

ENV QUICHE_BASE="${BASE}/quiche"

RUN git clone -b 0.22.0 --depth 1 https://github.com/cloudflare/quiche.git \
RUN git clone -b 0.28.0 --depth 1 https://github.com/cloudflare/quiche.git \
&& cd quiche \
&& QUICHE_BSSL_PATH=${BASE}/boringssl/lib QUICHE_BSSL_LINK_KIND=dylib \
cargo build -j$(nproc) --package quiche --release --features ffi,pkg-config-meta,qlog \
&& mkdir -p ${QUICHE_BASE}/lib/pkgconfig \
&& mkdir -p ${QUICHE_BASE}/include \
&& cp target/release/libquiche.a ${QUICHE_BASE}/lib/ \
&& cp target/release/libquiche.so ${QUICHE_BASE}/lib/ \
&& ln -s ${QUICHE_BASE}/lib/libquiche.so ${QUICHE_BASE}/lib/libquiche.so.0 \
&& ln -sf ${QUICHE_BASE}/lib/libquiche.so ${QUICHE_BASE}/lib/libquiche.so.0 \
&& cp quiche/include/quiche.h ${QUICHE_BASE}/include/ \
&& cp target/release/quiche.pc ${QUICHE_BASE}/lib/pkgconfig \
&& cd .. \
Expand All @@ -121,12 +127,13 @@ ENV CFLAGS="-O3"
ENV CXXFLAGS="-O3"
ENV PKG_CONFIG_PATH="${BASE}/lib/pkgconfig:${BASE}/boringssl/lib/pkgconfig:${BASE}/quiche/lib/pkgconfig"

RUN git clone --depth 1 -b v1.2.0 https://github.com/ngtcp2/nghttp3.git \
RUN git clone --depth 1 -b v1.15.0 https://github.com/ngtcp2/nghttp3.git \
&& cd nghttp3 \
&& git submodule update --init \
&& autoreconf -if \
&& ./configure \
--prefix=${BASE} \
PKG_CONFIG_PATH=${BASE}/lib/pkgconfig:${BASE}/boringssl/lib/pkgconfig \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
Expand All @@ -137,7 +144,7 @@ RUN git clone --depth 1 -b v1.2.0 https://github.com/ngtcp2/nghttp3.git \
&& rm -rf nghttp3


RUN git clone --depth 1 -b v1.4.0 https://github.com/ngtcp2/ngtcp2.git \
RUN git clone --depth 1 -b v1.22.1 https://github.com/ngtcp2/ngtcp2.git \
&& cd ngtcp2 \
&& autoreconf -if \
&& ./configure \
Expand All @@ -154,7 +161,7 @@ RUN git clone --depth 1 -b v1.4.0 https://github.com/ngtcp2/ngtcp2.git \
&& cd .. \
&& rm -rf ngtcp2

RUN git clone --depth 1 -b v1.60.0 https://github.com/tatsuhiro-t/nghttp2.git \
RUN git clone --depth 1 -b v1.69.0 https://github.com/tatsuhiro-t/nghttp2.git \
&& cd nghttp2 \
&& git submodule update --init \
&& autoreconf -if \
Expand All @@ -172,7 +179,7 @@ RUN git clone --depth 1 -b v1.60.0 https://github.com/tatsuhiro-t/nghttp2.git \
&& cd .. \
&& rm -rf nghttp2

RUN git clone --depth 1 -b curl-8_7_1 https://github.com/curl/curl.git \
RUN git clone --depth 1 -b curl-8_20_0 https://github.com/curl/curl.git \
&& cd curl \
&& autoreconf -fi \
&& ./configure \
Expand All @@ -189,6 +196,10 @@ RUN git clone --depth 1 -b curl-8_7_1 https://github.com/curl/curl.git \
&& cd .. \
&& rm -rf curl

FROM build-setup as build

ARG ATS_VERSION=10.1.0

RUN git clone --depth 1 -b ${ATS_VERSION} https://github.com/apache/trafficserver.git \
&& cmake \
-Strafficserver \
Expand Down