diff --git a/Dockerfile b/Dockerfile index 8484b99..207ae47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,36 @@ -FROM robbertkl/roundcube +FROM luzifer/alpine-nginx-php -COPY config.inc.php config/ +ENV ROUNDCUBE_VERSION=1.3.7 \ + RCMCARDDAV_VERSION=3.0.2 + +RUN set -ex \ + && apk --no-cache add \ + gnupg \ + php7-curl \ + php7-dom \ + php7-exif \ + php7-fileinfo \ + php7-iconv \ + php7-imagick \ + php7-intl \ + php7-json \ + php7-ldap \ + php7-mbstring \ + php7-mysqli \ + php7-openssl \ + php7-pdo \ + php7-pdo_mysql \ + php7-pdo_sqlite \ + php7-session \ + php7-sockets \ + php7-sqlite3 \ + php7-zip \ + && curl -sSfL "https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBE_VERSION}/roundcubemail-${ROUNDCUBE_VERSION}-complete.tar.gz" | \ + tar -xz --strip-components=1 -C /var/www \ + && curl -sSfL "https://github.com/blind-coder/rcmcarddav/releases/download/v${RCMCARDDAV_VERSION}/carddav-${RCMCARDDAV_VERSION}.tar.bz2" | \ + tar -xj -C /var/www/plugins \ + && cp /var/www/plugins/carddav/config.inc.php.dist /var/www/plugins/carddav/config.inc.php + +COPY rootfs / + +VOLUME ["/var/www/db"] diff --git a/rootfs/etc/cont-init.d/99-roundcube b/rootfs/etc/cont-init.d/99-roundcube new file mode 100644 index 0000000..0007255 --- /dev/null +++ b/rootfs/etc/cont-init.d/99-roundcube @@ -0,0 +1,8 @@ +#!/bin/bash + +cd /var/www + +for subdir in db db/enigma logs temp; do + mkdir -p "${subdir}" + chown nobody: "${subdir}" +done diff --git a/config.inc.php b/rootfs/var/www/config/config.inc.php similarity index 93% rename from config.inc.php rename to rootfs/var/www/config/config.inc.php index 7d0eadb..09727e4 100644 --- a/config.inc.php +++ b/rootfs/var/www/config/config.inc.php @@ -24,5 +24,5 @@ $config['smtp_pass'] = '%p'; $config['enigma_pgp_homedir'] = '/var/www/db/enigma'; -$config['plugins'] = array('enigma'); +$config['plugins'] = array('carddav', 'enigma'); if(getenv('ROUNDCUBE_USER_FILE')) $config['plugins'][] = 'password'; diff --git a/rootfs/var/www/plugins/password/config.inc.php b/rootfs/var/www/plugins/password/config.inc.php new file mode 100644 index 0000000..20f64ad --- /dev/null +++ b/rootfs/var/www/plugins/password/config.inc.php @@ -0,0 +1,3 @@ +