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-fips enable-demos disable-docs --prefix=/usr --openssldir=/etc/pki/tls && \ 32 make -j 4 && make install && cp demos/guide/quic-hq-interop /usr/local/bin && \ 33 rm -rf /openssl 34 35# Build curl 36RUN git clone --depth 1 https://github.com/curl/curl.git && \ 37 cd curl && \ 38 autoreconf -fi && ./configure --with-openssl-quic --with-openssl --with-nghttp3 --prefix=/usr && \ 39 make -j 4 && \ 40 make install && \ 41 rm -rf /curl 42 43# copy run script and run it 44COPY run_endpoint.sh . 45RUN chmod +x run_endpoint.sh 46RUN apt-get clean 47ENTRYPOINT [ "./run_endpoint.sh" ] 48 49