From 48dda5e1e23772cb16c6e0ce1a3eb8a97f80dfde Mon Sep 17 00:00:00 2001 From: suyar Date: Fri, 1 Dec 2023 09:45:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20php8.3=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-auxiliary-images.yml | 1 + .../workflows/build-integration-images.yml | 1 + .github/workflows/build-php-images.yml | 1 + README.md | 29 ++++++++++- auxiliary/8.3-cli-cron/Dockerfile | 8 ++++ auxiliary/8.3-cli-cron/Dockerfile-alpine | 3 ++ auxiliary/8.3-cli-supervisor/Dockerfile | 8 ++++ .../8.3-cli-supervisor/Dockerfile-alpine | 6 +++ integration/8.3-integration/Dockerfile | 13 +++++ integration/8.3-integration/Dockerfile-alpine | 11 +++++ .../docker-integration-alpine.ini | 25 ++++++++++ .../8.3-integration/docker-integration.conf | 25 ++++++++++ php/8.3-cli/Dockerfile | 44 +++++++++++++++++ php/8.3-cli/Dockerfile-alpine | 45 +++++++++++++++++ php/8.3-fpm/Dockerfile | 47 ++++++++++++++++++ php/8.3-fpm/Dockerfile-alpine | 48 +++++++++++++++++++ 16 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 auxiliary/8.3-cli-cron/Dockerfile create mode 100644 auxiliary/8.3-cli-cron/Dockerfile-alpine create mode 100644 auxiliary/8.3-cli-supervisor/Dockerfile create mode 100644 auxiliary/8.3-cli-supervisor/Dockerfile-alpine create mode 100644 integration/8.3-integration/Dockerfile create mode 100644 integration/8.3-integration/Dockerfile-alpine create mode 100644 integration/8.3-integration/docker-integration-alpine.ini create mode 100644 integration/8.3-integration/docker-integration.conf create mode 100644 php/8.3-cli/Dockerfile create mode 100644 php/8.3-cli/Dockerfile-alpine create mode 100644 php/8.3-fpm/Dockerfile create mode 100644 php/8.3-fpm/Dockerfile-alpine diff --git a/.github/workflows/build-auxiliary-images.yml b/.github/workflows/build-auxiliary-images.yml index 417fff7..e2aba6d 100644 --- a/.github/workflows/build-auxiliary-images.yml +++ b/.github/workflows/build-auxiliary-images.yml @@ -24,6 +24,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" steps: - name: Checkout diff --git a/.github/workflows/build-integration-images.yml b/.github/workflows/build-integration-images.yml index fecdf6c..23509fb 100644 --- a/.github/workflows/build-integration-images.yml +++ b/.github/workflows/build-integration-images.yml @@ -24,6 +24,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" steps: - name: Checkout diff --git a/.github/workflows/build-php-images.yml b/.github/workflows/build-php-images.yml index 3ff52e5..1fd9cda 100644 --- a/.github/workflows/build-php-images.yml +++ b/.github/workflows/build-php-images.yml @@ -24,6 +24,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" steps: - name: Checkout diff --git a/README.md b/README.md index 177f716..51baa88 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ PHP 版本生命周期参考 [PHP 版本支持](https://www.php.net/supported-ve ## 更新日志 -- [2023-06-28] 移除 php7.0 支持,之前构建的镜像依然可以使用,但不建议使用,具体可以查看 [#763](https://github.com/mlocati/docker-php-extension-installer/pull/763) +- [2023-06-28] 移除 `php7.0` 构建支持,之前构建的镜像依然可以使用,具体原因可以查看 [#763](https://github.com/mlocati/docker-php-extension-installer/pull/763) +- [2023-12-01] 新增 `php8.3` 构建支持,目前 `imagick` 还不支持该版本 ## 构建镜像 @@ -22,6 +23,11 @@ PHP 版本生命周期参考 [PHP 版本支持](https://www.php.net/supported-ve 这些镜像都是从官方镜像构建的,不包含其他第三方软件。 +- PHP 7.0 + - [`suyar/php:7.0-fpm`](https://hub.docker.com/r/suyar/php/tags?name=7.0-fpm) + - [`suyar/php:7.0-fpm-alpine`](https://hub.docker.com/r/suyar/php/tags?name=7.0-fpm-alpine) + - [`suyar/php:7.0-cli`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli) + - [`suyar/php:7.0-cli-alpine`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli-alpine) - PHP 7.1 - [`suyar/php:7.1-fpm`](https://hub.docker.com/r/suyar/php/tags?name=7.1-fpm) - [`suyar/php:7.1-fpm-alpine`](https://hub.docker.com/r/suyar/php/tags?name=7.1-fpm-alpine) @@ -57,11 +63,21 @@ PHP 版本生命周期参考 [PHP 版本支持](https://www.php.net/supported-ve - [`suyar/php:8.2-fpm-alpine`](https://hub.docker.com/r/suyar/php/tags?name=8.2-fpm-alpine) - [`suyar/php:8.2-cli`](https://hub.docker.com/r/suyar/php/tags?name=8.2-cli) - [`suyar/php:8.2-cli-alpine`](https://hub.docker.com/r/suyar/php/tags?name=8.2-cli-alpine) +- PHP 8.3 + - [`suyar/php:8.3-fpm`](https://hub.docker.com/r/suyar/php/tags?name=8.3-fpm) + - [`suyar/php:8.3-fpm-alpine`](https://hub.docker.com/r/suyar/php/tags?name=8.3-fpm-alpine) + - [`suyar/php:8.3-cli`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli) + - [`suyar/php:8.3-cli-alpine`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli-alpine) ### 辅助镜像 这些镜像都是从『主要镜像』构建的,包含 `supervisor` 或 `cron`。 +- PHP 7.0 + - [`suyar/php:7.0-cli-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli-supervisor) + - [`suyar/php:7.0-cli-alpine-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli-alpine-supervisor) + - [`suyar/php:7.0-cli-cron`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli-cron) + - [`suyar/php:7.0-cli-alpine-cron`](https://hub.docker.com/r/suyar/php/tags?name=7.0-cli-alpine-cron) - PHP 7.1 - [`suyar/php:7.1-cli-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=7.1-cli-supervisor) - [`suyar/php:7.1-cli-alpine-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=7.1-cli-alpine-supervisor) @@ -97,11 +113,19 @@ PHP 版本生命周期参考 [PHP 版本支持](https://www.php.net/supported-ve - [`suyar/php:8.2-cli-alpine-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=8.2-cli-alpine-supervisor) - [`suyar/php:8.2-cli-cron`](https://hub.docker.com/r/suyar/php/tags?name=8.2-cli-cron) - [`suyar/php:8.2-cli-alpine-cron`](https://hub.docker.com/r/suyar/php/tags?name=8.2-cli-alpine-cron) +- PHP 8.3 + - [`suyar/php:8.3-cli-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli-supervisor) + - [`suyar/php:8.3-cli-alpine-supervisor`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli-alpine-supervisor) + - [`suyar/php:8.3-cli-cron`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli-cron) + - [`suyar/php:8.3-cli-alpine-cron`](https://hub.docker.com/r/suyar/php/tags?name=8.3-cli-alpine-cron) ## 集成镜像 这些镜像都是从『主要镜像』构建的,包含 `composer`、`php-fpm`、`supervisor` 和 `cron`,其中 `php-fpm` 和 `cron` 使用 `supervisor` 管理。 +- PHP 7.0 + - [`suyar/php:7.0-integration`](https://hub.docker.com/r/suyar/php/tags?name=7.0-integration) + - [`suyar/php:7.0-alpine-integration`](https://hub.docker.com/r/suyar/php/tags?name=7.0-alpine-integration) - PHP 7.1 - [`suyar/php:7.1-integration`](https://hub.docker.com/r/suyar/php/tags?name=7.1-integration) - [`suyar/php:7.1-alpine-integration`](https://hub.docker.com/r/suyar/php/tags?name=7.1-alpine-integration) @@ -123,6 +147,9 @@ PHP 版本生命周期参考 [PHP 版本支持](https://www.php.net/supported-ve - PHP 8.2 - [`suyar/php:8.2-integration`](https://hub.docker.com/r/suyar/php/tags?name=8.2-integration) - [`suyar/php:8.2-alpine-integration`](https://hub.docker.com/r/suyar/php/tags?name=8.2-alpine-integration) +- PHP 8.3 + - [`suyar/php:8.3-integration`](https://hub.docker.com/r/suyar/php/tags?name=8.3-integration) + - [`suyar/php:8.3-alpine-integration`](https://hub.docker.com/r/suyar/php/tags?name=8.3-alpine-integration) ## 使用镜像 diff --git a/auxiliary/8.3-cli-cron/Dockerfile b/auxiliary/8.3-cli-cron/Dockerfile new file mode 100644 index 0000000..1670906 --- /dev/null +++ b/auxiliary/8.3-cli-cron/Dockerfile @@ -0,0 +1,8 @@ +FROM suyar/php:8.3-cli + +RUN set -eux; \ + apt-get update \ + && apt-get install -y cron \ + && rm -rf /var/lib/apt/lists/* + +CMD ["cron","-f"] diff --git a/auxiliary/8.3-cli-cron/Dockerfile-alpine b/auxiliary/8.3-cli-cron/Dockerfile-alpine new file mode 100644 index 0000000..dd903a9 --- /dev/null +++ b/auxiliary/8.3-cli-cron/Dockerfile-alpine @@ -0,0 +1,3 @@ +FROM suyar/php:8.3-cli-alpine + +CMD ["crond","-f"] diff --git a/auxiliary/8.3-cli-supervisor/Dockerfile b/auxiliary/8.3-cli-supervisor/Dockerfile new file mode 100644 index 0000000..635c4be --- /dev/null +++ b/auxiliary/8.3-cli-supervisor/Dockerfile @@ -0,0 +1,8 @@ +FROM suyar/php:8.3-cli + +RUN set -eux; \ + apt-get update \ + && apt-get install -y supervisor \ + && rm -rf /var/lib/apt/lists/* + +CMD ["supervisord","-c","/etc/supervisor/supervisord.conf","-n"] diff --git a/auxiliary/8.3-cli-supervisor/Dockerfile-alpine b/auxiliary/8.3-cli-supervisor/Dockerfile-alpine new file mode 100644 index 0000000..c780be0 --- /dev/null +++ b/auxiliary/8.3-cli-supervisor/Dockerfile-alpine @@ -0,0 +1,6 @@ +FROM suyar/php:8.3-cli-alpine + +RUN set -eux; \ + apk add --no-cache supervisor + +CMD ["supervisord","-c","/etc/supervisord.conf","-n"] diff --git a/integration/8.3-integration/Dockerfile b/integration/8.3-integration/Dockerfile new file mode 100644 index 0000000..0a5bb38 --- /dev/null +++ b/integration/8.3-integration/Dockerfile @@ -0,0 +1,13 @@ +FROM suyar/php:8.3-fpm + +RUN set -eux; \ + apt-get update \ + && apt-get install -y supervisor cron \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=composer /usr/bin/composer /usr/bin/composer +COPY ./docker-integration.conf /etc/supervisor/conf.d/ + +RUN chmod -R 644 /etc/supervisor/conf.d/*.conf + +CMD ["supervisord","-c","/etc/supervisor/supervisord.conf","-n"] diff --git a/integration/8.3-integration/Dockerfile-alpine b/integration/8.3-integration/Dockerfile-alpine new file mode 100644 index 0000000..f6c589f --- /dev/null +++ b/integration/8.3-integration/Dockerfile-alpine @@ -0,0 +1,11 @@ +FROM suyar/php:8.3-fpm-alpine + +RUN set -eux; \ + apk add --no-cache supervisor + +COPY --from=composer /usr/bin/composer /usr/bin/composer +COPY ./docker-integration-alpine.ini /etc/supervisor.d/ + +RUN chmod -R 644 /etc/supervisor.d/*.ini + +CMD ["supervisord","-c","/etc/supervisord.conf","-n"] diff --git a/integration/8.3-integration/docker-integration-alpine.ini b/integration/8.3-integration/docker-integration-alpine.ini new file mode 100644 index 0000000..d6244ab --- /dev/null +++ b/integration/8.3-integration/docker-integration-alpine.ini @@ -0,0 +1,25 @@ +[program:php-fpm] +command=php-fpm -R +process_name=%(program_name)s_%(process_num)02d +numprocs=1 +autostart=true +startretries=3 +autorestart=true +stopwaitsecs=60 +redirect_stderr=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stdout_logfile_backups=0 + +[program:cron] +command=crond -f +process_name=%(program_name)s_%(process_num)02d +numprocs=1 +autostart=true +startretries=3 +autorestart=true +stopwaitsecs=60 +redirect_stderr=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stdout_logfile_backups=0 diff --git a/integration/8.3-integration/docker-integration.conf b/integration/8.3-integration/docker-integration.conf new file mode 100644 index 0000000..d443207 --- /dev/null +++ b/integration/8.3-integration/docker-integration.conf @@ -0,0 +1,25 @@ +[program:php-fpm] +command=php-fpm -R +process_name=%(program_name)s_%(process_num)02d +numprocs=1 +autostart=true +startretries=3 +autorestart=true +stopwaitsecs=60 +redirect_stderr=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stdout_logfile_backups=0 + +[program:cron] +command=cron -f +process_name=%(program_name)s_%(process_num)02d +numprocs=1 +autostart=true +startretries=3 +autorestart=true +stopwaitsecs=60 +redirect_stderr=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stdout_logfile_backups=0 diff --git a/php/8.3-cli/Dockerfile b/php/8.3-cli/Dockerfile new file mode 100644 index 0000000..7c4d595 --- /dev/null +++ b/php/8.3-cli/Dockerfile @@ -0,0 +1,44 @@ +FROM php:8.3-cli + +ENV TZ=Asia/Shanghai + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN set -eux; \ + chmod +x /usr/local/bin/install-php-extensions; \ + install-php-extensions \ + amqp \ + apcu \ + bcmath \ + bz2 \ + calendar \ + decimal \ + enchant \ + event \ + exif \ + gd \ + gettext \ + gmp \ + igbinary \ + intl \ + lzf \ + memcached \ + mongodb \ + msgpack \ + mysqli \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + pgsql \ + redis \ + sockets \ + swoole \ + tidy \ + timezonedb \ + uuid \ + xlswriter \ + xsl \ + yac \ + yaml \ + zip diff --git a/php/8.3-cli/Dockerfile-alpine b/php/8.3-cli/Dockerfile-alpine new file mode 100644 index 0000000..4a3c11b --- /dev/null +++ b/php/8.3-cli/Dockerfile-alpine @@ -0,0 +1,45 @@ +FROM php:8.3-cli-alpine + +ENV TZ=Asia/Shanghai + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN set -eux; \ + chmod +x /usr/local/bin/install-php-extensions; \ + install-php-extensions \ + amqp \ + apcu \ + bcmath \ + bz2 \ + calendar \ + decimal \ + enchant \ + event \ + exif \ + gd \ + gettext \ + gmp \ + igbinary \ + intl \ + lzf \ + memcached \ + mongodb \ + msgpack \ + mysqli \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + pgsql \ + redis \ + sockets \ + swoole \ + tidy \ + timezonedb \ + uuid \ + xlswriter \ + xsl \ + yac \ + yaml \ + zip; \ + apk add --no-cache tzdata diff --git a/php/8.3-fpm/Dockerfile b/php/8.3-fpm/Dockerfile new file mode 100644 index 0000000..aebd1ef --- /dev/null +++ b/php/8.3-fpm/Dockerfile @@ -0,0 +1,47 @@ +FROM php:8.3-fpm + +ENV TZ=Asia/Shanghai + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN set -eux; \ + chmod +x /usr/local/bin/install-php-extensions; \ + install-php-extensions \ + amqp \ + apcu \ + bcmath \ + bz2 \ + calendar \ + decimal \ + enchant \ + event \ + exif \ + gd \ + gettext \ + gmp \ + igbinary \ + intl \ + lzf \ + memcached \ + mongodb \ + msgpack \ + mysqli \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + pgsql \ + redis \ + sockets \ + swoole \ + tidy \ + timezonedb \ + uuid \ + xlswriter \ + xsl \ + yac \ + yaml \ + zip + +EXPOSE 9000 +CMD ["php-fpm", "-R"] diff --git a/php/8.3-fpm/Dockerfile-alpine b/php/8.3-fpm/Dockerfile-alpine new file mode 100644 index 0000000..56ff3d6 --- /dev/null +++ b/php/8.3-fpm/Dockerfile-alpine @@ -0,0 +1,48 @@ +FROM php:8.3-fpm-alpine + +ENV TZ=Asia/Shanghai + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN set -eux; \ + chmod +x /usr/local/bin/install-php-extensions; \ + install-php-extensions \ + amqp \ + apcu \ + bcmath \ + bz2 \ + calendar \ + decimal \ + enchant \ + event \ + exif \ + gd \ + gettext \ + gmp \ + imagick \ + intl \ + lzf \ + memcached \ + mongodb \ + msgpack \ + mysqli \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + pgsql \ + redis \ + sockets \ + swoole \ + tidy \ + timezonedb \ + uuid \ + xlswriter \ + xsl \ + yac \ + yaml \ + zip; \ + apk add --no-cache tzdata + +EXPOSE 9000 +CMD ["php-fpm", "-R"]