diff --git a/Dockerfile b/Dockerfile index 79e0b99..0f092f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ ARG AWS_LC_TAG=v1.41.1 \ MODULE_NGINX_MISC=v0.33 \ MODULE_NGINX_NJS=0.8.8 \ MODULE_NGINX_VTS=v0.2.2 \ + MODULE_NGINX_ZSTD=0.1.1 \ NGINX=1.27.3 ARG SSL_LIBRARY=openssl @@ -52,7 +53,9 @@ apk add --no-cache --virtual .build-deps \ pcre2-dev \ samurai \ xz-static \ - zlib-static + zlib-static \ + zstd-dev \ + zstd-static # # Prepare destination scratchfs @@ -131,6 +134,11 @@ curl --silent --location https://github.com/vozlt/nginx-module-vts/archive/refs/ # curl --silent --location https://github.com/yaoweibin/ngx_http_substitutions_filter_module/tarball/master | tar xz -C /usr/src --one-top-level=ngx_http_substitutions_filter_module --strip-components=1 || exit 1 +# +# Module: zstd-nginx-module +# +curl --silent --location https://github.com/tokers/zstd-nginx-module/archive/refs/tags/${MODULE_NGINX_ZSTD}.tar.gz | tar xz -C /usr/src --one-top-level=zstd-nginx-module --strip-components=1 || exit 1 + # # Module: njs # @@ -222,7 +230,7 @@ patch -p1 < /usr/src/aws-lc-nginx.patch || exit 1 CC=/usr/bin/clang \ CXX=/usr/bin/clang++ \ ./configure \ - --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_MISC} njs-${MODULE_NGINX_NJS} ngx-http-substitutions-filter-module-latest" \ + --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_MISC} ngx-http-substitutions-filter-module-latest zstd-nginx-module-${MODULE_NGINX_ZSTD} njs-${MODULE_NGINX_NJS}" \ --prefix=/var/lib/nginx \ --sbin-path=/usr/sbin/nginx \ --modules-path=/usr/lib/nginx/modules \ @@ -272,6 +280,7 @@ CXX=/usr/bin/clang++ \ --add-module=/usr/src/nginx-module-vts \ --add-module=/usr/src/ngx_brotli \ --add-module=/usr/src/ngx_http_substitutions_filter_module \ + --add-module=/usr/src/zstd-nginx-module \ --add-module=/usr/src/njs/nginx \ --add-module=/usr/src/set-misc-nginx-module \ --without-http_browser_module \ diff --git a/Dockerfile.body b/Dockerfile.body index 5c3c86d..1bab809 100644 --- a/Dockerfile.body +++ b/Dockerfile.body @@ -34,7 +34,9 @@ apk add --no-cache --virtual .build-deps \ pcre2-dev \ samurai \ xz-static \ - zlib-static + zlib-static \ + zstd-dev \ + zstd-static # # Prepare destination scratchfs @@ -113,6 +115,11 @@ curl --silent --location https://github.com/vozlt/nginx-module-vts/archive/refs/ # curl --silent --location https://github.com/yaoweibin/ngx_http_substitutions_filter_module/tarball/master | tar xz -C /usr/src --one-top-level=ngx_http_substitutions_filter_module --strip-components=1 || exit 1 +# +# Module: zstd-nginx-module +# +curl --silent --location https://github.com/tokers/zstd-nginx-module/archive/refs/tags/${MODULE_NGINX_ZSTD}.tar.gz | tar xz -C /usr/src --one-top-level=zstd-nginx-module --strip-components=1 || exit 1 + # # Module: njs # @@ -204,7 +211,7 @@ patch -p1 < /usr/src/aws-lc-nginx.patch || exit 1 CC=/usr/bin/clang \ CXX=/usr/bin/clang++ \ ./configure \ - --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_MISC} njs-${MODULE_NGINX_NJS} ngx-http-substitutions-filter-module-latest" \ + --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_MISC} ngx-http-substitutions-filter-module-latest zstd-nginx-module-${MODULE_NGINX_ZSTD} njs-${MODULE_NGINX_NJS}" \ --prefix=/var/lib/nginx \ --sbin-path=/usr/sbin/nginx \ --modules-path=/usr/lib/nginx/modules \ @@ -254,6 +261,7 @@ CXX=/usr/bin/clang++ \ --add-module=/usr/src/nginx-module-vts \ --add-module=/usr/src/ngx_brotli \ --add-module=/usr/src/ngx_http_substitutions_filter_module \ + --add-module=/usr/src/zstd-nginx-module \ --add-module=/usr/src/njs/nginx \ --add-module=/usr/src/set-misc-nginx-module \ --without-http_browser_module \ diff --git a/build-freebsd.sh b/build-freebsd.sh index 0ebce7b..af97149 100755 --- a/build-freebsd.sh +++ b/build-freebsd.sh @@ -59,6 +59,12 @@ curl --silent --location https://github.com/vozlt/nginx-module-vts/archive/refs/ echo "[i] Downloading: ngx_http_substitutions_filter_module" curl --silent --location https://github.com/yaoweibin/ngx_http_substitutions_filter_module/tarball/master | gtar xz -C /usr/src --one-top-level=ngx_http_substitutions_filter_module --strip-components=1 || exit 1 +# +# Module: zstd-nginx-module +# +echo "[i] Downloading: zstd-nginx-module" +curl --silent --location https://github.com/tokers/zstd-nginx-module/archive/refs/tags/${MODULE_NGINX_ZSTD}.tar.gz | gtar xz -C /usr/src --one-top-level=zstd-nginx-module --strip-components=1 || exit 1 + # # Module: njs # @@ -117,7 +123,7 @@ patch -p1 < ${BASE_DIR}/patches/aws-lc-nginx.patch || exit 1 CC=/usr/bin/clang \ CXX=/usr/bin/clang++ \ ./configure \ - --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_HEADERS_MORE} njs-${MODULE_NGINX_NJS} ngx-http-substitutions-filter-module-latest" \ + --build="${SSL_COMMIT} ngx_brotli-$(git --git-dir=/usr/src/ngx_brotli/.git rev-parse --short HEAD) ngx-devel-kit-${MODULE_NGINX_DEVEL_KIT} headers-more-nginx-module-${MODULE_NGINX_HEADERS_MORE} echo-nginx-module-${MODULE_NGINX_ECHO} nginx-module-vts-${MODULE_NGINX_VTS} nginx-cookie-flag-module-${MODULE_NGINX_COOKIE_FLAG} set-misc-nginx-module-${MODULE_NGINX_MISC} ngx-http-substitutions-filter-module-latest zstd-nginx-module-${MODULE_NGINX_ZSTD} njs-${MODULE_NGINX_NJS}" \ --prefix=/usr/local/etc/nginx \ --sbin-path=/usr/local/sbin/nginx \ --modules-path=/usr/lib/nginx/modules \ @@ -163,6 +169,7 @@ CXX=/usr/bin/clang++ \ --add-module=/usr/src/nginx-module-vts \ --add-module=/usr/src/ngx_brotli \ --add-module=/usr/src/ngx_http_substitutions_filter_module \ + --add-module=/usr/src/zstd-nginx-module \ --add-module=/usr/src/njs/nginx \ --add-module=/usr/src/set-misc-nginx-module \ --without-http_browser_module \ diff --git a/scripts/build-dockerfile.sh b/scripts/build-dockerfile.sh index 068b668..ee924bb 100755 --- a/scripts/build-dockerfile.sh +++ b/scripts/build-dockerfile.sh @@ -16,6 +16,7 @@ ARG AWS_LC_TAG=${AWS_LC_TAG} \\ MODULE_NGINX_MISC=${MODULE_NGINX_MISC} \\ MODULE_NGINX_NJS=${MODULE_NGINX_NJS} \\ MODULE_NGINX_VTS=${MODULE_NGINX_VTS} \\ + MODULE_NGINX_ZSTD=${MODULE_NGINX_ZSTD} \\ NGINX=${NGINX} EOF diff --git a/scripts/update_versions.sh b/scripts/update_versions.sh index f7c021b..d49248e 100755 --- a/scripts/update_versions.sh +++ b/scripts/update_versions.sh @@ -19,5 +19,6 @@ cat <<- EOF > versions.env MODULE_NGINX_MISC=v$(get_latest_tag openresty/set-misc-nginx-module v) MODULE_NGINX_NJS=$(get_latest_tag nginx/njs) MODULE_NGINX_VTS=v$(get_latest_tag vozlt/nginx-module-vts v) + MODULE_NGINX_ZSTD=$(get_latest_tag tokers/zstd-nginx-module) NGINX=$(get_latest_tag nginx/nginx release) EOF diff --git a/versions.env b/versions.env index 42f7f55..e646547 100644 --- a/versions.env +++ b/versions.env @@ -8,4 +8,5 @@ MODULE_NGINX_HEADERS_MORE=v0.37 MODULE_NGINX_MISC=v0.33 MODULE_NGINX_NJS=0.8.8 MODULE_NGINX_VTS=v0.2.2 +MODULE_NGINX_ZSTD=0.1.1 NGINX=1.27.3