diff --git a/dockerfile b/dockerfile index f1c4eb5..945c201 100644 --- a/dockerfile +++ b/dockerfile @@ -1,9 +1,8 @@ # NEXTCLOUD EN DOCKER -#### Dockerfile - Gancio (modelo) https://git.sindominio.net/estibadores/gancio/src/branch/master/Dockerfile - -#### Dockerfile - Nextcloud (oficial) https://github.com/nextcloud/docker/blob/master/Dockerfile-debian.template +### Seguimos como modelo: Dockerfile - Gancio https://git.sindominio.net/estibadores/gancio/src/branch/master/Dockerfile +### Seguimos como oficial: Dockerfile - Nextcloud https://github.com/nextcloud/docker/blob/master/Dockerfile-debian.template ## DOCKERFILE @@ -11,17 +10,23 @@ FROM registry.sindominio.net/debian as builder RUN apt-get update && \ -apt-get install -y --no-install-recommends curl gnupg2 ca-certificates rsync bzip2 busybox-static && \ -apt-get clean && \ -rm -rf /var/lib/apt/lists/* + apt-get install -y --no-install-recommends \ + curl \ + gnupg2 \ + ca-certificates \ + rsync \ + bzip2 \ + busybox-static && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* -#entrypoint.sh and cron.sh dependencies (NO SABEMOS SI ES NECESARIO O CÓMO SE HACEN LAS COPIAS DE SEGURIDAD) +## entrypoint.sh and cron.sh dependencies (NO SABEMOS SI ES NECESARIO O CÓMO SE HACEN LAS COPIAS DE SEGURIDAD) -#install the PHP extensions we need https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +## Install the PHP extensions we need https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -apt-get update && \ -apt-get install -y --no-install-recommends \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ libcurl4-openssl-dev \ libevent-dev \ libfreetype6-dev \ @@ -39,32 +44,30 @@ apt-get install -y --no-install-recommends \ libwebp-dev \ libgmp-dev + ## Faltan líneas del original que no sabemos si son necesarios. ## Revisar la creación de la carpeta "data" y los permisos a root -mkdir /var/www/data; \ -chown -R www-data:root /var/www; \ -chmod -R g=u /var/www +RUN mkdir /var/www/data; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www +## Nextcloud download and verification -#Nextcloud download and verification -ENV NEXTCLOUD_VERSION %%VERSION%% - -RUN set -ex; \ - fetchDeps=" \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ + dirmngr + curl -fsSL -o nextcloud.tar.bz2 \ "https://download.nextcloud.com/server/releases/nextcloud-22.2.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc \ "%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \