diff --git a/.github/workflows/build-master.yml b/.github/workflows/build-master.yml index 367ce2c..b0c0e93 100644 --- a/.github/workflows/build-master.yml +++ b/.github/workflows/build-master.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - version: [1.22.1, 1.24.0, 1.26.3, 1.28.1, 1.30.1, 1.31.0] + version: [1.22.1, 1.24.0, 1.26.3, 1.28.3, 1.30.2, 1.31.1] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index ef11a71..f7acb91 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - version: [1.22.1, 1.24.0, 1.26.3, 1.28.1, 1.30.1, 1.31.0] + version: [1.22.1, 1.24.0, 1.26.3, 1.28.3, 1.30.2, 1.31.1] steps: - uses: actions/checkout@v6 diff --git a/Dockerfile b/Dockerfile index 8222c9e..14ab60a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.21 as build +FROM alpine:3.23 AS build -ARG version=1.30.1 +ARG version=1.30.2 ARG opensslversion=3.5.6 ARG zlibversion=1.3.2 -RUN apk add --no-cache unzip bash gcc make pcre build-base pcre-dev perl-dev linux-headers +RUN apk add --no-cache unzip bash gcc make pcre2 build-base pcre2-dev pcre2-static perl-dev linux-headers curl RUN wget https://nginx.org/download/nginx-${version}.tar.gz && \ tar -xf nginx-${version}.tar.gz && \ @@ -14,11 +14,16 @@ RUN wget https://nginx.org/download/nginx-${version}.tar.gz && \ unzip master.zip && \ wget https://github.com/openssl/openssl/releases/download/openssl-${opensslversion}/openssl-${opensslversion}.tar.gz && \ tar -xf openssl-${opensslversion}.tar.gz && \ - wget https://www.zlib.net/zlib-${zlibversion}.tar.gz && \ - tar -xf zlib-${zlibversion}.tar.gz + wget https://github.com/madler/zlib/releases/download/v${zlibversion}/zlib-${zlibversion}.tar.gz && \ + tar -xf zlib-${zlibversion}.tar.gz WORKDIR /nginx-${version} -RUN ./configure --with-cc-opt="-static -static-libgcc" \ + +RUN extra_cc_opt=""; \ + if [ "$(printf '%s\n' "$version" "1.28.3" | sort -V | head -n1)" = "$version" ] && [ "$version" != "1.28.3" ]; then \ + extra_cc_opt="-Wno-error=unterminated-string-initialization"; \ + fi; \ + ./configure --with-cc-opt="-static -static-libgcc ${extra_cc_opt}" \ --with-ld-opt="-static" \ --with-zlib=../zlib-${zlibversion} \ --add-module=/ngx_http_substitutions_filter_module-master \ @@ -46,7 +51,7 @@ RUN ./configure --with-cc-opt="-static -static-libgcc" \ --with-http_auth_request_module \ --with-http_addition_module \ --with-http_sub_module \ - --with-openssl=../openssl-${opensslversion} + --with-openssl=../openssl-${opensslversion} RUN make install