lychee/Dockerfile
2018-07-14 11:25:37 +02:00

60 lines
1.5 KiB
Docker

FROM alpine:edge
ARG LYCHEE_VERSION=3.1.6
ENV UID=991 GID=991
RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& BUILD_DEPS=" \
imagemagick-dev \
tar \
libressl \
ca-certificates \
build-base \
autoconf \
pcre-dev \
libtool" \
&& apk -U upgrade && apk add \
${BUILD_DEPS} \
nginx \
php7.1-mbstring@testing \
php7.1-fpm@testing \
php7.1-exif@testing \
php7.1-gd@testing \
php7.1-json@testing \
php7.1-mysqli@testing \
php7.1-zip@testing \
php7.1-session@testing \
php7.1-pear@testing \
php7.1-dev@testing \
s6 \
su-exec \
imagemagick \
&& pecl install imagick \
&& echo "extension=imagick.so" > /etc/php7.1/conf.d/imagick.ini \
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \
-e "s/post_max_size = 8M/post_max_size = 100M/g" \
-e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \
-e "s/memory_limit = 256M/memory_limit = 512M/g" \
/etc/php7.1/php.ini \
&& mkdir /lychee \
&& apk del ${BUILD_DEPS} php7.1-pear php7.1-dev \
&& rm -rf /var/cache/apk/* /tmp/*
COPY . /lychee/
RUN mv /lychee/docker/nginx.conf /etc/nginx/nginx.conf && \
mv /lychee/docker/php-fpm.conf /etc/php7.1/php-fpm.conf && \
mv /lychee/docker/s6.d /etc/ && \
mv /lychee/docker/run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /lychee/uploads /lychee/data
EXPOSE 8888
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"
CMD ["run.sh"]