Dockerfile fixes
All checks were successful
the build was successful

This commit is contained in:
Andy 2018-07-14 11:32:03 +02:00
parent c23dbc327e
commit c4a27ae7f1
Signed by: arno
GPG Key ID: 9076D5E6B31AE99C
3 changed files with 18 additions and 19 deletions

View File

@ -1,11 +1,10 @@
FROM alpine:edge FROM alpine:3.8
ARG LYCHEE_VERSION=3.1.6 ARG LYCHEE_VERSION=3.1.6
ENV UID=991 GID=991 ENV UID=991 GID=991
RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ RUN BUILD_DEPS=" \
&& BUILD_DEPS=" \
imagemagick-dev \ imagemagick-dev \
tar \ tar \
libressl \ libressl \
@ -17,34 +16,34 @@ RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/r
&& apk -U upgrade && apk add \ && apk -U upgrade && apk add \
${BUILD_DEPS} \ ${BUILD_DEPS} \
nginx \ nginx \
php7.1-mbstring@testing \ php7-mbstring \
php7.1-fpm@testing \ php7-fpm \
php7.1-exif@testing \ php7-exif \
php7.1-gd@testing \ php7-gd \
php7.1-json@testing \ php7-json \
php7.1-mysqli@testing \ php7-mysqli \
php7.1-zip@testing \ php7-zip \
php7.1-session@testing \ php7-session \
php7.1-pear@testing \ php7-pear \
php7.1-dev@testing \ php7-dev \
s6 \ s6 \
su-exec \ su-exec \
imagemagick \ imagemagick \
&& pecl install imagick \ && pecl install imagick \
&& echo "extension=imagick.so" > /etc/php7.1/conf.d/imagick.ini \ && echo "extension=imagick.so" > /etc/php7/conf.d/imagick.ini \
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \ && 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/post_max_size = 8M/post_max_size = 100M/g" \
-e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \ -e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \
-e "s/memory_limit = 256M/memory_limit = 512M/g" \ -e "s/memory_limit = 256M/memory_limit = 512M/g" \
/etc/php7.1/php.ini \ /etc/php7/php.ini \
&& mkdir /lychee \ && mkdir /lychee \
&& apk del ${BUILD_DEPS} php7.1-pear php7.1-dev \ && apk del ${BUILD_DEPS} php7-pear php7-dev \
&& rm -rf /var/cache/apk/* /tmp/* && rm -rf /var/cache/apk/* /tmp/*
COPY . /lychee/ COPY . /lychee/
RUN mv /lychee/docker/nginx.conf /etc/nginx/nginx.conf && \ 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/php-fpm.conf /etc/php7/php-fpm.conf && \
mv /lychee/docker/s6.d /etc/ && \ mv /lychee/docker/s6.d /etc/ && \
mv /lychee/docker/run.sh /usr/local/bin/run.sh mv /lychee/docker/run.sh /usr/local/bin/run.sh

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb
chown -R $UID:$GID /lychee /etc/nginx /etc/php7.1 /var/log /var/lib/nginx /tmp /etc/s6.d chown -R $UID:$GID /lychee /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
exec php-fpm7.1 exec php-fpm7