Merge pull request #2424 from appleboy/locale
chore(php-fpm): update the default locale setting.
This commit is contained in:
commit
fc5ab30d4f
@ -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`
|
||||
|
||||
|
||||
<br>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user