111 lines
3.4 KiB
Docker
111 lines
3.4 KiB
Docker
# FROM nextcloud:12.0.4
|
|
# FROM nextcloud:13.0.12
|
|
# FROM nextcloud:16
|
|
# FROM nextcloud:17
|
|
# FROM nextcloud:18.0.6-apache
|
|
# FROM nextcloud:19.0.3-apache
|
|
# FROM nextcloud:20.0.0-apache
|
|
# FROM nextcloud:20.0.5-apache
|
|
# FROM nextcloud:21.0.2-apache
|
|
# FROM nextcloud:22.2-apache
|
|
# FROM nextcloud:23.0.2-apache
|
|
# FROM nextcloud:24.0.2-apache
|
|
# FROM nextcloud:25.0.4-apache
|
|
# FROM nextcloud:26.0.2-apache
|
|
# FROM nextcloud:27.0.2-apache
|
|
# FROM nextcloud:27.1.1-apache
|
|
# FROM nextcloud:27.1.3-apache
|
|
# FROM nextcloud:27.1.4-apache
|
|
# FROM nextcloud:28.0.1-apache
|
|
FROM nextcloud:29.0.3-apache
|
|
|
|
# This is a stupid comment for a demo (remove later)
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
clamdscan nano ghostscript jq \
|
|
&& apt-get clean
|
|
|
|
#
|
|
## Enable REDIS extension
|
|
# RUN pecl channel-update pecl.php.net \
|
|
# && sh -c "yes '' | pecl install redis" \
|
|
# && rm -rf /tmp/pear \
|
|
# && rm -f /usr/local/etc/php/glenux-redis.ini \
|
|
# && echo "extension=redis.so" >> /usr/local/etc/php/glenux-redis.ini \
|
|
# && docker-php-ext-enable redis
|
|
|
|
## Enable APCU extension
|
|
# RUN pecl channel-update pecl.php.net \
|
|
# && pecl install apcu-${APCU_VERSION} \
|
|
# && rm -f /usr/local/etc/php/glenux-apcu.ini \
|
|
# && echo "extension=apcu.so" >> /usr/local/etc/php/glenux-apcu.ini \
|
|
# && echo "apc.enable_cli=1" >> /usr/local/etc/php/glenux-apcu.ini \
|
|
# && echo "apc.enable=1" >> /usr/local/etc/php/glenux-apcu.ini \
|
|
# && docker-php-ext-enable apcu
|
|
|
|
# Mandatory for bookmark extension
|
|
# but missing from deb packages
|
|
# RUN apt-get update \
|
|
# && apt-get install -y php7.3-gmp
|
|
|
|
##
|
|
## GMP Support (for bookmark extension)
|
|
##
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
libgmp3-dev \
|
|
&& docker-php-ext-install gmp
|
|
|
|
##
|
|
## BZ2 Support (for nextcloud)
|
|
##
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
libbz2-dev \
|
|
&& docker-php-ext-install bz2
|
|
|
|
##
|
|
## SVG and LibreSign support
|
|
##
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
libmagickcore-6.q16-6-extra \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN sed -i'' 's|.*<policy domain="coder".*"PDF".*|<policy domain="coder" rights="read \| write" pattern="PDF" />|g' \
|
|
/etc/ImageMagick-6/policy.xml
|
|
|
|
##
|
|
## Raise memory limit for PHP
|
|
##
|
|
ENV PHP_MEMORY_LIMIT=1024M
|
|
ENV PHP_UPLOAD_LIMIT=1800M
|
|
RUN echo '[opcache]' > /usr/local/etc/php/conf.d/opcache.ini \
|
|
&& echo 'opcache.memory_consumption=256' >> /usr/local/etc/php/conf.d/opcache.ini \
|
|
&& echo '[PHP]' > /usr/local/etc/php/conf.d/memory-limit.ini \
|
|
&& echo 'memory_limit=1024M' >> /usr/local/etc/php/conf.d/memory-limit.ini
|
|
|
|
##
|
|
## CRON SETUP
|
|
##
|
|
## Based on https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/cron/apache
|
|
##
|
|
RUN echo '*/5 * * * * php -d memory_limit=1024M -f /var/www/html/cron.php' \
|
|
> /var/spool/cron/crontabs/www-data
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
supervisor \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
|
COPY supervisord.conf /etc/supervisord.conf
|
|
|
|
# COPY --chmod=755 ./hooks/gx.post-installation.www.sh /app/gx.post-installation.www.sh
|
|
# COPY --chmod=755 ./hooks/gx.post-installation.root.sh /docker-entrypoint-hooks.d/post-installation/gx.post-installation.root.sh
|
|
|
|
COPY --chmod=755 ./hooks/gx.before-starting.www.sh /docker-entrypoint-hooks.d/before-starting/gx.before-starting.www.sh
|
|
|
|
ENV NEXTCLOUD_UPDATE=1
|
|
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
|
|