Skip to content

Commit 3df094b

Browse files
authored
Merge pull request #891 from shopware/fix/dontinstall-opcache-8.5
feat: conditionally install opcache for PHP version 8.5 and above
2 parents c5ec9f0 + 2b29075 commit 3df094b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile.base

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ RUN <<EOF
4747
php-${PHP_VERSION}-soap \
4848
php-${PHP_VERSION}-zip \
4949
php-${PHP_VERSION}-sodium \
50-
php-${PHP_VERSION}-opcache \
5150
php-${PHP_VERSION}-redis \
5251
php-${PHP_VERSION}-amqp
5352

53+
if [ "$(printf '%s\n' "8.5" "${PHP_VERSION}" | sort -V | head -n1)" != "8.5" ]; then
54+
apk add --no-cache php-${PHP_VERSION}-opcache
55+
fi
56+
5457
apk add --no-cache gettext
5558
cp /usr/bin/envsubst /envsubst
5659
apk del gettext

0 commit comments

Comments
 (0)