2016-04-11 15:59:32 +02:00
|
|
|
FROM alpine:3.3
|
|
|
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
|
|
|
|
2016-04-11 16:20:13 +02:00
|
|
|
ARG VERSION=3.1.0
|
|
|
|
|
2016-04-11 15:59:32 +02:00
|
|
|
ENV UID=991 GID=991
|
|
|
|
|
|
|
|
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
2016-04-27 22:18:49 +02:00
|
|
|
&& echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
2016-04-27 22:22:28 +02:00
|
|
|
&& echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
|
2016-04-11 15:59:32 +02:00
|
|
|
&& apk -U add \
|
|
|
|
nginx \
|
2016-04-27 22:21:55 +02:00
|
|
|
libwebp@edge \
|
2016-04-27 22:18:49 +02:00
|
|
|
php7-fpm@testing \
|
|
|
|
php7-exif@testing \
|
|
|
|
php7-gd@testing \
|
|
|
|
php7-json@testing \
|
|
|
|
php7-mysqli@testing \
|
|
|
|
php7-zip@testing \
|
2016-04-27 22:28:49 +02:00
|
|
|
php7-session@testing \
|
2016-04-11 15:59:32 +02:00
|
|
|
tar \
|
|
|
|
supervisor \
|
|
|
|
ca-certificates \
|
|
|
|
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" \
|
|
|
|
-e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \
|
|
|
|
-e "s/memory_limit = 256M/memory_limit = 512M/g" \
|
2016-04-27 22:18:49 +02:00
|
|
|
/etc/php7/php.ini \
|
2016-04-11 15:59:32 +02:00
|
|
|
&& mkdir /lychee && cd /lychee \
|
2016-04-11 16:20:13 +02:00
|
|
|
&& wget -qO- https://github.com/electerious/Lychee/archive/v$VERSION.tar.gz | tar xz --strip 1 \
|
2016-04-11 15:59:32 +02:00
|
|
|
&& apk del \
|
|
|
|
tar \
|
|
|
|
ca-certificates \
|
|
|
|
&& rm -f /var/cache/apk/*
|
|
|
|
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
2016-04-27 22:18:49 +02:00
|
|
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
2016-04-11 15:59:32 +02:00
|
|
|
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
|
|
|
COPY run.sh /usr/local/bin/run.sh
|
|
|
|
|
|
|
|
RUN chmod +x /usr/local/bin/run.sh
|
|
|
|
|
|
|
|
VOLUME /lychee/uploads /lychee/data
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["tini","--","run.sh"]
|