centos-ssh icon indicating copy to clipboard operation
centos-ssh copied to clipboard

Consider adding support for locale

Open jdeathe opened this issue 7 years ago • 3 comments

https://github.com/petems/docker-centos-7-ssh-locale/issues/1

jdeathe avatar Jul 28 '17 23:07 jdeathe

PHP's setlocale command relies upon the system locale and this effects functions such as strftime and localeconv

jdeathe avatar Sep 11 '17 20:09 jdeathe

Ref: https://access.redhat.com/solutions/974273

The defaultAcceptEnv settings have not been removed from sshd_config so the following error is seen when running the locale command after connecting over SSH:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

jdeathe avatar Sep 12 '17 07:09 jdeathe

Now that the time zone settings have been moved to SYSTEM_TIMEZONE and split out of the bootstrap script it would make sense to include this at the same startup level.

The default to no locale, which saves on image size, but add an environment variable like SYSTEM_LOCALES that could be populated with a list of required locales. e.g. en_US|en_GB|fr_FR to require US + GB English and French.

Add a system-locale script used to setup the system with a limited set of locales. Add a system-locale-wrapper script that to run via supervisord and returns the necessary details on first run with the --verbose parameter set.

jdeathe avatar Sep 15 '19 07:09 jdeathe