lychee/Dockerfile

59 lines
1.3 KiB
Docker
Raw Normal View History

2019-09-29 20:27:15 +00:00
FROM alpine
2018-07-14 09:25:37 +00:00
ARG LYCHEE_VERSION=3.1.6
ENV UID=991 GID=991
2018-07-14 09:32:03 +00:00
RUN BUILD_DEPS=" \
2018-07-14 09:25:37 +00:00
imagemagick-dev \
tar \
libressl \
ca-certificates \
build-base \
autoconf \
pcre-dev \
libtool" \
&& apk -U upgrade && apk add \
${BUILD_DEPS} \
nginx \
2018-07-14 09:32:03 +00:00
php7-mbstring \
php7-fpm \
php7-exif \
php7-gd \
php7-json \
php7-mysqli \
php7-zip \
php7-session \
php7-pear \
php7-dev \
2018-07-14 09:25:37 +00:00
s6 \
su-exec \
imagemagick \
&& pecl install imagick \
2018-07-14 09:32:03 +00:00
&& echo "extension=imagick.so" > /etc/php7/conf.d/imagick.ini \
2018-07-14 09:25:37 +00:00
&& 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" \
2018-07-14 09:32:03 +00:00
/etc/php7/php.ini \
2018-07-14 09:25:37 +00:00
&& mkdir /lychee \
2018-07-14 09:32:03 +00:00
&& apk del ${BUILD_DEPS} php7-pear php7-dev \
2018-07-14 09:25:37 +00:00
&& rm -rf /var/cache/apk/* /tmp/*
COPY . /lychee/
RUN mv /lychee/docker/nginx.conf /etc/nginx/nginx.conf && \
2018-07-14 09:32:03 +00:00
mv /lychee/docker/php-fpm.conf /etc/php7/php-fpm.conf && \
2018-07-14 09:25:37 +00:00
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"]