Re-organize Dockerfile for better caching

This commit is contained in:
Glenn Y. Rolland 2021-03-27 17:18:15 +01:00
parent 2f13802258
commit f7624d653e
1 changed files with 13 additions and 14 deletions

View File

@ -34,6 +34,18 @@ RUN apt-get update \
# RUN apt-get update \
# && apt-get install -y php7.3-gmp
##
## GMP Support (for bookmark extension)
##
RUN apt-get update && apt-get install -y libgmp3-dev \
&& docker-php-ext-install gmp
##
## SVG & Thumbnail support
##
RUN apt-get update && apt-get install -y \
libmagickcore-6.q16-6-extra ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
##
## Raise memory limit for PHP
@ -48,7 +60,7 @@ RUN echo 'memory_limit=1024M' \
## CRON SETUP
##
## Based on https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/cron/apache
##
RUN apt-get update && apt-get install -y \
supervisor \
&& rm -rf /var/lib/apt/lists/* \
@ -56,19 +68,6 @@ RUN apt-get update && apt-get install -y \
COPY supervisord.conf /etc/supervisord.conf
##
## GMP Support (for bookmark extension)
##
RUN apt-get update && apt-get install -y libgmp3-dev \
&& docker-php-ext-install gmp
##
## SVG & Thumbnail support
##
RUN apt-get update && apt-get install -y \
libmagickcore-6.q16-6-extra ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
ENV NEXTCLOUD_UPDATE=1
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]