This increases the size of the container image, but reduces the reliance on the external volume for loading application data. This couples the application code to the container image rather than to the container state.
20 lines
542 B
Docker
20 lines
542 B
Docker
FROM docker.io/library/nginx:latest
|
|
|
|
ENV NEXTCLOUD_DOMAIN=example.com
|
|
ENV NEXTCLOUD_PHP_FPM_HOST=php-fpm-nextcloud:9000
|
|
ENV NEXTCLOUD_MAX_UPLOAD_SIZE=512M
|
|
|
|
ADD nginx.conf.template /nginx.conf.template
|
|
ADD docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
RUN mkdir --parents /var/www/html
|
|
WORKDIR /var/www/html
|
|
|
|
RUN curl -sSLo latest.zip https://download.nextcloud.com/server/releases/latest.zip
|
|
RUN unzip latest.zip
|
|
RUN rm latest.zip
|
|
RUN chown -R root:root nextcloud/
|
|
RUN chmod -R 0755 nextcloud/
|
|
|
|
ENTRYPOINT ["sh", "-c", "/docker-entrypoint.sh"]
|