Skip to content

Commit a95ed13

Browse files
authored
Update Dockerfile
fix imageick
1 parent 21d5f6b commit a95ed13

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Dockerfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,23 @@ RUN phpModules=" \
3838
" \
3939
&& docker-php-ext-install $phpModules
4040

41-
RUN pecl install igbinary \
42-
&& pecl install imagick \
43-
&& docker-php-ext-enable imagick
41+
RUN pecl install igbinary
42+
# && pecl install imagick \
43+
# && docker-php-ext-enable imagick
44+
ARG IMAGICK_VERSION=3.7.0
45+
46+
# Imagick is installed from the archive because regular installation fails
47+
# See: https://github.com/Imagick/imagick/issues/643#issuecomment-1834361716
48+
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
49+
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
50+
&& phpize \
51+
&& ./configure \
52+
&& make \
53+
&& make install \
54+
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
55+
&& rm -rf /tmp/*
56+
# <<< End of Imagick installation
57+
RUN docker-php-ext-enable imagick
4458

4559
# Install testing tools
4660
RUN composer global require phpunit/phpunit

0 commit comments

Comments
 (0)