Answer the question
In order to leave comments, you need to log in
How to install imagick for PHP7.1 (docker, alpine)?
I am learning docker, I have a task to install the Imagick extension for php:7.1-fpm-alpine
Example:
# Imagick
ENV IMAGICK_VERSION 3.4.1
RUN apk add --no-cache imagemagick-dev libtool autoconf gcc g++ make \
&& pecl install imagick-$IMAGICK_VERSION \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
&& apk del libtool autoconf gcc g++ make
19 source files, building
running: phpize
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
Please provide the prefix of Imagemagick installation [autodetect] :
Answer the question
In order to leave comments, you need to log in
In such cases, through the sub-shell, you can feed the team what it asks for.
For example:
# Install Xdebug
RUN apk add --update --no-cache --virtual .tools-deps \
autoconf g++ libtool make \
&& (yes | pecl install xdebug) \
&& apk del .tools-deps \
&& rm -rf /var/cache/apk/*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question