From: Brad Dutton Date: Sat, 2 May 2020 17:04:29 +0000 (-0700) Subject: add support for locales in the Debian images X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b2a28507877b29637afd9ae1261f398f5a396dc2;p=roundcube-roundcubemail-docker.git add support for locales in the Debian images --- diff --git a/apache/Dockerfile b/apache/Dockerfile index 6e2305b..2f8883b 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -59,7 +59,7 @@ ENV ROUNDCUBEMAIL_VERSION 1.4.4 # Download package and extract to web volume RUN set -ex; \ - fetchDeps="gnupg dirmngr"; \ + fetchDeps="gnupg dirmngr locales libc-l10n"; \ apt-get -qq update; \ apt-get install -y --no-install-recommends $fetchDeps; \ curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \ diff --git a/apache/docker-entrypoint.sh b/apache/docker-entrypoint.sh index 733453e..dd0fafe 100755 --- a/apache/docker-entrypoint.sh +++ b/apache/docker-entrypoint.sh @@ -104,6 +104,11 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then echo "upload_max_filesize=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini echo "post_max_size=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini fi + + if [ ! -z "${ROUNDCUBEMAIL_LOCALE}" ]; then + echo "${ROUNDCUBEMAIL_LOCALE}" > /etc/locale.gen + /usr/sbin/locale-gen + fi fi exec "$@" diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 12fe785..81f436e 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -57,7 +57,7 @@ ENV ROUNDCUBEMAIL_VERSION 1.4.4 # Download package and extract to web volume RUN set -ex; \ - fetchDeps="gnupg dirmngr"; \ + fetchDeps="gnupg dirmngr locales libc-l10n"; \ apt-get -qq update; \ apt-get install -y --no-install-recommends $fetchDeps; \ curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \ diff --git a/fpm/docker-entrypoint.sh b/fpm/docker-entrypoint.sh index 733453e..dd0fafe 100755 --- a/fpm/docker-entrypoint.sh +++ b/fpm/docker-entrypoint.sh @@ -104,6 +104,11 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then echo "upload_max_filesize=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini echo "post_max_size=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini fi + + if [ ! -z "${ROUNDCUBEMAIL_LOCALE}" ]; then + echo "${ROUNDCUBEMAIL_LOCALE}" > /etc/locale.gen + /usr/sbin/locale-gen + fi fi exec "$@"