From 8fa384bcd6619b9c19c5efbcdf7248d803e43727 Mon Sep 17 00:00:00 2001 From: pierreozoux Date: Sat, 30 Jul 2016 15:30:52 +0100 Subject: [PATCH] first commit --- Dockerfile | 56 +++++++++++++++++++++++++++++++++++++++++++ README.md | 31 ++++++++++++++++++++++++ docker-entrypoint.sh | 9 +++++++ license.md | 1 + logo.png | Bin 0 -> 6607 bytes 5 files changed, 97 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100755 docker-entrypoint.sh create mode 100644 license.md create mode 100644 logo.png 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 /:/var/www/html` + +For fine grained data persistence, you can use 3 volumes, as shown below. + +- `-v //apps:/var/www/html/apps` installed / modified apps +- `-v //config:/var/www/html/config` local configuration +- `-v //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 0000000000000000000000000000000000000000..b986ede2ced1295eb16e34f525f8e1132dc0485c GIT binary patch literal 6607 zcmaJ`g;!M1-=<3tkY-s}L^`BHYKf(5NfD85=~$$sk?scRmPHX3ca@OtkY;I+kZzIs z?f3ly-Z^Jx&Ykm_xt}}p%=0|w+*mywRWcGr5-cn%GIcd&eN5kpscJ+7n6`Y7CmGY> zc`K?L5@AXZk?jY}GqH!7sW&Em_P>g)$d&Jp8D#K*y!0_}xA%crdD&sXU@!qEHy3Xk zD-SyXcQ1$hLm5U)jF!5xf}wxGLE*as>gndc?NtHxp;nf(%1{SXEnTGTR5vI;d?+6J zlb^9CIq%!Ec1P>e#vixV2_&S&^ua>g?ns47t>3P%3s9Fx-Z_xZxbo? zl$ywg{|g}q=)@Ac#aC@8w_A{hRhcq#%c#93G0qpUGiR z|5dlA>vxa&lj1R)OvvaeR$b^tF^LzK2mLDVuS&qQL5}>vyV(Uo=HrtrFyA>gY#%YGJzNwZ z#y`Yq{cHt`=ilJY(=FY6ldNUP&{ipGyn=&xpezSA41fR|=sTB&3j;jo4=#mdRCh)? z?PkLS7(D`~bt8hFtgYM_4|WX~1~ETluL8gY{P~SuK6Ab6Y5D^@iW{NegWX!t)#L!H9}~OzyaBfzv-8 zad~)zW#vco zG&^3Yz@v3M(4w>@C)T&i9hlysR}DkVcdEC90#??y;4Pip?(V-~9gq$}fkvB?0eoBp zW!-e;bm+4z^W#4n952~s|kfciy($Yte2<0H+GeKZ#~PE zxR6uc`Zid%*L);_+1K=B6jNZ{yUA>n##sJ8Gmvq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