Home | History | Annotate | Line # | Download | only in quic-openssl-docker
      1 FROM martenseemann/quic-network-simulator-endpoint:latest
      2 
      3 # Make sure curl picks up the new openssl
      4 ENV 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
      6 ENV LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
      7 # The branch of openssl to clone
      8 ARG OPENSSL_URL=https://github.com/openssl/openssl.git
      9 ARG OPENSSL_BRANCH=master
     10 
     11 # Install needed tools
     12 RUN apt-get update && apt-get install -y \
     13     git make gcc perl cmake build-essential \
     14     autoconf libtool pkg-config libpsl-dev
     15 
     16 WORKDIR /
     17 
     18 # build nghttp3
     19 RUN 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 
     29 RUN 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
     38 RUN 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
     46 COPY run_endpoint.sh .
     47 RUN chmod +x run_endpoint.sh
     48 RUN apt-get clean
     49 ENTRYPOINT [ "./run_endpoint.sh" ]
     50 
     51