From 5fe0d9bbbc103b093d4100f7aa1187cb9356e6ef Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Fri, 7 Jun 2024 22:44:02 -0700 Subject: [PATCH] enabled Brotli support in Swoole --- CHANGELOG.md | 1 + Dockerfile.alpine.twig | 3 ++- Dockerfile.cli.twig | 2 ++ dockerfiles/5.1.3/php8.0/alpine/Dockerfile | 3 ++- dockerfiles/5.1.3/php8.0/cli/Dockerfile | 2 ++ dockerfiles/5.1.3/php8.1/alpine/Dockerfile | 3 ++- dockerfiles/5.1.3/php8.1/cli/Dockerfile | 2 ++ dockerfiles/5.1.3/php8.2/alpine/Dockerfile | 3 ++- dockerfiles/5.1.3/php8.2/cli/Dockerfile | 2 ++ dockerfiles/5.1.3/php8.3/alpine/Dockerfile | 3 ++- dockerfiles/5.1.3/php8.3/cli/Dockerfile | 2 ++ dockerfiles/nightly/php8.0/alpine/Dockerfile | 3 ++- dockerfiles/nightly/php8.0/cli/Dockerfile | 2 ++ dockerfiles/nightly/php8.1/alpine/Dockerfile | 3 ++- dockerfiles/nightly/php8.1/cli/Dockerfile | 2 ++ dockerfiles/nightly/php8.2/alpine/Dockerfile | 3 ++- dockerfiles/nightly/php8.2/cli/Dockerfile | 2 ++ dockerfiles/nightly/php8.3/alpine/Dockerfile | 3 ++- dockerfiles/nightly/php8.3/cli/Dockerfile | 2 ++ 19 files changed, 37 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 292f54f7..ca89cce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,7 @@ Table of Contents ### Changed - Upgrade _Composer_ from 2.6.6 to 2.7.6. +- Enabled Brotli support in Swoole. ## 5.1.2 diff --git a/Dockerfile.alpine.twig b/Dockerfile.alpine.twig index 731827ac..36b0fe57 100644 --- a/Dockerfile.alpine.twig +++ b/Dockerfile.alpine.twig @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS {% if option_curl == true %}curl-dev{% endif %} {% if php_version|slice(0, 2) != '7.' and php_version|slice(0, 3) not in ['8.0', '8.1'] %}linux-headers {% endif %}postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS {% if option_curl == true %}curl-dev{% endif %} {% if php_version|slice(0, 2) != '7.' and php_version|slice(0, 3) not in ['8.0', '8.1'] %}linux-headers {% endif %}brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ {%~ if php_extensions is not empty %} @@ -33,6 +33,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets {% if option_curl == true %}--enable-swoole-curl {% endif %}{% if option_json == true %}--enable-swoole-json {% endif %}&& \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/Dockerfile.cli.twig b/Dockerfile.cli.twig index 0307ee2e..42fe2c4a 100644 --- a/Dockerfile.cli.twig +++ b/Dockerfile.cli.twig @@ -26,6 +26,7 @@ RUN \ {%~ if option_curl == true %} libcurl4-openssl-dev \ {%~ endif %} + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -53,6 +54,7 @@ RUN \ install-swoole.sh {% if swoole_version == "nightly" %}master{% else %}{{ swoole_version }}{% endif %} \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets {% if option_curl == true %}--enable-swoole-curl {% endif %}{% if option_json == true %}--enable-swoole-json {% endif %}&& \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/5.1.3/php8.0/alpine/Dockerfile b/dockerfiles/5.1.3/php8.0/alpine/Dockerfile index 3a22dadd..758874a7 100644 --- a/dockerfiles/5.1.3/php8.0/alpine/Dockerfile +++ b/dockerfiles/5.1.3/php8.0/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/5.1.3/php8.0/cli/Dockerfile b/dockerfiles/5.1.3/php8.0/cli/Dockerfile index a3a4731c..b9a31433 100644 --- a/dockerfiles/5.1.3/php8.0/cli/Dockerfile +++ b/dockerfiles/5.1.3/php8.0/cli/Dockerfile @@ -14,6 +14,7 @@ RUN \ apt-get update && \ apt-get install -y \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -29,6 +30,7 @@ RUN \ install-swoole.sh 5.1.3 \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/5.1.3/php8.1/alpine/Dockerfile b/dockerfiles/5.1.3/php8.1/alpine/Dockerfile index 46166eba..6093d817 100644 --- a/dockerfiles/5.1.3/php8.1/alpine/Dockerfile +++ b/dockerfiles/5.1.3/php8.1/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/5.1.3/php8.1/cli/Dockerfile b/dockerfiles/5.1.3/php8.1/cli/Dockerfile index 16ac7e61..e1d07924 100644 --- a/dockerfiles/5.1.3/php8.1/cli/Dockerfile +++ b/dockerfiles/5.1.3/php8.1/cli/Dockerfile @@ -14,6 +14,7 @@ RUN \ apt-get update && \ apt-get install -y \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -29,6 +30,7 @@ RUN \ install-swoole.sh 5.1.3 \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/5.1.3/php8.2/alpine/Dockerfile b/dockerfiles/5.1.3/php8.2/alpine/Dockerfile index 5b39f430..d1f4557a 100644 --- a/dockerfiles/5.1.3/php8.2/alpine/Dockerfile +++ b/dockerfiles/5.1.3/php8.2/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/5.1.3/php8.2/cli/Dockerfile b/dockerfiles/5.1.3/php8.2/cli/Dockerfile index 20f397fa..f433b2ab 100644 --- a/dockerfiles/5.1.3/php8.2/cli/Dockerfile +++ b/dockerfiles/5.1.3/php8.2/cli/Dockerfile @@ -14,6 +14,7 @@ RUN \ apt-get update && \ apt-get install -y \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -29,6 +30,7 @@ RUN \ install-swoole.sh 5.1.3 \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/5.1.3/php8.3/alpine/Dockerfile b/dockerfiles/5.1.3/php8.3/alpine/Dockerfile index a99db27b..a4758ed8 100644 --- a/dockerfiles/5.1.3/php8.3/alpine/Dockerfile +++ b/dockerfiles/5.1.3/php8.3/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/5.1.3/php8.3/cli/Dockerfile b/dockerfiles/5.1.3/php8.3/cli/Dockerfile index 8caf4626..eea977ac 100644 --- a/dockerfiles/5.1.3/php8.3/cli/Dockerfile +++ b/dockerfiles/5.1.3/php8.3/cli/Dockerfile @@ -14,6 +14,7 @@ RUN \ apt-get update && \ apt-get install -y \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -29,6 +30,7 @@ RUN \ install-swoole.sh 5.1.3 \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/nightly/php8.0/alpine/Dockerfile b/dockerfiles/nightly/php8.0/alpine/Dockerfile index cb1d107e..4695774c 100644 --- a/dockerfiles/nightly/php8.0/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.0/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/nightly/php8.0/cli/Dockerfile b/dockerfiles/nightly/php8.0/cli/Dockerfile index 4660225a..cf8920e5 100644 --- a/dockerfiles/nightly/php8.0/cli/Dockerfile +++ b/dockerfiles/nightly/php8.0/cli/Dockerfile @@ -22,6 +22,7 @@ RUN \ # @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload inotify-tools \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -37,6 +38,7 @@ RUN \ install-swoole.sh master \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/nightly/php8.1/alpine/Dockerfile b/dockerfiles/nightly/php8.1/alpine/Dockerfile index 4cf8cdd2..0d5085ad 100644 --- a/dockerfiles/nightly/php8.1/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.1/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/nightly/php8.1/cli/Dockerfile b/dockerfiles/nightly/php8.1/cli/Dockerfile index 08abb3eb..55b52386 100644 --- a/dockerfiles/nightly/php8.1/cli/Dockerfile +++ b/dockerfiles/nightly/php8.1/cli/Dockerfile @@ -22,6 +22,7 @@ RUN \ # @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload inotify-tools \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -37,6 +38,7 @@ RUN \ install-swoole.sh master \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/nightly/php8.2/alpine/Dockerfile b/dockerfiles/nightly/php8.2/alpine/Dockerfile index 6d621858..10c4527b 100644 --- a/dockerfiles/nightly/php8.2/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.2/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/nightly/php8.2/cli/Dockerfile b/dockerfiles/nightly/php8.2/cli/Dockerfile index be0b7aa8..3eb226c1 100644 --- a/dockerfiles/nightly/php8.2/cli/Dockerfile +++ b/dockerfiles/nightly/php8.2/cli/Dockerfile @@ -22,6 +22,7 @@ RUN \ # @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload inotify-tools \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -37,6 +38,7 @@ RUN \ install-swoole.sh master \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ diff --git a/dockerfiles/nightly/php8.3/alpine/Dockerfile b/dockerfiles/nightly/php8.3/alpine/Dockerfile index caac33b7..64e71310 100644 --- a/dockerfiles/nightly/php8.3/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.3/alpine/Dockerfile @@ -6,7 +6,7 @@ RUN \ set -ex && \ apk update && \ apk add --no-cache libstdc++ libpq && \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ + apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ # PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+. docker-php-ext-install pdo_mysql && \ pecl channel-update pecl.php.net && \ @@ -21,6 +21,7 @@ RUN \ docker-php-ext-configure swoole \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ diff --git a/dockerfiles/nightly/php8.3/cli/Dockerfile b/dockerfiles/nightly/php8.3/cli/Dockerfile index 6b869e9d..b3675fe4 100644 --- a/dockerfiles/nightly/php8.3/cli/Dockerfile +++ b/dockerfiles/nightly/php8.3/cli/Dockerfile @@ -22,6 +22,7 @@ RUN \ # @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload inotify-tools \ libcurl4-openssl-dev \ + libbrotli-dev \ libpq-dev \ libssl-dev \ supervisor \ @@ -37,6 +38,7 @@ RUN \ install-swoole.sh master \ --enable-mysqlnd \ --enable-swoole-pgsql \ + --enable-brotli \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \