diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 7316beed..a26c480e 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1500,6 +1500,13 @@ To add locales to the container: 4 - Check enabled locales with `docker-compose exec php-fpm locale -a` +Update the locale setting, default is `POSIX` + +1 - Open the `.env` file and set `PHP_FPM_DEFAULT_LOCALE` to `en_US.UTF8` or other locale you want. + +2 - Re-build your PHP-FPM Container `docker-compose build php-fpm`. + +3 - Check the default locale with `docker-compose exec php-fpm locale`
diff --git a/docker-compose.yml b/docker-compose.yml index df1eae1e..3b53e54d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -216,6 +216,7 @@ services: - INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF} - PUID=${PHP_FPM_PUID} - PGID=${PHP_FPM_PGID} + - LOCALE=${PHP_FPM_DEFAULT_LOCALE} - http_proxy - https_proxy - no_proxy diff --git a/env-example b/env-example index 8c342651..20397fa6 100644 --- a/env-example +++ b/env-example @@ -208,6 +208,7 @@ PHP_FPM_INSTALL_SSHPASS=false PHP_FPM_INSTALL_MAILPARSE=false PHP_FPM_FFMPEG=false PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8" +PHP_FPM_DEFAULT_LOCALE=POSIX PHP_FPM_PUID=1000 PHP_FPM_PGID=1000 diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 9cd52f9b..57d13e9b 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -880,6 +880,10 @@ RUN if [ ${INSTALL_FAKETIME} = true ]; then \ echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \ ;fi +# Configure locale. +ARG LOCALE=POSIX +ENV LC_ALL ${LOCALE} + WORKDIR /var/www CMD ["php-fpm"]