mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-17 18:46:43 +01:00
first commit
This commit is contained in:
commit
8fa384bcd6
5 changed files with 97 additions and 0 deletions
56
Dockerfile
Normal file
56
Dockerfile
Normal file
|
@ -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"]
|
31
README.md
Normal file
31
README.md
Normal file
|
@ -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
|
9
docker-entrypoint.sh
Executable file
9
docker-entrypoint.sh
Executable file
|
@ -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 "$@"
|
1
license.md
Normal file
1
license.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
View [license information](https://github.com/nextcloud/server/blob/master/COPYING-README) for the software contained in this image.
|
BIN
logo.png
Normal file
BIN
logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
Loading…
Reference in a new issue