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
24 changes: 7 additions & 17 deletions frameworks/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
ARG NGINX_VERSION=1.30.0
ARG NGINX_VERSION=1.31.3

FROM debian:bookworm AS build
FROM debian:trixie AS build

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential libpcre2-dev zlib1g-dev wget ca-certificates git perl cmake
build-essential libpcre2-dev libssl-dev zlib1g-dev libgd-dev curl ca-certificates gnupg wget git perl cmake -y

# Build quictls (OpenSSL fork with QUIC support). Pinned to the same tag as
# docker/h2load-h3.Dockerfile — the 3.1.5+quic branch this used to track no
# longer configures on current bookworm (perl aborts in Configure).
WORKDIR /tmp
RUN git clone --depth 1 -b openssl-3.3.0-quic1 https://github.com/quictls/openssl.git quictls && \
cd quictls && \
./config --prefix=/opt/quictls --libdir=lib no-tests && \
make -j$(nproc) && \
make install_sw

# Download nginx source
ARG NGINX_VERSION
Expand All @@ -40,25 +35,20 @@ RUN ./configure \
--with-http_gzip_static_module \
--add-module=/tmp/ngx_brotli \
--add-module=/tmp/module \
--with-cc-opt="-O3 -march=native -DNDEBUG -I/opt/quictls/include" \
--with-ld-opt="-lm -L/opt/quictls/lib -Wl,-rpath,/opt/quictls/lib" && \
--with-cc-opt="-O3 -march=native -DNDEBUG" && \
make -j$(nproc)

FROM debian:bookworm-slim
FROM debian:trixie-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libpcre2-8-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the install tree rather than naming versioned sonames: make install_sw
# already lays down the right symlinks, and hand-written ones broke the moment
# the quictls pin moved.
COPY --from=build /opt/quictls/lib/ /opt/quictls/lib/
RUN ldconfig /opt/quictls/lib

ARG NGINX_VERSION
COPY --from=build /tmp/nginx-${NGINX_VERSION}/objs/nginx /usr/sbin/nginx
RUN mkdir -p /usr/local/nginx/logs

COPY nginx.conf /usr/local/nginx/conf/nginx.conf

EXPOSE 8080 8081 8443/tcp 8443/udp
EXPOSE 8080 8081 8082 8443/tcp 8443/udp

CMD ["nginx"]
9 changes: 9 additions & 0 deletions frameworks/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ http {
}
}

#server {
# listen 8082 reuseport;
# http2 on;

# location / {
# httparena;
# }
#}

server {
listen 8443 ssl reuseport;
listen 8443 quic reuseport;
Expand Down