Repository navigation
Conversation
…nd the compression modules of Nginx and Apache
|
| # Build brotli and zstd as dynamic modules | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules for the nginx.org package | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules for the nginx.org package | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules for the nginx.org package | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules for the nginx.org package | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
| # Build brotli and zstd as dynamic modules for the nginx.org package | ||
| && NGINX_VERSION="$(nginx -v 2>&1 | sed 's|nginx version: nginx/||')" \ | ||
| && mkdir -p /usr/src/nginx-modules /etc/nginx/modules \ | ||
| && curl -fsSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" | tar -xz -C /usr/src/nginx-modules \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What changes
Adds Brotli and Zstandard support to the PHP images and the two web server images, for PHP 8.2 to 8.6, Debian and Alpine.
PHP extensions (
php,php-dev,php-nginx,php-apacheand their-devvariants)brotliandzstd(installed with PIE fromkjdev/brotliandkjdev/zstd).zlibwas already there.libbrotli1/libzstd1(Debian) andbrotli-libs/zstd-libs(Alpine); the-devpackages are removed after the build.Nginx (
php-nginx,php-nginx-dev)ngx_http_brotli_filter_module,ngx_http_brotli_static_module(google/ngx_brotli) andngx_http_zstd_filter_module,ngx_http_zstd_static_module(tokers/zstd-nginx-module), built against the nginx version of the image (--with-compat) and loaded from/etc/nginx/modules-enabled/.NGINX_MODULES_ENABLE(brotli,zstd, or the four modules one by one). Default: all four are loaded. Once the variable is set, only the listed modules are loaded; unknown names give a warning.Apache (
php-apache,php-apache-dev)deflate,filter,brotli,asisandzstdmodules.mod_zstd(nono303/mod_zstd) is built withapxsagainst the systemlibzstd; its license is in/usr/share/doc/mod_zstd/LICENSE.deflate.confis removed, so loading the module does not compress anything by itself.APACHE_MODULES_ENABLE(a2enmodon Debian, uncomments theLoadModuleline on Alpine).Compression stays off by default. The modules are only loaded. No image sets
gzip on,brotli on,zstd onor an output filter, so the behaviour of existing setups does not change. Users switch it on in their own configuration;docs/customization.md#compressionhas working examples for Nginx and Apache.