Skip to content

Commit

Permalink
imagick workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
micszo committed Oct 7, 2024
1 parent e6ac11f commit aab2aee
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions php/Dockerfile-8.3
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,23 @@ RUN set -xe \
&& cp /usr/src/php/php.ini-production ${PHP_INI_DIR}/php.ini \
\
# Install imagemagick
&& for i in $(seq 1 3); do pecl install -o imagick && s=0 && break || s=$? && sleep 1; done; (exit $s) \
&& docker-php-ext-enable imagick \
# && for i in $(seq 1 3); do pecl install -o imagick && s=0 && break || s=$? && sleep 1; done; (exit $s) \
# && docker-php-ext-enable imagick \

ARG IMAGICK_VERSION=3.7.0

# Imagick is installed from the archive because regular installation fails
# See: https://github.com/Imagick/imagick/issues/643#issuecomment-1834361716
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
&& rm -rf /tmp/*
# <<< End of Imagick installation

# Install xdebug
&& for i in $(seq 1 3); do echo yes | pecl install -o "xdebug" && s=0 && break || s=$? && sleep 1; done; (exit $s) \
# Install blackfire: https://blackfire.io/docs/integrations/docker
Expand Down

0 comments on commit aab2aee

Please sign in to comment.