You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

59 lines
1.7 KiB

FROM nginx:mainline AS build
WORKDIR /src
# Install BoringSSL
RUN apt-get update && \
apt-get install -y git gcc make g++ cmake perl libunwind-dev golang && \
git clone https://boringssl.googlesource.com/boringssl && \
mkdir boringssl/build && \
cd boringssl/build && \
cmake .. && \
make
# Install Brotli
RUN git clone https://github.com/google/ngx_brotli.git /tmp/brotli && \
cd /tmp/brotli && \
git submodule update --init --recursive && \
cd /tmp
# Grab http3 module
RUN apt-get install -y mercurial libperl-dev libpcre3-dev zlib1g-dev libxslt1-dev libgd-ocaml-dev libgeoip-dev && \
hg clone https://hg.nginx.org/nginx-quic && \
hg clone http://hg.nginx.org/njs -r "0.7.1" && \
cd nginx-quic && \
hg update quic
# Grab OCSP stapling patch
RUN git clone https://github.com/kn007/patch && \
cd nginx-quic && \
patch -p1 < ../patch/Enable_BoringSSL_OCSP.patch
# patch -p1 < ../patch/nginx.patch
# Build nginx
RUN cd nginx-quic && auto/configure `nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param= -e build=` \
--build=nginx-quic \
--with-http_v3_module --with-stream_quic_module --add-module=/tmp/brotli \
--with-cc-opt="-I/src/boringssl/include" --with-ld-opt="-L/src/boringssl/build/ssl -L/src/boringssl/build/crypto" && \
make
FROM nginx:mainline
#COPY nginx.conf /etc/nginx/nginx.conf
#COPY www.example.com.crt /etc/ssl/www.example.com.crt
#COPY www.example.com.key /etc/ssl/www.example.com.key
#COPY index.html /etc/nginx/html/index.html
COPY --from=build /src/nginx-quic/objs/nginx /usr/sbin
RUN /usr/sbin/nginx -V > /dev/stderr
EXPOSE 8443