0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-02-28 12:44:55 +01:00

Build imagick for PHP 8.3 (#2394)

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
This commit is contained in:
J0WI 2025-02-25 22:37:43 +00:00 committed by GitHub
parent 71235584cd
commit af00599148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 194 additions and 17 deletions

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-apache-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:8.2-fpm-alpine3.21
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -62,10 +65,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-fpm-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-apache-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:8.2-fpm-alpine3.21
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -62,10 +65,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,6 +1,9 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-fpm-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,5 +1,8 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-apache-bookworm
FROM php:8.3-apache-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,5 +1,8 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:8.2-fpm-alpine3.21
FROM php:8.3-fpm-alpine3.21
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
@ -62,10 +65,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,5 +1,8 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:8.2-fpm-bookworm
FROM php:8.3-fpm-bookworm
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
@ -65,10 +68,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.24; \
pecl install igbinary-3.2.16; \
pecl install imagick-3.7.0; \
pecl install memcached-3.3.0 \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-6.1.0 \

View file

@ -1,5 +1,8 @@
FROM php:%%PHP_VERSION%%-%%VARIANT%%%%ALPINE_VERSION%%
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -61,10 +64,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-%%APCU_VERSION%%; \
pecl install igbinary-%%IGBINARY_VERSION%%; \
pecl install imagick-%%IMAGICK_VERSION%%; \
pecl install memcached-%%MEMCACHED_VERSION%% \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-%%REDIS_VERSION%% \

View file

@ -1,5 +1,8 @@
FROM php:%%PHP_VERSION%%-%%VARIANT%%-%%DEBIAN_VERSION%%
# Define the commit hash for imagick as a variable
ENV IMAGICK_COMMIT_HASH d7d3c24af1b4f599897408f1714600b69a56473b
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
@ -64,10 +67,23 @@ RUN set -ex; \
zip \
; \
\
# 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.
curl -fsSL -o imagick.tar.gz "https://github.com/Imagick/imagick/archive/$IMAGICK_COMMIT_HASH.tar.gz"; \
tar -xzf imagick.tar.gz -C /tmp; \
rm imagick.tar.gz; \
cd "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
sed -i "s/@PACKAGE_VERSION@/git-$(echo ${IMAGICK_COMMIT_HASH} | cut -c 1-7)/" php_imagick.h; \
phpize; \
./configure; \
make; \
make install; \
cd; \
rm -r "/tmp/imagick-$IMAGICK_COMMIT_HASH"; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-%%APCU_VERSION%%; \
pecl install igbinary-%%IGBINARY_VERSION%%; \
pecl install imagick-%%IMAGICK_VERSION%%; \
pecl install memcached-%%MEMCACHED_VERSION%% \
--configureoptions 'enable-memcached-igbinary="yes"'; \
pecl install redis-%%REDIS_VERSION%% \

View file

@ -11,6 +11,7 @@ declare -A debian_version=(
declare -A php_version=(
[default]='8.2'
[31]='8.3'
)
declare -A cmd=(

View file

@ -9,19 +9,19 @@
"variant": "apache",
"base": "debian",
"baseVersion": "bookworm",
"phpVersion": "8.2"
"phpVersion": "8.3"
},
"fpm": {
"variant": "fpm",
"base": "debian",
"baseVersion": "bookworm",
"phpVersion": "8.2"
"phpVersion": "8.3"
},
"fpm-alpine": {
"variant": "fpm-alpine",
"base": "alpine",
"baseVersion": "3.21",
"phpVersion": "8.2"
"phpVersion": "8.3"
}
}
},