Skip to content

Commit 5a3e020

Browse files
committed
Adjust Dockerfile for PHP 8.5 due to opcache is a part of core
1 parent 9bab27e commit 5a3e020

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

php/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG PHP_SHORT_VERSION=7.4
2-
ARG APCU_VERSION=5.1.24
2+
ARG APCU_VERSION=5.1.28
33

44
FROM php:${PHP_SHORT_VERSION}-fpm-alpine
55

@@ -55,9 +55,13 @@ RUN set -eux; \
5555
apcu-${APCU_VERSION} \
5656
; \
5757
pecl clear-cache; \
58+
# Opcache is built into core of PHP binary from version 8.5
59+
if [[ 1 -eq "$(echo "$PHP_SHORT_VERSION < 8.5" | bc)" ]] ; \
60+
then \
61+
docker-php-ext-enable opcache; \
62+
fi; \
5863
docker-php-ext-enable \
5964
apcu \
60-
opcache \
6165
; \
6266
\
6367
runDeps="$( \

0 commit comments

Comments
 (0)