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