Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
51ce7f3
Redis env vars added
marceljd Oct 26, 2018
7702887
redis.config.php added
marceljd Oct 26, 2018
750d456
Update to 13.0.7RC2
docker-library-bot Nov 3, 2018
4aac3c5
Revert "Update to 13.0.7RC2"
tilosp Nov 4, 2018
f2bf076
Update to 15.0.0beta1
docker-library-bot Nov 8, 2018
6d29de3
Run update.sh
tilosp Nov 12, 2018
e2e95f1
Update "gpg" invocations to use "--batch"
tilosp Nov 15, 2018
07c3617
Run update.sh
tilosp Nov 15, 2018
86f063a
Update to 14.0.4RC1
docker-library-bot Nov 15, 2018
4d333ba
Update to 15.0.0beta2
docker-library-bot Nov 15, 2018
3f3812a
Update to 13.0.8RC1
docker-library-bot Nov 15, 2018
1a4659a
Update to 12.0.13RC1
docker-library-bot Nov 15, 2018
2c0c9de
Simplify travis.yml updates
tilosp Nov 15, 2018
ad095d9
Run update.sh
tilosp Nov 15, 2018
a29fef4
Update php-redis to 4.2.0 and php-apcu to 5.1.13
J0WI Nov 19, 2018
44a2eba
Update to 13.0.8RC2
docker-library-bot Nov 20, 2018
028f1cb
Update to 14.0.4RC2
docker-library-bot Nov 20, 2018
bbac334
Update to 12.0.13RC2
docker-library-bot Nov 20, 2018
c3ab1f5
Use Alpine Linux in examples and use default user
J0WI Nov 15, 2018
1181a2c
Update APCu to version 5.1.14
tilosp Nov 21, 2018
9812323
Run update.sh
tilosp Nov 21, 2018
3a03d98
Update to 14.0.4
docker-library-bot Nov 22, 2018
3f7b7e6
Update to 15.0.0RC1
docker-library-bot Nov 22, 2018
1563eb3
Update to 13.0.8
docker-library-bot Nov 22, 2018
c7cdff7
Update to 12.0.13
docker-library-bot Nov 22, 2018
fa61be6
Run update.sh
tilosp Nov 24, 2018
8e6ed7c
Update release channels
tilosp Nov 25, 2018
cfbfc82
Update to 15.0.0RC2
docker-library-bot Nov 30, 2018
4146f42
Update to 12.0.13RC2
docker-library-bot Dec 1, 2018
9adb8ee
Revert "Update to 12.0.13RC2"
tilosp Dec 3, 2018
f328b38
12.0.x is end of life
tilosp Dec 4, 2018
e6d017c
Run update.sh
tilosp Dec 4, 2018
5abf148
Update to 15.0.0RC3
docker-library-bot Dec 6, 2018
9d33046
Update to 15.0.0
docker-library-bot Dec 10, 2018
5aa4bbc
Run update.sh
tilosp Dec 10, 2018
a5967ec
Update APCu to 5.1.15
J0WI Dec 10, 2018
389b55b
Fix typo in docker-entrypoint.sh
st3iny Dec 12, 2018
ad81191
Add imagick php extension
rcdailey Dec 11, 2018
07d24fd
Run update.sh
st3iny Dec 13, 2018
5b710c7
Add db command to docker-compose example in readme
st3iny Dec 13, 2018
e242661
Add Alpine variant to Dockerfile examples
J0WI Jan 5, 2019
b7ecc8e
Refactor install process and remove build deps
J0WI Jan 5, 2019
9a102d7
Update to 15.0.1RC1
docker-library-bot Jan 5, 2019
c16b61b
Update to 13.0.9RC1
docker-library-bot Jan 5, 2019
156c5de
Update to 14.0.5RC1
docker-library-bot Jan 5, 2019
38bbb37
Remove reference to line number
J0WI Jan 6, 2019
4b0fb0e
Run update.sh
tilosp Jan 6, 2019
c909b3f
Update to 15.0.1RC2
docker-library-bot Jan 9, 2019
763650c
Update to 13.0.9RC2
docker-library-bot Jan 9, 2019
c6d7492
Update to 14.0.5RC2
docker-library-bot Jan 9, 2019
88ed016
Redis memcache.distributed added
marceljd Jan 10, 2019
06ed302
Redis memcache.distributed added
marceljd Jan 10, 2019
e5ec600
Redis memcache.distributed added
marceljd Jan 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/redis.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

43 changes: 19 additions & 24 deletions .examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,43 @@ Example | Description
### full
The `full` Dockerfile example adds dependencies for all optional packages suggested by nextcloud that may be needed for some features (e.g. Video Preview Generation), as stated in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html).

NOTE: The Dockerfile does not install the LibreOffice package (line is commented), because it would increase the generated Image size by approximately 500 MB. In order to install it, simply uncomment the 13th line of the Dockerfile.
NOTE: The Dockerfile does not install the LibreOffice package (line is commented), because it would increase the generated Image size by approximately 500 MB. In order to install it, simply uncomment the appropriate line in the Dockerfile.

NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#previews)
NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#previews)

NOTE: Nextcloud recommends [disabling preview generation](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/harden_server.html?highlight=enabledpreviewproviders#disable-preview-image-generation) for high security deployments, as preview generation opens your nextcloud instance to new possible attack vectors.
NOTE: Nextcloud recommends [disabling preview generation](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/harden_server.html?highlight=enabledpreviewproviders#disable-preview-image-generation) for high security deployments, as preview generation opens your nextcloud instance to new possible attack vectors.

The required steps for each optional/recommended package that is not already in the Nextcloud image are listed here, so that the Dockerfile can easily be modified to only install the needed extra packages. Simply remove the steps for the unwanted packages from the Dockerfile.

#### PHP Module bz2
`docker-php-ext-install bz2`

#### PHP Module imagick
`apt install libmagickwand-dev`
`pecl install imagick`
`docker-php-ext-enable imagick`
`docker-php-ext-install bz2`

#### PHP Module imap
`apt install libc-client-dev libkrb5-dev`
`docker-php-ext-configure imap --with-kerberos --with-imap-ssl`
`docker-php-ext-install imap`
`apt install libc-client-dev libkrb5-dev`
`docker-php-ext-configure imap --with-kerberos --with-imap-ssl`
`docker-php-ext-install imap`

#### PHP Module gmp
`apt install libgmp3-dev`
`docker-php-ext-install gmp`
`apt install libgmp3-dev`
`docker-php-ext-install gmp`

#### PHP Module smbclient
`apt install smbclient libsmbclient-dev`
`pecl install smbclient`
`docker-php-ext-enable smbclient`
`apt install smbclient libsmbclient-dev`
`pecl install smbclient`
`docker-php-ext-enable smbclient`

#### ffmpeg
`apt install ffmpeg`
`apt install ffmpeg`

#### LibreOffice
`apt install libreoffice`
`apt install libreoffice`

#### CRON via supervisor
`apt install supervisor`
`mkdir /var/log/supervisord /var/run/supervisord`
The following Dockerfile commands are also necessary for a sucessfull cron installation:
`COPY supervisord.conf /etc/supervisor/supervisord.conf`
`CMD ["/usr/bin/supervisord"]`
`apt install supervisor`
`mkdir /var/log/supervisord /var/run/supervisord`
The following Dockerfile commands are also necessary for a sucessfull cron installation:
`COPY supervisord.conf /etc/supervisor/supervisord.conf`
`CMD ["/usr/bin/supervisord"]`



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

redis:
image: redis
image: redis:alpine
restart: always

app:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nextcloud:fpm
FROM nextcloud:fpm-alpine

COPY redis.config.php /usr/src/nextcloud/config/redis.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

redis:
image: redis
image: redis:alpine
restart: always

app:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

app:
image: nextcloud:fpm
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
db:
image: postgres
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: '3'

services:
db:
image: postgres
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
env_file:
- db.env

app:
image: nextcloud:fpm
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

app:
image: nextcloud:fpm
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

redis:
image: redis
image: redis:alpine
restart: always

app:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nextcloud:fpm
FROM nextcloud:fpm-alpine

COPY redis.config.php /usr/src/nextcloud/config/redis.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

redis:
image: redis
image: redis:alpine
restart: always

app:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- db.env

app:
image: nextcloud:fpm
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
db:
image: postgres
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: '3'

services:
db:
image: postgres
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
env_file:
- db.env

app:
image: nextcloud:fpm
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
Expand Down
10 changes: 10 additions & 0 deletions .examples/dockerfiles/cron/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nextcloud:fpm-alpine

RUN apk add --no-cache supervisor \
&& mkdir /var/log/supervisord /var/run/supervisord

COPY supervisord.conf /etc/supervisor/supervisord.conf

ENV NEXTCLOUD_UPDATE=1

CMD ["/usr/bin/supervisord"]
22 changes: 22 additions & 0 deletions .examples/dockerfiles/cron/fpm-alpine/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[supervisord]
nodaemon=true
logfile=/var/log/supervisord/supervisord.log
pidfile=/var/run/supervisord/supervisord.pid
childlogdir=/var/log/supervisord/
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error

[program:php-fpm]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php-fpm

[program:cron]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/cron.sh
63 changes: 49 additions & 14 deletions .examples/dockerfiles/full/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,58 @@
FROM nextcloud:apache

RUN mkdir -p /usr/share/man/man1 \
&& apt-get update && apt-get install -y \
supervisor \
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
ffmpeg \
libmagickwand-dev \
libgmp3-dev \
smbclient \
supervisor \
# libreoffice \
; \
rm -rf /var/lib/apt/lists/*

RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libbz2-dev \
libc-client-dev \
libgmp3-dev \
libkrb5-dev \
smbclient \
libsmbclient-dev \
# libreoffice \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h \
&& docker-php-ext-install bz2 gmp imap \
&& pecl install imagick smbclient \
&& docker-php-ext-enable imagick smbclient \
&& mkdir /var/log/supervisord /var/run/supervisord
; \
\
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h; \
docker-php-ext-install \
bz2 \
gmp \
imap \
; \
pecl install smbclient; \
docker-php-ext-enable smbclient; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p \
/usr/share/man/man1 \
/var/log/supervisord \
/var/run/supervisord \
;

COPY supervisord.conf /etc/supervisor/supervisord.conf

Expand Down
Loading