summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpierreozoux <pierre@ozoux.net>2016-07-30 15:30:52 +0100
committerpierreozoux <pierre@ozoux.net>2016-07-30 15:30:52 +0100
commit8fa384bcd6619b9c19c5efbcdf7248d803e43727 (patch)
tree5bbcea834a5fe06b7f6d7a02887884bc34e29b56
first commit
-rw-r--r--Dockerfile56
-rw-r--r--README.md31
-rwxr-xr-xdocker-entrypoint.sh9
-rw-r--r--license.md1
-rw-r--r--logo.pngbin0 -> 6607 bytes
5 files changed, 97 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..85d41e03
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,56 @@
+FROM php:5.6-fpm
+
+RUN apt-get update && apt-get install -y \
+ bzip2 \
+ libcurl4-openssl-dev \
+ libfreetype6-dev \
+ libicu-dev \
+ libjpeg-dev \
+ libmcrypt-dev \
+ libmemcached-dev \
+ libpng12-dev \
+ libpq-dev \
+ libxml2-dev \
+ && rm -rf /var/lib/apt/lists/*
+
+# https://docs.nextcloud.com/server/9/admin_manual/installation/source_installation.html
+RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
+ && docker-php-ext-install gd exif intl mbstring mcrypt mysql opcache pdo_mysql pdo_pgsql pgsql zip
+
+# set recommended PHP.ini settings
+# see https://secure.php.net/manual/en/opcache.installation.php
+RUN { \
+ echo 'opcache.memory_consumption=128'; \
+ echo 'opcache.interned_strings_buffer=8'; \
+ echo 'opcache.max_accelerated_files=4000'; \
+ echo 'opcache.revalidate_freq=60'; \
+ echo 'opcache.fast_shutdown=1'; \
+ echo 'opcache.enable_cli=1'; \
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
+
+# PECL extensions
+RUN set -ex \
+ && pecl install APCu-4.0.10 \
+ && pecl install memcached-2.2.0 \
+ && pecl install redis-2.2.8 \
+ && docker-php-ext-enable apcu redis memcached
+
+ENV NEXTCLOUD_VERSION 9.0.53
+VOLUME /var/www/html
+
+RUN curl -fsSL -o nextcloud.tar.bz2 \
+ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
+ && curl -fsSL -o nextcloud.tar.bz2.asc \
+ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc" \
+ && export GNUPGHOME="$(mktemp -d)" \
+# gpg key from https://nextcloud.com/nextcloud.asc
+ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A \
+ && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
+ && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
+ && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
+ && rm nextcloud.tar.bz2
+
+COPY docker-entrypoint.sh /entrypoint.sh
+
+ENTRYPOINT ["/entrypoint.sh"]
+CMD ["php-fpm"]
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..fb5a026d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+What is Nextcloud?
+
+A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
+
+![logo](https://github.com/nextcloud/docker/blob/master/logo.png)
+
+# How to use this image
+
+## Start Nextcloud
+
+Starting the Nextcloud 9.0.53 instance listening on port 80 is as easy as the following:
+
+```console
+$ docker run -d -p 80:80 nextcloud:9.0.53
+```
+
+Then go to http://localhost/ and go through the wizard. By default this container uses SQLite for data storage, but the wizard should allow for connecting to an existing database.
+
+For a MySQL database you can link an database container, e.g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup.
+
+## Persistent data
+
+All data beyond what lives in the database (file uploads, etc) is stored within the default volume `/var/www/html`. With this volume, Nextcloud will only be updated when the file `version.php` is not present.
+
+- `-v /<mydatalocation>:/var/www/html`
+
+For fine grained data persistence, you can use 3 volumes, as shown below.
+
+- `-v /<mydatalocation>/apps:/var/www/html/apps` installed / modified apps
+- `-v /<mydatalocation>/config:/var/www/html/config` local configuration
+- `-v /<mydatalocation>/data:/var/www/html/data` the actual data of your Nextcloud
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
new file mode 100755
index 00000000..62d16254
--- /dev/null
+++ b/docker-entrypoint.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+if [ ! -e '/var/www/html/version.php' ]; then
+ tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
+ chown -R www-data /var/www/html
+fi
+
+exec "$@"
diff --git a/license.md b/license.md
new file mode 100644
index 00000000..a271da30
--- /dev/null
+++ b/license.md
@@ -0,0 +1 @@
+View [license information](https://github.com/nextcloud/server/blob/master/COPYING-README) for the software contained in this image.
diff --git a/logo.png b/logo.png
new file mode 100644
index 00000000..b986ede2
--- /dev/null
+++ b/logo.png
Binary files differ