Skip to content

Commit

Permalink
Build imagick for PHP 8.3
Browse files Browse the repository at this point in the history
Signed-off-by: J0WI <[email protected]>
  • Loading branch information
J0WI committed Feb 25, 2025
1 parent 7123558 commit 3342dcd
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 28 deletions.
18 changes: 16 additions & 2 deletions 29/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
18 changes: 16 additions & 2 deletions 29/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -65,7 +68,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -74,10 +76,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
runDeps="$( \
Expand Down
18 changes: 16 additions & 2 deletions 29/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
18 changes: 16 additions & 2 deletions 30/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
18 changes: 16 additions & 2 deletions 30/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -65,7 +68,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -74,10 +76,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
runDeps="$( \
Expand Down
18 changes: 16 additions & 2 deletions 30/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
\
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
20 changes: 17 additions & 3 deletions 31/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
20 changes: 17 additions & 3 deletions 31/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
Expand Down Expand Up @@ -65,7 +68,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -74,10 +76,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
runDeps="$( \
Expand Down
20 changes: 17 additions & 3 deletions 31/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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; \
Expand Down Expand Up @@ -68,7 +71,6 @@ RUN set -ex; \
# 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 \
Expand All @@ -77,10 +79,22 @@ RUN set -ex; \
docker-php-ext-enable \
apcu \
igbinary \
imagick \
memcached \
redis \
; \
# 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"; \
rm -r /tmp/pear; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
Expand Down
Loading

0 comments on commit 3342dcd

Please sign in to comment.