From b9340fce1b48959558ccb50a9348343c802c1226 Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Mon, 16 Dec 2024 19:17:20 -0800 Subject: [PATCH] build Swoole 6.0.0 images --- CHANGELOG.md | 9 +++++ README.md | 8 ++--- config/6.0.0.yml | 17 +++++++++ dockerfiles/6.0.0/php8.1/alpine/Dockerfile | 32 +++++++++++++++++ dockerfiles/6.0.0/php8.1/cli/Dockerfile | 42 ++++++++++++++++++++++ dockerfiles/6.0.0/php8.2/alpine/Dockerfile | 32 +++++++++++++++++ dockerfiles/6.0.0/php8.2/cli/Dockerfile | 42 ++++++++++++++++++++++ dockerfiles/6.0.0/php8.3/alpine/Dockerfile | 32 +++++++++++++++++ dockerfiles/6.0.0/php8.3/cli/Dockerfile | 42 ++++++++++++++++++++++ dockerfiles/6.0.0/php8.4/alpine/Dockerfile | 32 +++++++++++++++++ dockerfiles/6.0.0/php8.4/cli/Dockerfile | 42 ++++++++++++++++++++++ 11 files changed, 326 insertions(+), 4 deletions(-) create mode 100644 config/6.0.0.yml create mode 100644 dockerfiles/6.0.0/php8.1/alpine/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.1/cli/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.2/alpine/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.2/cli/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.3/alpine/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.3/cli/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.4/alpine/Dockerfile create mode 100644 dockerfiles/6.0.0/php8.4/cli/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 661e6d4a..f9d1db8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ Table of Contents ================= +* [Swoole 6.0](#swoole-60) + * [6.0.0](#600) * [Swoole 5.1](#swoole-51) * [5.1.6](#516) * [5.1.5](#515) @@ -73,6 +75,13 @@ Table of Contents * [Swoole 4.3](#swoole-43) * [4.3.6](#436) +# Swoole 6.0 + +## 6.0.0 + +### Changed +- Upgrade _Composer_ from 2.8.3 to 2.8.4. + # Swoole 5.1 ## 5.1.6 diff --git a/README.md b/README.md index 7edd7c4d..eb384014 100644 --- a/README.md +++ b/README.md @@ -208,10 +208,10 @@ Note: We don't have development tools built in for Alpine images. There is no Do | PHP Versions | Default Images | Dev Images | Alpine Images | |-|-|-|-| -| PHP 8.4 | [6.0.0-rc1-php8.4, 6.0-php8.4](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.4/cli/Dockerfile) | [6.0.0-rc1-php8.4-dev, 6.0-php8.4-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.4/cli/Dockerfile) | [6.0.0-rc1-php8.4-alpine, 6.0-php8.4-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.4/alpine/Dockerfile) | -| PHP 8.3 | [6.0.0-rc1-php8.3, 6.0-php8.3](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.3/cli/Dockerfile) | [6.0.0-rc1-php8.3-dev, 6.0-php8.3-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.3/cli/Dockerfile) | [6.0.0-rc1-php8.3-alpine, 6.0-php8.3-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.3/alpine/Dockerfile) | -| PHP 8.2 | [6.0.0-rc1-php8.2, 6.0-php8.2,
6.0](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.2/cli/Dockerfile) | [6.0.0-rc1-php8.2-dev, 6.0-php8.2-dev,
6.0-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.2/cli/Dockerfile) | [6.0.0-rc1-php8.2-alpine, 6.0-php8.2-alpine,
6.0-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.2/alpine/Dockerfile) | -| PHP 8.1 | [6.0.0-rc1-php8.1, 6.0-php8.1](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.1/cli/Dockerfile) | [6.0.0-rc1-php8.1-dev, 6.0-php8.1-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.1/cli/Dockerfile) | [6.0.0-rc1-php8.1-alpine, 6.0-php8.1-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0-rc1/php8.1/alpine/Dockerfile) | +| PHP 8.4 | [6.0.0-php8.4, 6.0-php8.4](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.4/cli/Dockerfile) | [6.0.0-php8.4-dev, 6.0-php8.4-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.4/cli/Dockerfile) | [6.0.0-php8.4-alpine, 6.0-php8.4-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.4/alpine/Dockerfile) | +| PHP 8.3 | [6.0.0-php8.3, 6.0-php8.3](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.3/cli/Dockerfile) | [6.0.0-php8.3-dev, 6.0-php8.3-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.3/cli/Dockerfile) | [6.0.0-php8.3-alpine, 6.0-php8.3-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.3/alpine/Dockerfile) | +| PHP 8.2 | [6.0.0-php8.2, 6.0-php8.2,
6.0](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.2/cli/Dockerfile) | [6.0.0-php8.2-dev, 6.0-php8.2-dev,
6.0-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.2/cli/Dockerfile) | [6.0.0-php8.2-alpine, 6.0-php8.2-alpine,
6.0-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.2/alpine/Dockerfile) | +| PHP 8.1 | [6.0.0-php8.1, 6.0-php8.1](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.1/cli/Dockerfile) | [6.0.0-php8.1-dev, 6.0-php8.1-dev](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.1/cli/Dockerfile) | [6.0.0-php8.1-alpine, 6.0-php8.1-alpine](https://github.com/swoole/docker-swoole/blob/master/dockerfiles/6.0.0/php8.1/alpine/Dockerfile) | ### Swoole 5.1 diff --git a/config/6.0.0.yml b/config/6.0.0.yml new file mode 100644 index 00000000..b4de8108 --- /dev/null +++ b/config/6.0.0.yml @@ -0,0 +1,17 @@ +# The YAML configuration file for generating Dockerfile of image phpswoole/swoole:6.0.0. +# For technical details of the configuration file, please check comments and sample configurations in file /config.yml. +# +status: "under development" +php: + - "8.1.31" + - "8.2.26" + - "8.3.14" + - "8.4.1" +image: + composer: + version: "2.8.4" + php_extensions: + redis: + version: "6.1.0" + configureoptions: "enable-redis-igbinary=\"no\" enable-redis-lzf=\"no\" enable-redis-zstd=\"no\"" + enabled: true diff --git a/dockerfiles/6.0.0/php8.1/alpine/Dockerfile b/dockerfiles/6.0.0/php8.1/alpine/Dockerfile new file mode 100644 index 00000000..55f7e05a --- /dev/null +++ b/dockerfiles/6.0.0/php8.1/alpine/Dockerfile @@ -0,0 +1,32 @@ +FROM php:8.1.31-cli-alpine3.20 + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ + +RUN \ + set -ex && \ + apk update && \ + apk add --no-cache libstdc++ libpq && \ + 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + docker-php-ext-install sockets && \ + docker-php-source extract && \ + mkdir /usr/src/php/ext/swoole && \ + curl -sfL https://github.com/swoole/swoole-src/archive/v6.0.0.tar.gz -o swoole.tar.gz && \ + tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \ + 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 && \ + rm -f swoole.tar.gz && \ + docker-php-source delete && \ + apk del .build-deps + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.1/cli/Dockerfile b/dockerfiles/6.0.0/php8.1/cli/Dockerfile new file mode 100644 index 00000000..a175cf38 --- /dev/null +++ b/dockerfiles/6.0.0/php8.1/cli/Dockerfile @@ -0,0 +1,42 @@ +FROM php:8.1.31-cli + +ENV DEBIAN_FRONTEND=noninteractive +ENV TERM=xterm-color + +ARG DEV_MODE +ENV DEV_MODE=$DEV_MODE + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ +COPY ./rootfilesystem/ / + +RUN \ + set -ex && \ + apt-get update && \ + apt-get install -y \ + libcurl4-openssl-dev \ + libbrotli-dev \ + libpq-dev \ + libssl-dev \ + supervisor \ + unzip \ + zlib1g-dev \ + --no-install-recommends && \ +# 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + install-swoole.sh 6.0.0 \ + --enable-mysqlnd \ + --enable-swoole-pgsql \ + --enable-brotli \ + --enable-openssl \ + --enable-sockets --enable-swoole-curl && \ + mkdir -p /var/log/supervisor && \ + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static + +ENTRYPOINT ["/entrypoint.sh"] +CMD [] + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.2/alpine/Dockerfile b/dockerfiles/6.0.0/php8.2/alpine/Dockerfile new file mode 100644 index 00000000..3da7f897 --- /dev/null +++ b/dockerfiles/6.0.0/php8.2/alpine/Dockerfile @@ -0,0 +1,32 @@ +FROM php:8.2.26-cli-alpine3.20 + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ + +RUN \ + set -ex && \ + apk update && \ + apk add --no-cache libstdc++ libpq && \ + 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + docker-php-ext-install sockets && \ + docker-php-source extract && \ + mkdir /usr/src/php/ext/swoole && \ + curl -sfL https://github.com/swoole/swoole-src/archive/v6.0.0.tar.gz -o swoole.tar.gz && \ + tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \ + 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 && \ + rm -f swoole.tar.gz && \ + docker-php-source delete && \ + apk del .build-deps + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.2/cli/Dockerfile b/dockerfiles/6.0.0/php8.2/cli/Dockerfile new file mode 100644 index 00000000..418b42d7 --- /dev/null +++ b/dockerfiles/6.0.0/php8.2/cli/Dockerfile @@ -0,0 +1,42 @@ +FROM php:8.2.26-cli + +ENV DEBIAN_FRONTEND=noninteractive +ENV TERM=xterm-color + +ARG DEV_MODE +ENV DEV_MODE=$DEV_MODE + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ +COPY ./rootfilesystem/ / + +RUN \ + set -ex && \ + apt-get update && \ + apt-get install -y \ + libcurl4-openssl-dev \ + libbrotli-dev \ + libpq-dev \ + libssl-dev \ + supervisor \ + unzip \ + zlib1g-dev \ + --no-install-recommends && \ +# 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + install-swoole.sh 6.0.0 \ + --enable-mysqlnd \ + --enable-swoole-pgsql \ + --enable-brotli \ + --enable-openssl \ + --enable-sockets --enable-swoole-curl && \ + mkdir -p /var/log/supervisor && \ + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static + +ENTRYPOINT ["/entrypoint.sh"] +CMD [] + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.3/alpine/Dockerfile b/dockerfiles/6.0.0/php8.3/alpine/Dockerfile new file mode 100644 index 00000000..20b04356 --- /dev/null +++ b/dockerfiles/6.0.0/php8.3/alpine/Dockerfile @@ -0,0 +1,32 @@ +FROM php:8.3.14-cli-alpine3.20 + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ + +RUN \ + set -ex && \ + apk update && \ + apk add --no-cache libstdc++ libpq && \ + 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + docker-php-ext-install sockets && \ + docker-php-source extract && \ + mkdir /usr/src/php/ext/swoole && \ + curl -sfL https://github.com/swoole/swoole-src/archive/v6.0.0.tar.gz -o swoole.tar.gz && \ + tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \ + 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 && \ + rm -f swoole.tar.gz && \ + docker-php-source delete && \ + apk del .build-deps + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.3/cli/Dockerfile b/dockerfiles/6.0.0/php8.3/cli/Dockerfile new file mode 100644 index 00000000..9e6e0598 --- /dev/null +++ b/dockerfiles/6.0.0/php8.3/cli/Dockerfile @@ -0,0 +1,42 @@ +FROM php:8.3.14-cli + +ENV DEBIAN_FRONTEND=noninteractive +ENV TERM=xterm-color + +ARG DEV_MODE +ENV DEV_MODE=$DEV_MODE + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ +COPY ./rootfilesystem/ / + +RUN \ + set -ex && \ + apt-get update && \ + apt-get install -y \ + libcurl4-openssl-dev \ + libbrotli-dev \ + libpq-dev \ + libssl-dev \ + supervisor \ + unzip \ + zlib1g-dev \ + --no-install-recommends && \ +# 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + install-swoole.sh 6.0.0 \ + --enable-mysqlnd \ + --enable-swoole-pgsql \ + --enable-brotli \ + --enable-openssl \ + --enable-sockets --enable-swoole-curl && \ + mkdir -p /var/log/supervisor && \ + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static + +ENTRYPOINT ["/entrypoint.sh"] +CMD [] + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.4/alpine/Dockerfile b/dockerfiles/6.0.0/php8.4/alpine/Dockerfile new file mode 100644 index 00000000..ae2c6eab --- /dev/null +++ b/dockerfiles/6.0.0/php8.4/alpine/Dockerfile @@ -0,0 +1,32 @@ +FROM php:8.4.1-cli-alpine3.20 + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ + +RUN \ + set -ex && \ + apk update && \ + apk add --no-cache libstdc++ libpq && \ + 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + docker-php-ext-install sockets && \ + docker-php-source extract && \ + mkdir /usr/src/php/ext/swoole && \ + curl -sfL https://github.com/swoole/swoole-src/archive/v6.0.0.tar.gz -o swoole.tar.gz && \ + tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \ + 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 && \ + rm -f swoole.tar.gz && \ + docker-php-source delete && \ + apk del .build-deps + +WORKDIR "/var/www/" diff --git a/dockerfiles/6.0.0/php8.4/cli/Dockerfile b/dockerfiles/6.0.0/php8.4/cli/Dockerfile new file mode 100644 index 00000000..16e60bcb --- /dev/null +++ b/dockerfiles/6.0.0/php8.4/cli/Dockerfile @@ -0,0 +1,42 @@ +FROM php:8.4.1-cli + +ENV DEBIAN_FRONTEND=noninteractive +ENV TERM=xterm-color + +ARG DEV_MODE +ENV DEV_MODE=$DEV_MODE + +COPY --from=composer:2.8.4 /usr/bin/composer /usr/bin/ +COPY ./rootfilesystem/ / + +RUN \ + set -ex && \ + apt-get update && \ + apt-get install -y \ + libcurl4-openssl-dev \ + libbrotli-dev \ + libpq-dev \ + libssl-dev \ + supervisor \ + unzip \ + zlib1g-dev \ + --no-install-recommends && \ +# 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 && \ + pecl install --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no"' redis-6.1.0 && \ +# PHP extension Redis is included since 4.8.12+ and 5.0.1+. + docker-php-ext-enable redis && \ + install-swoole.sh 6.0.0 \ + --enable-mysqlnd \ + --enable-swoole-pgsql \ + --enable-brotli \ + --enable-openssl \ + --enable-sockets --enable-swoole-curl && \ + mkdir -p /var/log/supervisor && \ + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static + +ENTRYPOINT ["/entrypoint.sh"] +CMD [] + +WORKDIR "/var/www/"