litespeed-quic/Dockerfile

40 lines
1.1 KiB
Docker
Raw Normal View History

2024-02-29 00:05:41 +00:00
FROM ubuntu:20.04 as build-lsquic
2024-02-27 19:17:30 +00:00
ENV DEBIAN_FRONTEND noninteractive
2017-10-03 19:33:09 +00:00
RUN apt-get update && \
2024-02-27 19:17:30 +00:00
apt-get install -y apt-utils build-essential git cmake software-properties-common \
2017-10-03 19:33:09 +00:00
zlib1g-dev libevent-dev
2024-02-27 19:17:30 +00:00
RUN add-apt-repository ppa:longsleep/golang-backports && \
2017-10-03 19:33:09 +00:00
apt-get update && \
2024-02-27 19:17:30 +00:00
apt-get install -y golang-1.21-go && \
cp /usr/lib/go-1.21/bin/go* /usr/bin/.
ENV GOROOT /usr/lib/go-1.21
2017-10-03 19:33:09 +00:00
RUN mkdir /src
WORKDIR /src
2019-09-16 14:17:30 +00:00
RUN mkdir /src/lsquic
COPY ./ /src/lsquic/
2024-02-27 19:17:30 +00:00
RUN git clone https://github.com/google/boringssl.git && \
2017-10-03 19:33:09 +00:00
cd boringssl && \
2024-02-27 19:17:30 +00:00
git checkout 9fc1c33e9c21439ce5f87855a6591a9324e569fd && \
2017-10-03 19:33:09 +00:00
cmake . && \
2019-09-16 14:17:30 +00:00
make
2017-10-03 19:33:09 +00:00
2024-02-29 00:05:41 +00:00
ENV EXTRA_CFLAGS -DLSQUIC_QIR=1
2019-09-16 14:17:30 +00:00
RUN cd /src/lsquic && \
cmake -DBORINGSSL_DIR=/src/boringssl . && \
2017-10-03 19:33:09 +00:00
make
2024-02-29 00:05:41 +00:00
RUN cd lsquic && cp bin/http_client /usr/bin/ && cp bin/http_server /usr/bin
FROM martenseemann/quic-network-simulator-endpoint:latest as lsquic-qir
COPY --from=build-lsquic /usr/bin/http_client /usr/bin/http_server /usr/bin/
COPY qir/run_endpoint.sh .
RUN chmod +x run_endpoint.sh
ENTRYPOINT [ "./run_endpoint.sh" ]