Skip to content

Commit 8a1b223

Browse files
feat(php): support PHP 8.6 FPM on available platforms
1 parent 5b3f647 commit 8a1b223

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/php8-release.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
description: 'PHP Version'
99
default: '8.4.6'
1010
required: true
11+
platforms:
12+
description: 'Platforms to publish from the official FPM image'
13+
type: choice
14+
default: 'linux/amd64,linux/arm/v7,linux/arm64/v8'
15+
options:
16+
- 'linux/amd64,linux/arm/v7,linux/arm64/v8'
17+
- 'linux/amd64,linux/arm64/v8'
1118
jobs:
1219
docker:
1320
runs-on: ubuntu-latest
@@ -43,7 +50,7 @@ jobs:
4350
with:
4451
context: php/8
4552
file: php/8/Dockerfile
46-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
53+
platforms: ${{ inputs.platforms }}
4754
push: true
4855
build-args:
4956
PHP_VERSION=${{ github.event.inputs.phpVersion }}

‎php/8/Dockerfile‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ COPY ./data/prepare-apt /usr/local/bin/
1010
# Rebuild only the exact EOL baselines; all other series return immediately.
1111
RUN sh /usr/local/bin/rebuild-php-eol
1212

13+
# Official PHP 8.6 images no longer bundle the PEAR/PECL installer.
14+
RUN if ! command -v pear >/dev/null; then \
15+
set -e; \
16+
curl -fsSL --retry 3 https://raw.githubusercontent.com/pear/pearweb_phars/72aa5f771f56aaf826641b21159453f993e44450/install-pear-nozlib.phar -o /tmp/install-pear.phar; \
17+
echo 'a71349da29f1a6e3f0792695b167e582375a93c70c0e9d35e7c4675697c5f039 /tmp/install-pear.phar' | sha256sum -c -; \
18+
php -n /tmp/install-pear.phar -d /usr/local/lib/php -b /usr/local/bin; \
19+
rm /tmp/install-pear.phar; \
20+
fi
21+
1322
# PEAR before 1.10.17 cannot decode PECL's chunked HTTP responses.
1423
RUN curl -fsSL --retry 3 https://pear.php.net/get/PEAR-1.10.18.tgz -o /tmp/PEAR.tgz && \
1524
echo '276db000b4e0a9388c7f5168522174bae4144c8c411a71d480b82ec25ee3bc8b /tmp/PEAR.tgz' | sha256sum -c - && \
@@ -37,4 +46,4 @@ RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
3746

3847
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
3948

40-
WORKDIR /www
49+
WORKDIR /www

0 commit comments

Comments
 (0)