1FROM martenseemann/quic-network-simulator-endpoint:latest 2 3# Make sure curl picks up the new openssl 4ENV PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig/:$PKG_CONFIG_LIBDIR 5# Set the environment variable LD_LIBRARY_PATH to ensure we get the right libraries 6ENV LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH 7# The branch of openssl to clone 8ARG OPENSSL_URL=https://github.com/openssl/openssl.git 9ARG OPENSSL_BRANCH=master 10 11# Install needed tools 12RUN apt-get update && apt-get install -y \ 13 git make gcc perl cmake build-essential \ 14 autoconf libtool pkg-config libpsl-dev 15 16WORKDIR / 17 18# build nghttp3 19RUN git clone --depth 1 https://github.com/ngtcp2/nghttp3.git && \ 20 cd nghttp3 && \ 21 git submodule update --init && \ 22 autoreconf -i && \ 23 ./configure --prefix=/usr && \ 24 make -j 4 check && \ 25 make install && \ 26 rm -rf /nghttp3 27 28# download and build openssl 29RUN git clone --depth 1 -b $OPENSSL_BRANCH $OPENSSL_URL && \ 30 cd openssl && \ 31 ./Configure enable-sslkeylog enable-fips enable-demos enable-h3demo enable-hqinterop disable-docs --prefix=/usr --openssldir=/etc/pki/tls && \ 32 make -j 4 && make install && cp test/quic-openssl-docker/hq-interop/quic-hq-interop /usr/local/bin && \ 33 cp test/quic-openssl-docker/hq-interop/quic-hq-interop-server /usr/local/bin && \ 34 cp demos/http3/ossl-nghttp3-demo-server /usr/local/bin && \ 35 rm -rf /openssl 36 37# Build curl 38RUN git clone --depth 1 https://github.com/curl/curl.git && \ 39 cd curl && \ 40 autoreconf -fi && ./configure --with-openssl-quic --with-openssl --with-nghttp3 --prefix=/usr && \ 41 make -j 4 && \ 42 make install && \ 43 rm -rf /curl 44 45# copy run script and run it 46COPY run_endpoint.sh . 47RUN chmod +x run_endpoint.sh 48RUN apt-get clean 49ENTRYPOINT [ "./run_endpoint.sh" ] 50 51