mirror of
https://github.com/hoellen/docker-nextcloud.git
synced 2025-04-19 12:09:21 +00:00
updates
This commit is contained in:
parent
00dfcb5a79
commit
fcb3a506c8
@ -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 <wonderfall@targaryen.house>"
|
|
||||||
|
|
||||||
CMD ["run.sh"]
|
|
@ -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"
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||||
|
|
||||||
ENV UID=991 GID=991 \
|
ENV UID=991 GID=991 \
|
@ -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"
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||||
|
|
||||||
ENV UID=991 GID=991 \
|
ENV UID=991 GID=991 \
|
@ -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 <wonderfall@targaryen.house>"
|
|
||||||
|
|
||||||
CMD ["run.sh"]
|
|
47
README.md
47
README.md
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[](http://microbadger.com/images/wonderfall/nextcloud "Get your own version badge on microbadger.com") [](http://microbadger.com/images/wonderfall/nextcloud "Get your own image badge on microbadger.com")
|
[](http://microbadger.com/images/wonderfall/nextcloud "Get your own version badge on microbadger.com") [](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
|
### Features
|
||||||
- Based on Alpine Linux.
|
- Based on Alpine Linux.
|
||||||
@ -21,11 +21,8 @@
|
|||||||
|
|
||||||
### Tags
|
### Tags
|
||||||
- **latest** : latest stable version.
|
- **latest** : latest stable version.
|
||||||
- **15.0** : latest 15.0.x version (stable)
|
- **18.0** : latest 18.0.x version (stable)
|
||||||
- **14.0** : latest 14.0.x version (oldstable)
|
- **17.0** : latest 17.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.**
|
|
||||||
|
|
||||||
### Build-time variables
|
### Build-time variables
|
||||||
- **NEXTCLOUD_VERSION** : version of nextcloud
|
- **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*).
|
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 \
|
docker run -d --name db_nextcloud \
|
||||||
-v /docker/nextcloud/db:/var/lib/mysql \
|
-v /docker/nextcloud/db:/var/lib/mysql \
|
||||||
@ -99,18 +96,11 @@ docker run -d --name nextcloud \
|
|||||||
-e DB_USER=nextcloud \
|
-e DB_USER=nextcloud \
|
||||||
-e DB_PASSWORD=supersecretpassword \
|
-e DB_PASSWORD=supersecretpassword \
|
||||||
-e DB_HOST=db_nextcloud \
|
-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.
|
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
|
### Configure
|
||||||
In the admin panel, you should switch from `AJAX cron` to `cron` (system cron).
|
In the admin panel, you should switch from `AJAX cron` to `cron` (system cron).
|
||||||
|
|
||||||
@ -135,7 +125,6 @@ services:
|
|||||||
image: wonderfall/nextcloud
|
image: wonderfall/nextcloud
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud-db # If using MySQL
|
- nextcloud-db # If using MySQL
|
||||||
- solr # If using Nextant
|
|
||||||
- redis # If using Redis
|
- redis # If using Redis
|
||||||
environment:
|
environment:
|
||||||
- UID=1000
|
- UID=1000
|
||||||
@ -145,8 +134,6 @@ services:
|
|||||||
- OPCACHE_MEM_SIZE=128
|
- OPCACHE_MEM_SIZE=128
|
||||||
- CRON_PERIOD=15m
|
- CRON_PERIOD=15m
|
||||||
- TZ=Europe/Berlin
|
- 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
|
- DOMAIN=localhost
|
||||||
- DB_TYPE=mysql
|
- DB_TYPE=mysql
|
||||||
- DB_NAME=nextcloud
|
- DB_NAME=nextcloud
|
||||||
@ -163,7 +150,7 @@ services:
|
|||||||
|
|
||||||
# If using MySQL
|
# If using MySQL
|
||||||
nextcloud-db:
|
nextcloud-db:
|
||||||
image: mariadb:10
|
image: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/nextcloud/db:/var/lib/mysql
|
- /docker/nextcloud/db:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
@ -174,19 +161,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- nextcloud_network
|
- 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
|
# If using Redis
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
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
|
### 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`.
|
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.
|
|
||||||
|
@ -9,7 +9,7 @@ services:
|
|||||||
image: wonderfall/nextcloud
|
image: wonderfall/nextcloud
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.15.0
|
dockerfile: Dockerfile.18.0
|
||||||
environment:
|
environment:
|
||||||
- UID=1000
|
- UID=1000
|
||||||
- GID=1000
|
- GID=1000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user