diff --git a/Dockerfile.14.0 b/Dockerfile.14.0 deleted file mode 100644 index 5837143..0000000 --- a/Dockerfile.14.0 +++ /dev/null @@ -1,71 +0,0 @@ -FROM wonderfall/nginx-php:7.2 - -ARG NEXTCLOUD_VERSION=14.0.12 -ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" - -ENV UID=991 GID=991 \ - UPLOAD_MAX_SIZE=10G \ - APC_SHM_SIZE=128M \ - OPCACHE_MEM_SIZE=128 \ - MEMORY_LIMIT=512M \ - CRON_PERIOD=15m \ - CRON_MEMORY_LIMIT=1g \ - TZ=Etc/UTC \ - DB_TYPE=sqlite3 \ - DOMAIN=localhost - -RUN apk -U upgrade \ - && apk add -t build-dependencies \ - gnupg \ - tar \ - build-base \ - autoconf \ - automake \ - pcre-dev \ - libtool \ - samba-dev \ - && apk add \ - libressl \ - ca-certificates \ - libsmbclient \ - tzdata \ - && pecl install \ - smbclient \ - apcu \ - redis \ - && echo "extension=smbclient.so" > /php/conf.d/smbclient.ini \ - && echo "extension=redis.so" > /php/conf.d/redis.ini \ - && mkdir /nextcloud \ - && cd /tmp \ - && NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \ - && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \ - && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha512 \ - && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \ - && wget -q https://nextcloud.com/nextcloud.asc \ - && echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \ - && CHECKSUM_STATE=$(echo -n $(sha512sum -c ${NEXTCLOUD_TARBALL}.sha512) | tail -c 2) \ - && if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \ - && gpg --import nextcloud.asc \ - && FINGERPRINT="$(LANG=C gpg --verify ${NEXTCLOUD_TARBALL}.asc ${NEXTCLOUD_TARBALL} 2>&1 \ - | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \ - && if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \ - && if [ "${FINGERPRINT}" != "${GPG_nextcloud}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \ - && echo "All seems good, now unpacking ${NEXTCLOUD_TARBALL}..." \ - && tar xjf ${NEXTCLOUD_TARBALL} --strip 1 -C /nextcloud \ - && update-ca-certificates \ - && apk del build-dependencies \ - && rm -rf /var/cache/apk/* /tmp/* /root/.gnupg - -COPY rootfs / - -RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/* - -VOLUME /data /config /apps2 /nextcloud/themes - -EXPOSE 8888 - -LABEL description="A server software for creating file hosting services" \ - nextcloud="Nextcloud v${NEXTCLOUD_VERSION}" \ - maintainer="Wonderfall " - -CMD ["run.sh"] diff --git a/Dockerfile.15.0 b/Dockerfile.17 similarity index 97% rename from Dockerfile.15.0 rename to Dockerfile.17 index e720027..7beda5f 100644 --- a/Dockerfile.15.0 +++ b/Dockerfile.17 @@ -1,6 +1,6 @@ -FROM wonderfall/nginx-php:7.2 +FROM wonderfall/nginx-php:7.3 -ARG NEXTCLOUD_VERSION=15.0.8 +ARG NEXTCLOUD_VERSION=17.0.2 ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ENV UID=991 GID=991 \ diff --git a/Dockerfile.16.0 b/Dockerfile.18.0 similarity index 97% rename from Dockerfile.16.0 rename to Dockerfile.18.0 index f1fa9d6..c86cd1e 100644 --- a/Dockerfile.16.0 +++ b/Dockerfile.18.0 @@ -1,6 +1,6 @@ -FROM wonderfall/nginx-php:7.2 +FROM wonderfall/nginx-php:7.3 -ARG NEXTCLOUD_VERSION=16.0.1 +ARG NEXTCLOUD_VERSION=18.0.0 ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ENV UID=991 GID=991 \ diff --git a/Dockerfile.daily b/Dockerfile.daily deleted file mode 100644 index 5092844..0000000 --- a/Dockerfile.daily +++ /dev/null @@ -1,60 +0,0 @@ -FROM wonderfall/nginx-php:7.2 - -ENV UID=991 GID=991 \ - UPLOAD_MAX_SIZE=10G \ - APC_SHM_SIZE=128M \ - OPCACHE_MEM_SIZE=128 \ - MEMORY_LIMIT=512M \ - CRON_PERIOD=15m \ - CRON_MEMORY_LIMIT=1g \ - TZ=Etc/UTC \ - DB_TYPE=sqlite3 \ - DOMAIN=localhost - -RUN apk -U upgrade \ - && apk add -t build-dependencies \ - gnupg \ - tar \ - build-base \ - autoconf \ - automake \ - pcre-dev \ - libtool \ - samba-dev \ - && apk add \ - libressl \ - ca-certificates \ - libsmbclient \ - tzdata \ - && pecl install \ - smbclient \ - apcu \ - redis \ - && echo "extension=smbclient.so" > /php/conf.d/smbclient.ini \ - && echo "extension=redis.so" > /php/conf.d/redis.ini \ - && mkdir /nextcloud \ - && cd /tmp \ - && wget -q https://download.nextcloud.com/server/daily/latest.tar.bz2 \ - && echo "Verifying checksum of latest.tar.bz2..." \ - && wget -q https://download.nextcloud.com/server/daily/latest.tar.bz2.sha512 \ - && echo "$(cat latest.tar.bz2.sha512 | awk '{print $1;}') latest.tar.bz2" > latest.tar.bz2.sha512 \ - && CHECKSUM_STATE=$(echo -n $(sha512sum -c latest.tar.bz2.sha512) | tail -c 2) \ - && if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \ - && tar xjf latest.tar.bz2 --strip 1 -C /nextcloud \ - && update-ca-certificates \ - && apk del build-dependencies \ - && rm -rf /var/cache/apk/* /tmp/* - -COPY rootfs / - -RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/* - -VOLUME /data /config /apps2 /nextcloud/themes /php/session - -EXPOSE 8888 - -LABEL description="A server software for creating file hosting services" \ - nextcloud="Nextcloud daily" \ - maintainer="Wonderfall " - -CMD ["run.sh"] diff --git a/README.md b/README.md index c4e8443..cff4ac5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![](https://images.microbadger.com/badges/version/wonderfall/nextcloud.svg)](http://microbadger.com/images/wonderfall/nextcloud "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/wonderfall/nextcloud.svg)](http://microbadger.com/images/wonderfall/nextcloud "Get your own image badge on microbadger.com") -**This image was made for my own use and I have no intention to make this official. Support won't be regular so if there's an update, or a fix, you can open a pull request. Any contribution is welcome, but please be aware I'm very busy currently. Before opening an issue, please check if there's already one related. Also please use Github instead of Docker Hub, otherwise I won't see your comments. Thanks.** +**Made for my own use. Irregular updates! This image is eventually intended as a base for your own Docker image. I cannot be responsible if you're using outdated Docker images.** ### Features - Based on Alpine Linux. @@ -21,11 +21,8 @@ ### Tags - **latest** : latest stable version. -- **15.0** : latest 15.0.x version (stable) -- **14.0** : latest 14.0.x version (oldstable) -- **daily** : latest code (daily build). - -Other tags than `daily` are built weekly. For security reasons, you should occasionally update the container, even if you have the latest version of Nextcloud. **WARNING : automatic build is not working at the moment.** +- **18.0** : latest 18.0.x version (stable) +- **17.0** : latest 17.0.x version (oldstable) ### Build-time variables - **NEXTCLOUD_VERSION** : version of nextcloud @@ -70,7 +67,7 @@ Basically, you can use a database instance running on the host or any other mach Pull the image and create a container. `/docker` can be anywhere on your host, this is just an example. Change `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` values (mariadb). You may also want to change UID and GID for Nextcloud, as well as other variables (see *Environment Variables*). ``` -docker pull wonderfall/nextcloud:10.0 && docker pull mariadb:10 +docker pull wonderfall/nextcloud && docker pull mariadb docker run -d --name db_nextcloud \ -v /docker/nextcloud/db:/var/lib/mysql \ @@ -99,18 +96,11 @@ docker run -d --name nextcloud \ -e DB_USER=nextcloud \ -e DB_PASSWORD=supersecretpassword \ -e DB_HOST=db_nextcloud \ - wonderfall/nextcloud:10.0 + wonderfall/nextcloud ``` You are **not obliged** to use `ADMIN_USER` and `ADMIN_PASSWORD`. If these variables are not provided, you'll be able to configure your admin acccount from your browser. -**Below you can find a docker-compose file, which is very useful!** - -Now you have to use a **reverse proxy** in order to access to your container through Internet, steps and details are available at the end of the README.md. And that's it! Since you already configured Nextcloud through setting environment variables, there's no setup page. - -### ARM-based devices -You will have to build yourself using an Alpine-ARM image, like `orax/alpine-armhf:edge`. - ### Configure In the admin panel, you should switch from `AJAX cron` to `cron` (system cron). @@ -135,7 +125,6 @@ services: image: wonderfall/nextcloud depends_on: - nextcloud-db # If using MySQL - - solr # If using Nextant - redis # If using Redis environment: - UID=1000 @@ -145,8 +134,6 @@ services: - OPCACHE_MEM_SIZE=128 - CRON_PERIOD=15m - TZ=Europe/Berlin - - ADMIN_USER=admin # Don't set to configure through browser - - ADMIN_PASSWORD=admin # Don't set to configure through browser - DOMAIN=localhost - DB_TYPE=mysql - DB_NAME=nextcloud @@ -163,7 +150,7 @@ services: # If using MySQL nextcloud-db: - image: mariadb:10 + image: mariadb volumes: - /docker/nextcloud/db:/var/lib/mysql environment: @@ -174,19 +161,6 @@ services: networks: - nextcloud_network - # If using Nextant - solr: - image: solr:6-alpine - container_name: solr - volumes: - - /docker/nextcloud/solr:/opt/solr/server/solr/mycores - entrypoint: - - docker-entrypoint.sh - - solr-precreate - - nextant - networks: - - nextcloud_network - # If using Redis redis: image: redis:alpine @@ -212,14 +186,5 @@ Redis can be used for distributed and file locking cache, alongside with APCu (l  ), ``` -### How to configure Nextant -You will have to deploy a Solr server, I've shown an example above with docker-compose. Once Nextant app is installed, go to "additional settings" in your admin pannel and use http://solr:8983/solr as "Adress of your Solr Servlet". There you go! - ### Tip : how to use occ command There is a script for that, so you shouldn't bother to log into the container, set the right permissions, and so on. Just use `docker exec -ti nexcloud occ command`. - -### Reverse proxy -Of course you can use your own software! nginx, Haproxy, Caddy, h2o, Traefik... -The latter is especially a good choice when using Docker. [Give it a try!](https://traefik.io/) - -Whatever your choice is, you have to know that headers are already sent by the container, including HSTS, so there's no need to add them again. **It is strongly recommended (I'd like to say : MANDATORY) to use Nextcloud through an encrypted connection (HTTPS).** [Let's Encrypt](https://letsencrypt.org/) provides free SSL/TLS certificates, so you have no excuses. diff --git a/docker-compose.yml b/docker-compose.yml index 735b8e3..9c661c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: image: wonderfall/nextcloud build: context: . - dockerfile: Dockerfile.15.0 + dockerfile: Dockerfile.18.0 environment: - UID=1000 - GID=1000