Skip to content

Commit

Permalink
feat: 新增 php8.3 版本支持
Browse files Browse the repository at this point in the history
  • Loading branch information
suyar committed Dec 1, 2023
1 parent 2638c2c commit 48dda5e
Show file tree
Hide file tree
Showing 16 changed files with 314 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-auxiliary-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-integration-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-php-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- name: Checkout
Expand Down
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ 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` 还不支持该版本

## 构建镜像

### 主要镜像

这些镜像都是从官方镜像构建的,不包含其他第三方软件。

- 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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)

## 使用镜像

Expand Down
8 changes: 8 additions & 0 deletions auxiliary/8.3-cli-cron/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions auxiliary/8.3-cli-cron/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM suyar/php:8.3-cli-alpine

CMD ["crond","-f"]
8 changes: 8 additions & 0 deletions auxiliary/8.3-cli-supervisor/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
6 changes: 6 additions & 0 deletions auxiliary/8.3-cli-supervisor/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -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"]
13 changes: 13 additions & 0 deletions integration/8.3-integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
11 changes: 11 additions & 0 deletions integration/8.3-integration/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -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"]
25 changes: 25 additions & 0 deletions integration/8.3-integration/docker-integration-alpine.ini
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions integration/8.3-integration/docker-integration.conf
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions php/8.3-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions php/8.3-cli/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions php/8.3-fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
48 changes: 48 additions & 0 deletions php/8.3-fpm/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 48dda5e

Please sign in to comment.