Skip to content

Commit

Permalink
build(nextcloud): workaround for imagick php8.3
Browse files Browse the repository at this point in the history
Signed-off-by: ernolf <[email protected]>
  • Loading branch information
ernolf committed Nov 11, 2024
1 parent 875281e commit aff6aec
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Containers/nextcloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ENV AIO_TOKEN=123456
ENV AIO_URL=localhost
# AIO settings end # Do not remove or change this line!

# Define the commit hash for imagick as a variable
ARG IMAGICK_COMMIT_HASH=28f27044e435a2b203e32675e942eb8de620ee58

COPY --chmod=775 *.sh /
COPY --chmod=774 upgrade.exclude /upgrade.exclude
COPY config/*.php /
Expand Down Expand Up @@ -82,7 +85,20 @@ RUN set -ex; \
pecl install APCu-5.1.24; \
pecl install -D 'enable-memcached-igbinary="yes"' memcached-3.3.0; \
pecl install -oD 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"' redis-6.1.0; \
pecl install -o imagick-3.7.0; \
# pecl install -o imagick-3.7.0; \
# Begin workaround ->
# The master version on the imagick repository is compatible with PHP 8.3. However, the PECL version is not updated yet.
# As soon as it will get updated, we can switch back to the PECL version, instead of having this workaround.
apk add --no-cache --virtual .git-build-deps git \
&& git clone https://github.com/imagick/imagick.git --depth 1 /tmp/imagick \
&& cd /tmp/imagick \
&& git fetch --depth 1 origin ${IMAGICK_COMMIT_HASH} \
&& git checkout ${IMAGICK_COMMIT_HASH} \
&& sed -i "s/@PACKAGE_VERSION@/git-${IMAGICK_COMMIT_HASH:0:7}/" php_imagick.h \
&& phpize && ./configure && make && make install; \
apk del .git-build-deps; \
cd && rm -r /tmp/imagick; \
# <- End workaround
\
docker-php-ext-enable \
igbinary \
Expand Down

0 comments on commit aff6aec

Please sign in to comment.