Dockerfile 1.8 KB

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