diff --git a/lychee/Dockerfile b/lychee/Dockerfile index 31ce6b1..69769ad 100644 --- a/lychee/Dockerfile +++ b/lychee/Dockerfile @@ -1,16 +1,25 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall -ARG VERSION=3.1.1 +ARG LYCHEE_VERSION=3.1.1 +ARG IMAGICK_EXT_VERSION=3.4.2 ENV UID=991 GID=991 RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ + && BUILD_DEPS=" \ + imagemagick-dev \ + tar \ + openssl \ + ca-certificates \ + build-base \ + autoconf \ + libtool" \ && apk -U add \ + ${BUILD_DEPS} \ nginx \ - libwebp@edge \ + libwebp \ php7-mbstring@testing \ php7-fpm@testing \ php7-exif@testing \ @@ -19,9 +28,10 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap php7-mysqli@testing \ php7-zip@testing \ php7-session@testing \ - tar \ + php7-pear@testing \ + php7-dev@testing \ supervisor \ - ca-certificates \ + imagemagick \ tini@commuedge \ && sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \ -e "s/post_max_size = 8M/post_max_size = 100M/g" \ @@ -29,11 +39,13 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap -e "s/memory_limit = 256M/memory_limit = 512M/g" \ /etc/php7/php.ini \ && mkdir /lychee && cd /lychee \ - && wget -qO- https://github.com/electerious/Lychee/archive/v$VERSION.tar.gz | tar xz --strip 1 \ - && apk del \ - tar \ - ca-certificates \ - && rm -f /var/cache/apk/* + && wget -qO- https://github.com/electerious/Lychee/archive/v${LYCHEE_VERSION}.tar.gz | tar xz --strip 1 \ + && cd /tmp && wget -q https://pecl.php.net/get/imagick-${IMAGICK_EXT_VERSION}.tgz \ + && tar xzf imagick-${IMAGICK_EXT_VERSION}.tgz && cd imagick-${IMAGICK_EXT_VERSION} \ + && phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \ + && echo "extension=imagick.so" > /etc/php7/conf.d/00_imagick.ini \ + && apk del ${BUILD_DEPS} php7-pear php7-dev \ + && rm -rf /var/cache/apk/* /tmp/* COPY nginx.conf /etc/nginx/nginx.conf COPY php-fpm.conf /etc/php7/php-fpm.conf