From 34d0a7416c5c7500c3e6e5bbccfeefc74cd09f91 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 2 Jan 2020 08:23:08 +1100 Subject: [PATCH] Updated imagick for HEIC photos --- Dockerfile | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88abc01..fc5eb69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,36 @@ FROM registry.leenooks.net/leenooks/php:7.3-fpm-mp -RUN apt-get update \ - && apt-get install -y libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev libmagickwand-dev --no-install-recommends \ +RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list \ + && cat /etc/apt/sources.list|grep ^deb | sed -E 's/^deb/deb-src/' >> /etc/apt/sources.list \ + && apt-get -y update \ + && apt-get -y install wget build-essential autoconf libtool git-core libwmf0.2-7 \ + && apt-get -y build-dep imagemagick libmagickcore-dev libde265 libheif \ + && cd /usr/src/ \ + && git clone https://github.com/strukturag/libde265.git \ + && git clone https://github.com/strukturag/libheif.git \ + && cd libde265/ \ + && ./autogen.sh \ + && ./configure \ + && make \ + && make install \ + && cd /usr/src/libheif/ \ + && ./autogen.sh \ + && ./configure \ + && make \ + && make install \ + && cd /usr/src/ \ + && wget https://www.imagemagick.org/download/ImageMagick.tar.gz \ + && tar xf ImageMagick.tar.gz \ + && cd ImageMagick-7* \ + && ./configure --with-heic=yes \ + && make \ + && make install \ + && ldconfig \ + && apt-get install -y libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev --no-install-recommends \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install -j$(nproc) bz2 sockets gmp gd pcntl exif \ && pecl install imagick && docker-php-ext-enable imagick \ - && rm -rf /var/lib/apt/lists/* /tmp/* + && apt-get purge -y build-essential autoconf libtool wget libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev libmagickcore-dev hicolor-icon-theme texlive-base texlive-binaries libx11-dev \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* /tmp/* /usr/src/*