Browse Source

first dockerfile

master
bita 8 months ago
commit
035b9e5912
  1. 93
      dockerfile

93
dockerfile

@ -0,0 +1,93 @@
# 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
## DOCKERFILE
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/*
#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
apt-get update && \
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libevent-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap-common \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libmagickwand-dev \
libzip-dev \
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
#Nextcloud download and verification
ENV NEXTCLOUD_VERSION %%VERSION%%
RUN set -ex; \
fetchDeps=" \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
\
curl -fsSL -o nextcloud.tar.bz2 \
"https://download.nextcloud.com/server/releases/nextcloud-22.2.0.zip"; \
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; \
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; \
rm -rf /var/lib/apt/lists/*
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["%%CMD%%"]
Loading…
Cancel
Save