Browse Source

reparaciones del dockerfile nextcloud

master
bita 7 months ago
parent
commit
8086e0106e
  1. 54
      dockerfile

54
dockerfile

@ -1,14 +1,9 @@
# NEXTCLOUD EN DOCKER
### 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
FROM registry.sindominio.net/debian as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
@ -20,7 +15,6 @@ RUN apt-get update && \
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)
## Install the PHP extensions we need https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
@ -44,43 +38,43 @@ RUN apt-get update && \
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
RUN mkdir /var/www/data; \
chown -R www-data:root /var/www; \
RUN mkdir /var/www/data && \
chown -R www-data:root /var/www && \
chmod -R g=u /var/www
## Nextcloud download and verification
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gnupg \
dirmngr
dirmngr && \
curl -fsSL -o nextcloud.tar.bz2 \
"https://download.nextcloud.com/server/releases/nextcloud-22.2.0.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"; \
"https://download.nextcloud.com/server/releases/nextcloud-22.2.0.tar.bz2.asc" && \
## (no entendemos si es necesario) export GNUPGHOME="$(mktemp -d)"; \
## gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
gpgconf --kill all && \
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
## (no entendemos si es necesario) rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data && \
mkdir -p /usr/src/nextcloud/custom_apps && \
chmod +x /usr/src/nextcloud/occ && \
export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
gpgconf --kill all; \
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data; \
mkdir -p /usr/src/nextcloud/custom_apps; \
chmod +x /usr/src/nextcloud/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-get purge -y --auto-remove -o \
gnupg \
dirmngr && \
rm -rf /var/lib/apt/lists/*
COPY *.sh upgrade.exclude /
@ -88,9 +82,3 @@ COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["%%CMD%%"]

Loading…
Cancel
Save