fix(IMAGEMAGICK extension): implement building extension for PHP 8.0 from source
We need to build imagemagick extension from sources due the latest version, that supports PHP 8.0 has not been released to PECL. Closes #2861
This commit is contained in:
@ -343,7 +343,7 @@ RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
||||
# Install the php xhprof extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
|
||||
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v5.0.1.tar.gz"; \
|
||||
else \
|
||||
else \
|
||||
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
||||
fi \
|
||||
&& mkdir -p xhprof \
|
||||
@ -684,10 +684,28 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
ARG IMAGEMAGICK_VERSION=latest
|
||||
ENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
apt-get install -y git && \
|
||||
cd /tmp && \
|
||||
if [ ${IMAGEMAGICK_VERSION} = "latest" ]; then \
|
||||
git clone https://github.com/Imagick/imagick; \
|
||||
else \
|
||||
git clone --branch ${IMAGEMAGICK_VERSION} https://github.com/Imagick/imagick; \
|
||||
fi && \
|
||||
cd imagick && \
|
||||
phpize && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -r /tmp/imagick; \
|
||||
else \
|
||||
pecl install imagick; \
|
||||
fi && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
@ -928,7 +946,7 @@ RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
|
||||
libx11-dev \
|
||||
libjpeg62 \
|
||||
libxtst6 \
|
||||
fontconfig \
|
||||
fontconfig \
|
||||
libjpeg62-turbo \
|
||||
xfonts-base \
|
||||
xfonts-75dpi \
|
||||
|
Reference in New Issue
Block a user