Skip to content

Commit 771f8eb

Browse files
committed
imagick workaround
1 parent e6ac11f commit 771f8eb

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

php/Dockerfile-8.3

+15-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,21 @@ RUN set -xe \
8080
&& cp /usr/src/php/php.ini-production ${PHP_INI_DIR}/php.ini \
8181
\
8282
# Install imagemagick
83-
&& for i in $(seq 1 3); do pecl install -o imagick && s=0 && break || s=$? && sleep 1; done; (exit $s) \
84-
&& docker-php-ext-enable imagick \
83+
# && for i in $(seq 1 3); do pecl install -o imagick && s=0 && break || s=$? && sleep 1; done; (exit $s) \
84+
# && docker-php-ext-enable imagick \
85+
86+
# Imagick is installed from the archive because regular installation fails
87+
# See: https://github.com/Imagick/imagick/issues/643#issuecomment-1834361716
88+
&& curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/3.7.0.tar.gz \
89+
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
90+
&& phpize \
91+
&& ./configure \
92+
&& make \
93+
&& make install \
94+
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
95+
&& rm -rf /tmp/* \
96+
# <<< End of Imagick installation
97+
8598
# Install xdebug
8699
&& for i in $(seq 1 3); do echo yes | pecl install -o "xdebug" && s=0 && break || s=$? && sleep 1; done; (exit $s) \
87100
# Install blackfire: https://blackfire.io/docs/integrations/docker

0 commit comments

Comments
 (0)