Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Sep 18, 2024
1 parent 872ca77 commit 1cc598d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
ARG LUAJIT_INC=/usr/include/luajit-2.1
ARG LUAJIT_LIB=/usr/lib

ARG NGINX_VER=1.27.4
ARG NGINX_VER=release-1.27.4
ARG OPENSSL_VER=openssl-3.1.7+quic
ARG MODSEC_VER=v3.0.13

Expand Down Expand Up @@ -45,15 +45,14 @@ RUN git clone --recursive https://github.com/owasp-modsecurity/ModSecurity --bra
make -j "$(nproc)" && \
make -j "$(nproc)" install
# Nginx
RUN wget -q https://freenginx.org/download/freenginx-"$NGINX_VER".tar.gz -O - | tar xzC /src && \
mv /src/freenginx-"$NGINX_VER" /src/freenginx && \
wget -q https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_"$DTR_VER"%2B.patch -O /src/freenginx/1.patch && \
wget -q https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-"$RCP_VER"-resolver_conf_parsing.patch -O /src/freenginx/2.patch && \
sed -i "s|freenginx|NPMplus|g" /src/freenginx/src/core/nginx.h && \
cd /src/freenginx && \
patch -p1 </src/freenginx/1.patch && \
patch -p1 </src/freenginx/2.patch && \
rm /src/freenginx/*.patch && \
RUN git clone --recursive https://github.com/freenginx/nginx --branch "$NGINX_VER" /src/nginx && \
wget -q https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_"$DTR_VER"%2B.patch -O /src/nginx/1.patch && \
wget -q https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-"$RCP_VER"-resolver_conf_parsing.patch -O /src/nginx/2.patch && \
sed -i "s|freenginx|NPMplus|g" /src/nginx/src/core/nginx.h && \
cd /src/nginx && \
patch -p1 </src/nginx/1.patch && \
patch -p1 </src/ginx/2.patch && \
rm /src/nginx/*.patch && \
# modules
git clone --recursive https://github.com/google/ngx_brotli --branch "$NB_VER" /src/ngx_brotli && \
git clone --recursive https://github.com/aperezdc/ngx-fancyindex --branch "$NF_VER" /src/ngx-fancyindex && \
Expand All @@ -67,8 +66,8 @@ RUN wget -q https://freenginx.org/download/freenginx-"$NGINX_VER".tar.gz -O - |
git clone --recursive https://github.com/leev/ngx_http_geoip2_module --branch "$NHG2M_VER" /src/ngx_http_geoip2_module && \
git clone --recursive https://github.com/gabihodoroaga/nginx-ntlm-module --branch "$NNTLM_VER" /src/nginx-ntlm-module
# Configure
RUN cd /src/freenginx && \
/src/freenginx/configure \
RUN cd /src/nginx && \
/src/nginx/auto/configure \
--build=freenginx \
--with-compat \
--with-threads \
Expand Down Expand Up @@ -107,7 +106,7 @@ RUN cd /src/freenginx && \
--add-module=/src/ngx_http_geoip2_module \
--add-module=/src/nginx-ntlm-module
# Build & Install
RUN cd /src/freenginx && \
RUN cd /src/nginx && \
make -j "$(nproc)" && \
make -j "$(nproc)" install && \
cd /src/lua-resty-core && \
Expand Down

0 comments on commit 1cc598d

Please sign in to comment.