s2i-php-container icon indicating copy to clipboard operation
s2i-php-container copied to clipboard

Allow different locales

Open ibotty opened this issue 4 years ago • 2 comments

ATM I have to modify the builder image to allow other locales:

FROM centos/php-73-centos7                                                                                                                                               
                                                                                                                                                                         
USER 0                                                                                                                                                                   
RUN sed -i '/override_install_langs/s/=.*/=en_US.utf8,en_GB.utf8,de_DE.utf8,fr_FR.utf8,es_ES.utf8,es_MX.utf8/' /etc/yum.conf \                                           
 && yum upgrade -y glibc-common \                                                                                                                                        
 && yum reinstall -y glibc-common \                                                                                                                                      
 && yum clean all                                                                                                                                                        
                                                                                                                                                                         
USER 1001                                                                                                                                                                

It would be great to allow specifying locales to build in the repository that gets built, say in .s2i/.

ibotty avatar Nov 10 '20 11:11 ibotty

Maybe LOCPATH can be used, but it's not very nice to use.

ibotty avatar Nov 10 '20 11:11 ibotty

Just a note, for the ubi9-image, you can use

FROM registry.access.redhat.com/ubi9/php-80:latest

USER 0
RUN for locale in de_DE fr_FR es_ES es_MX; do \
  localedef -i "$locale" -f UTF-8 "$locale".utf8; done

USER 1001

ibotty avatar Jun 09 '22 13:06 ibotty