From 6a54981de4b6d6f9d74b86ecebc8bfe969d92098 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Wed, 12 Jul 2017 14:08:50 +0200 Subject: [PATCH] Add examples for both cases apache and fpm --- .examples/dockerfiles/cron/apache/Dockerfile | 13 +++++++++++ .../dockerfiles/cron/apache/supervisord.conf | 22 +++++++++++++++++++ .examples/dockerfiles/imap/fpm/Dockerfile | 7 ++++++ .examples/dockerfiles/smb/fpm/Dockerfile | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 .examples/dockerfiles/cron/apache/Dockerfile create mode 100644 .examples/dockerfiles/cron/apache/supervisord.conf create mode 100644 .examples/dockerfiles/imap/fpm/Dockerfile create mode 100644 .examples/dockerfiles/smb/fpm/Dockerfile diff --git a/.examples/dockerfiles/cron/apache/Dockerfile b/.examples/dockerfiles/cron/apache/Dockerfile new file mode 100644 index 0000000..dd4939a --- /dev/null +++ b/.examples/dockerfiles/cron/apache/Dockerfile @@ -0,0 +1,13 @@ +FROM nextcloud:apache + +RUN apt-get update && apt-get install -y \ + supervisor \ + cron \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir /var/log/supervisord /var/run/supervisord && \ + echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - + +COPY supervisord.conf /etc/supervisor/supervisord.conf + +CMD ["/usr/bin/supervisord"] diff --git a/.examples/dockerfiles/cron/apache/supervisord.conf b/.examples/dockerfiles/cron/apache/supervisord.conf new file mode 100644 index 0000000..25ae32f --- /dev/null +++ b/.examples/dockerfiles/cron/apache/supervisord.conf @@ -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:apache2] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apache2-foreground + +[program:cron] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=cron -f diff --git a/.examples/dockerfiles/imap/fpm/Dockerfile b/.examples/dockerfiles/imap/fpm/Dockerfile new file mode 100644 index 0000000..b403de6 --- /dev/null +++ b/.examples/dockerfiles/imap/fpm/Dockerfile @@ -0,0 +1,7 @@ +FROM nextcloud:fpm + +RUN apt-get update \ + && apt-get install -y libc-client-dev libkrb5-dev \ + && rm -rf /var/lib/apt/lists/* \ + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ + && docker-php-ext-install imap diff --git a/.examples/dockerfiles/smb/fpm/Dockerfile b/.examples/dockerfiles/smb/fpm/Dockerfile new file mode 100644 index 0000000..4c99b86 --- /dev/null +++ b/.examples/dockerfiles/smb/fpm/Dockerfile @@ -0,0 +1,3 @@ +FROM nextcloud:fpm + +RUN apt-get update && apt-get install -y smbclient && rm -rf /var/lib/apt/lists/*