Skip to content

Instantly share code, notes, and snippets.

  • Star 26 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Install imagick In Docker FROM php:7.1-fpm-alpine


RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
    && apk del .phpize-deps
Copy link

mlocati commented Dec 13, 2019

Just a side note: I recently added Alpine support to my install-php-extensions script: you can easily install the imagick PHP extension (as well as many other extensions) on Alpine & Debian by running:

ADD /usr/local/bin/

RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
    install-php-extensions imagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment