2021-03-05 15:00:30 +01:00
|
|
|
FROM debian:10 as build
|
2019-08-01 13:52:16 +02:00
|
|
|
|
2021-03-05 15:00:30 +01:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
git g++ make binutils autoconf automake autotools-dev libtool \
|
|
|
|
pkg-config \
|
|
|
|
zlib1g-dev libev-dev libjemalloc-dev ruby-dev libc-ares-dev bison && \
|
2021-08-26 14:41:06 +02:00
|
|
|
git clone --depth 1 -b OpenSSL_1_1_1l+quic https://github.com/quictls/openssl && \
|
2019-08-01 13:52:16 +02:00
|
|
|
cd openssl && ./config enable-tls1_3 --openssldir=/etc/ssl && make -j$(nproc) && make install_sw && cd .. && rm -rf openssl && \
|
|
|
|
git clone --depth 1 https://github.com/ngtcp2/nghttp3 && \
|
|
|
|
cd nghttp3 && autoreconf -i && \
|
|
|
|
./configure --enable-lib-only && \
|
|
|
|
make -j$(nproc) && make install-strip && cd .. && rm -rf nghttp3 && \
|
2019-11-06 14:49:22 +01:00
|
|
|
git clone --depth 1 https://github.com/ngtcp2/ngtcp2 && \
|
2019-08-01 13:52:16 +02:00
|
|
|
cd ngtcp2 && autoreconf -i && \
|
2021-08-22 14:16:23 +02:00
|
|
|
./configure --enable-lib-only \
|
|
|
|
LIBTOOL_LDFLAGS="-static-libtool-libs" \
|
|
|
|
OPENSSL_LIBS="-l:libssl.a -l:libcrypto.a -ldl -lpthread" && \
|
2019-08-01 13:52:16 +02:00
|
|
|
make -j$(nproc) && make install-strip && cd .. && rm -rf ngtcp2 && \
|
2021-08-22 14:16:23 +02:00
|
|
|
git clone --depth 1 https://github.com/nghttp2/nghttp2.git && \
|
2019-08-01 13:52:16 +02:00
|
|
|
cd nghttp2 && \
|
|
|
|
git submodule update --init && autoreconf -i && \
|
2021-03-05 15:00:30 +01:00
|
|
|
./configure --disable-examples --disable-hpack-tools \
|
|
|
|
--disable-python-bindings --with-mruby --with-neverbleed \
|
2021-08-22 14:16:23 +02:00
|
|
|
--enable-http3 \
|
2021-03-05 15:00:30 +01:00
|
|
|
LIBTOOL_LDFLAGS="-static-libtool-libs" \
|
|
|
|
LIBS="-ldl -pthread" \
|
|
|
|
OPENSSL_LIBS="-l:libssl.a -l:libcrypto.a" \
|
|
|
|
LIBEV_LIBS="-l:libev.a" \
|
|
|
|
JEMALLOC_LIBS="-l:libjemalloc.a" \
|
|
|
|
LIBCARES_LIBS="-l:libcares.a" \
|
|
|
|
ZLIB_LIBS="-l:libz.a" && \
|
|
|
|
make -j$(nproc) install-strip
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/cc-debian10
|
|
|
|
|
|
|
|
COPY --from=build /usr/local/bin/h2load /usr/local/bin/
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/h2load"]
|