`ROUNDCUBEMAIL_PLUGINS` - List of built-in plugins to activate. Defaults to `archive,zipdownload`
-`ROUNDCUBEMAIL_INSTALL_PLUGINS` - Set to `1` or `true` to enable installation of plugins on startup
+`ROUNDCUBEMAIL_COMPOSER_PLUGINS` - The list of composer packages to install on startup. Use `ROUNDCUBEMAIL_PLUGINS` to enable them.
`ROUNDCUBEMAIL_SKIN` - Configures the default theme. Defaults to `elastic`
some directories that could be mounted as volume or bind mount to share data between containers
or to inject additional data into the container:
-* `/var/www/html`: Roundcube installation directory
+* `/var/www/html`: Roundcube installation directory
This is the document root of Roundcube. Plugins and additional skins are stored here amongst the Roundcube sources.
Share this directory when using the FPM variant and let a webserver container serve the static files from here.
* `/var/roundcube/config`: Location for additional config files
See the [Advanced configuration](#advanced-configuration) section for details.
-* `/var/roundcube/db`: storage location of the SQLite database
+* `/var/roundcube/db`: storage location of the SQLite database
Only needed if using `ROUNDCUBEMAIL_DB_TYPE=sqlite` to persist the Roundcube database.
-* `/tmp/roundcube-temp`: Roundcube's temp folder
+* `/tmp/roundcube-temp`: Roundcube's temp folder
Temp files like uploaded attachments or thumbnail images are stored here.
Share this directory via a volume when running multiple replicas of the roundcube container.
## Installing Roundcube Plugins
With the latest updates, the Roundcube image is now able to install plugins.
-You need to use `ROUNDCUBEMAIL_INSTALL_PLUGINS=1` in the env variables.
+You need to fill `ROUNDCUBEMAIL_COMPOSER_PLUGINS` with the list of composer packages to install.
+And set them in `ROUNDCUBEMAIL_PLUGINS` in order to enable the installed plugins.
+
+For example:
+
+```yaml
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS: "weird-birds/thunderbird_labels,jfcherng-roundcube/show-folder-size,germancoding/tls_icon:^1.2"
+ ROUNDCUBEMAIL_PLUGINS: thunderbird_labels, show_folder_size, tls_icon
+```
## Examples
# PWD=`pwd`
if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
+ INSTALLDIR=`pwd`
# docroot is empty
if ! [ -e index.php -a -e bin/installto.sh ]; then
echo >&2 "roundcubemail not found in $PWD - copying now..."
( set -x; ls -A; sleep 10 )
fi
tar cf - --one-file-system -C /usr/src/roundcubemail . | tar xf -
- echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $PWD"
+ echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $INSTALLDIR"
# update Roundcube in docroot
else
- INSTALLDIR=`pwd`
echo >&2 "roundcubemail found in $INSTALLDIR - installing update..."
(cd /usr/src/roundcubemail && bin/installto.sh -y $INSTALLDIR)
- composer update --no-dev
+ # Re-install composer modules (including plugins)
+ composer \
+ --working-dir=${INSTALLDIR} \
+ --prefer-dist \
+ --no-dev \
+ --no-interaction \
+ --optimize-autoloader \
+ install
fi
if [ -f /run/secrets/roundcube_db_user ]; then
: "${ROUNDCUBEMAIL_SKIN:=elastic}"
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
: "${ROUNDCUBEMAIL_REQUEST_PATH:=/}"
+ : "${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER:=$INSTALLDIR}"
- if [ ! -z "${ROUNDCUBEMAIL_INSTALL_PLUGINS}" ]; then
+ if [ ! -z "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" ]; then
echo "Installing plugins from the list"
- echo "Plugins: ${ROUNDCUBEMAIL_PLUGINS}"
+ echo "Plugins: ${ROUNDCUBEMAIL_COMPOSER_PLUGINS}"
# Change ',' into a space
- ROUNDCUBEMAIL_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_PLUGINS}" | tr ',' ' '`
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" | tr ',' ' '`
composer \
- --working-dir=/usr/src/roundcubemail/ \
+ --working-dir=${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER} \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--optimize-autoloader \
require \
-- \
- ${ROUNDCUBEMAIL_PLUGINS_SH};
+ ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi
if [ ! -e config/config.inc.php ]; then
--- /dev/null
+version: '3'
+
+services:
+ roundcubemail:
+ image: roundcube/roundcubemail:latest
+ container_name: roundcubemail
+# restart: unless-stopped
+ volumes:
+ - ./www:/var/www/html
+ - ./db/sqlite:/var/roundcube/db
+ ports:
+ - 9002:80
+ environment:
+ ROUNDCUBEMAIL_DB_TYPE: sqlite
+ ROUNDCUBEMAIL_SKIN: elastic
+ ROUNDCUBEMAIL_DEFAULT_HOST: tls://mail.example.org
+ ROUNDCUBEMAIL_SMTP_SERVER: tls://mail.example.org
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS: "weird-birds/thunderbird_labels,jfcherng-roundcube/show-folder-size,germancoding/tls_icon:^1.2"
+ ROUNDCUBEMAIL_PLUGINS: thunderbird_labels, show_folder_size, tls_icon
+
+### Optional: add a full mail server stack to use with Roundcube like https://hub.docker.com/r/tvial/docker-mailserver
+# mailserver:
+# image: tvial/docker-mailserver:latest
+# hostname: mail.example.org
+# ... # for more options see https://github.com/tomav/docker-mailserver#examples
# PWD=`pwd`
if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
+ INSTALLDIR=`pwd`
# docroot is empty
if ! [ -e index.php -a -e bin/installto.sh ]; then
echo >&2 "roundcubemail not found in $PWD - copying now..."
( set -x; ls -A; sleep 10 )
fi
tar cf - --one-file-system -C /usr/src/roundcubemail . | tar xf -
- echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $PWD"
+ echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $INSTALLDIR"
# update Roundcube in docroot
else
- INSTALLDIR=`pwd`
echo >&2 "roundcubemail found in $INSTALLDIR - installing update..."
(cd /usr/src/roundcubemail && bin/installto.sh -y $INSTALLDIR)
- composer update --no-dev
+ # Re-install composer modules (including plugins)
+ composer \
+ --working-dir=${INSTALLDIR} \
+ --prefer-dist \
+ --no-dev \
+ --no-interaction \
+ --optimize-autoloader \
+ install
fi
if [ -f /run/secrets/roundcube_db_user ]; then
: "${ROUNDCUBEMAIL_SKIN:=elastic}"
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
: "${ROUNDCUBEMAIL_REQUEST_PATH:=/}"
+ : "${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER:=$INSTALLDIR}"
- if [ ! -z "${ROUNDCUBEMAIL_INSTALL_PLUGINS}" ]; then
+ if [ ! -z "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" ]; then
echo "Installing plugins from the list"
- echo "Plugins: ${ROUNDCUBEMAIL_PLUGINS}"
+ echo "Plugins: ${ROUNDCUBEMAIL_COMPOSER_PLUGINS}"
# Change ',' into a space
- ROUNDCUBEMAIL_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_PLUGINS}" | tr ',' ' '`
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" | tr ',' ' '`
composer \
- --working-dir=/usr/src/roundcubemail/ \
+ --working-dir=${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER} \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--optimize-autoloader \
require \
-- \
- ${ROUNDCUBEMAIL_PLUGINS_SH};
+ ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi
if [ ! -e config/config.inc.php ]; then
# PWD=`pwd`
if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
+ INSTALLDIR=`pwd`
# docroot is empty
if ! [ -e index.php -a -e bin/installto.sh ]; then
echo >&2 "roundcubemail not found in $PWD - copying now..."
( set -x; ls -A; sleep 10 )
fi
tar cf - --one-file-system -C /usr/src/roundcubemail . | tar xf -
- echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $PWD"
+ echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $INSTALLDIR"
# update Roundcube in docroot
else
- INSTALLDIR=`pwd`
echo >&2 "roundcubemail found in $INSTALLDIR - installing update..."
(cd /usr/src/roundcubemail && bin/installto.sh -y $INSTALLDIR)
- composer update --no-dev
+ # Re-install composer modules (including plugins)
+ composer \
+ --working-dir=${INSTALLDIR} \
+ --prefer-dist \
+ --no-dev \
+ --no-interaction \
+ --optimize-autoloader \
+ install
fi
if [ -f /run/secrets/roundcube_db_user ]; then
: "${ROUNDCUBEMAIL_SKIN:=elastic}"
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
: "${ROUNDCUBEMAIL_REQUEST_PATH:=/}"
+ : "${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER:=$INSTALLDIR}"
- if [ ! -z "${ROUNDCUBEMAIL_INSTALL_PLUGINS}" ]; then
+ if [ ! -z "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" ]; then
echo "Installing plugins from the list"
- echo "Plugins: ${ROUNDCUBEMAIL_PLUGINS}"
+ echo "Plugins: ${ROUNDCUBEMAIL_COMPOSER_PLUGINS}"
# Change ',' into a space
- ROUNDCUBEMAIL_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_PLUGINS}" | tr ',' ' '`
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" | tr ',' ' '`
composer \
- --working-dir=/usr/src/roundcubemail/ \
+ --working-dir=${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER} \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--optimize-autoloader \
require \
-- \
- ${ROUNDCUBEMAIL_PLUGINS_SH};
+ ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi
if [ ! -e config/config.inc.php ]; then
# PWD=`pwd`
if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
+ INSTALLDIR=`pwd`
# docroot is empty
if ! [ -e index.php -a -e bin/installto.sh ]; then
echo >&2 "roundcubemail not found in $PWD - copying now..."
( set -x; ls -A; sleep 10 )
fi
tar cf - --one-file-system -C /usr/src/roundcubemail . | tar xf -
- echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $PWD"
+ echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $INSTALLDIR"
# update Roundcube in docroot
else
- INSTALLDIR=`pwd`
echo >&2 "roundcubemail found in $INSTALLDIR - installing update..."
(cd /usr/src/roundcubemail && bin/installto.sh -y $INSTALLDIR)
- composer update --no-dev
+ # Re-install composer modules (including plugins)
+ composer \
+ --working-dir=${INSTALLDIR} \
+ --prefer-dist \
+ --no-dev \
+ --no-interaction \
+ --optimize-autoloader \
+ install
fi
if [ -f /run/secrets/roundcube_db_user ]; then
: "${ROUNDCUBEMAIL_SKIN:=elastic}"
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
: "${ROUNDCUBEMAIL_REQUEST_PATH:=/}"
+ : "${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER:=$INSTALLDIR}"
- if [ ! -z "${ROUNDCUBEMAIL_INSTALL_PLUGINS}" ]; then
+ if [ ! -z "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" ]; then
echo "Installing plugins from the list"
- echo "Plugins: ${ROUNDCUBEMAIL_PLUGINS}"
+ echo "Plugins: ${ROUNDCUBEMAIL_COMPOSER_PLUGINS}"
# Change ',' into a space
- ROUNDCUBEMAIL_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_PLUGINS}" | tr ',' ' '`
+ ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH=`echo "${ROUNDCUBEMAIL_COMPOSER_PLUGINS}" | tr ',' ' '`
composer \
- --working-dir=/usr/src/roundcubemail/ \
+ --working-dir=${ROUNDCUBEMAIL_COMPOSER_PLUGINS_FOLDER} \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--optimize-autoloader \
require \
-- \
- ${ROUNDCUBEMAIL_PLUGINS_SH};
+ ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi
if [ ! -e config/config.inc.php ]; then