Skip to content

Commit

Permalink
Merge pull request #114 from shopware/feat-add-php8.4
Browse files Browse the repository at this point in the history
feat: add php8.4 images
  • Loading branch information
pweyck authored Dec 6, 2024
2 parents 34ed7fa + d749648 commit 97db4b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
build-args: |
PHP_PATCH_VERSION=${{ matrix.phpPatch }}
PHP_DIGEST=${{ matrix.phpPatchDigest }}
REDIS_PHP_MODULE=${{ matrix.redisPHPModule }}
push: true
provenance: false

Expand Down
3 changes: 2 additions & 1 deletion fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ ARG PHP_PATCH_VERSION
ARG PHP_DIGEST

FROM docker.io/library/php:${PHP_PATCH_VERSION}-fpm-alpine@${PHP_DIGEST}
ARG REDIS_PHP_MODULE=redis

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN apk add --no-cache icu-data-full curl jq trurl && \
apk upgrade --no-cache && \
chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions bcmath gd intl mysqli pdo_mysql pcntl sockets bz2 gmp soap zip ffi opcache redis-6.0.2 apcu-5.1.24 amqp-2.1.2 zstd-0.13.3 && \
install-php-extensions bcmath gd intl mysqli pdo_mysql pcntl sockets bz2 gmp soap zip ffi opcache ${REDIS_PHP_MODULE} apcu-5.1.24 amqp-2.1.2 zstd-0.13.3 && \
mkdir -p /var/www/html && \
mv "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini" && \
rm -f /usr/local/etc/php-fpm.d/zz-docker.conf && \
Expand Down
8 changes: 7 additions & 1 deletion matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function get_digest_of_image(string $imageName, string $tag): string {
return $digest;
}

$supportedVersions = ['8.1', '8.2', '8.3'];
$supportedVersions = ['8.1', '8.2', '8.3', '8.4'];
$disallowedVersions = ['8.2.20', '8.3.8'];
$rcVersions = [];

Expand Down Expand Up @@ -144,6 +144,11 @@ function get_digest_of_image(string $imageName, string $tag): string {
]);
}

$redisModule = 'redis';
if (version_compare($patchVersion['version'], '8.4', '<')) {
$redisModule = 'redis-6.0.2';
}

$data[] = [
'php' => $supportedVersion,
'phpPatch' => $patchVersion['version'],
Expand All @@ -157,6 +162,7 @@ function get_digest_of_image(string $imageName, string $tag): string {
'nginx-tags-otel' => implode("\n", $nginxImagesOtel),
'scan-tag' => $caddyImages[0],
'scan-to' => 'ghcr.io/shopware/docker-base:'.$supportedVersion,
'redisPHPModule' => $redisModule,
];
}

Expand Down

0 comments on commit 97db4b2

Please sign in to comment.