From 34bb52d60d3908f299513b0b59cfe783bbf581a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Toledo?= Date: Thu, 5 Feb 2026 15:41:27 -0300 Subject: [PATCH] . --- Dockerfile | 8 ++++++-- nginx_v.txt | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 nginx_v.txt diff --git a/Dockerfile b/Dockerfile index 0f12dd1..aefe778 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,7 @@ RUN git clone --depth 1 -b ${MODSEC_VERSION} --recursive https://github.com/owas # 2. Download Nginx and Modules RUN git clone --depth 1 -b ${MODSEC_NGINX_VERSION} https://github.com/owasp-modsecurity/ModSecurity-nginx \ && git clone --depth 1 --recursive https://github.com/google/ngx_brotli \ + && git clone --depth 1 https://github.com/openresty/headers-more-nginx-module \ && curl -fSL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -o nginx.tar.gz \ && tar zxf nginx.tar.gz @@ -72,6 +73,7 @@ RUN export PKG_CONFIG_PATH="/usr/local/modsecurity/lib/pkgconfig:$PKG_CONFIG_PAT --with-pcre-jit \ --add-module=/usr/src/ModSecurity-nginx \ --add-module=/usr/src/ngx_brotli \ + --add-module=/usr/src/headers-more-nginx-module \ --with-cc-opt='-O3' \ && make -j$(nproc) \ && make install @@ -81,6 +83,7 @@ FROM alpine:3.18 # Install runtime dependencies and tools RUN apk add --no-cache \ + pcre \ pcre2 \ yajl \ libxml2 \ @@ -97,7 +100,8 @@ RUN apk add --no-cache \ nano \ openssh-server \ sudo \ - tzdata + tzdata \ + dos2unix # Create nginx user RUN addgroup -S nginx && adduser -S nginx -G nginx @@ -133,7 +137,7 @@ RUN git clone -b v3.3.5 https://github.com/coreruleset/coreruleset.git owasp-crs # Entrypoint setup COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh +RUN dos2unix /entrypoint.sh && chmod +x /entrypoint.sh # Prepare Recommended ModSecurity Configs # Prepare Recommended ModSecurity Configs diff --git a/nginx_v.txt b/nginx_v.txt new file mode 100644 index 0000000..8c4b38d --- /dev/null +++ b/nginx_v.txt @@ -0,0 +1,7 @@ + Container producao-nginx-run-1166b5318e75 Creating + Container producao-nginx-run-1166b5318e75 Created +nginx version: nginx/1.25.3 +built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10) +built with OpenSSL 3.1.8 11 Feb 2025 +TLS SNI support enabled +configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-http_realip_module --with-http_auth_request_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --with-threads --with-pcre-jit --add-module=/usr/src/ModSecurity-nginx --add-module=/usr/src/ngx_brotli --add-module=/usr/src/headers-more-nginx-module --with-cc-opt=-O3