encoding - Set locale in Docker container -


i use image:

registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift 

when run container default locale is:

lang= lc_ctype="posix" lc_numeric="posix" lc_time="posix" lc_collate="posix" lc_monetary="posix" lc_messages="posix" lc_paper="posix" lc_name="posix" lc_address="posix" lc_telephone="posix" lc_measurement="posix" lc_identification="posix" lc_all= 

i need change iso-8859-15 how have in dockerfile?

i first try @ runtime:

# localedef -c -i fr_fr -f iso-8859-15 fr_fr.iso-8859-15 # export lang="fr_fr.iso-8859-15" 

but when exit container , enter again it's posix.

update: tried:

from registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift:1.2-12 user root run localedef -c -i fr_fr -f iso-8859-15 fr_fr.iso-8859-15 run export lang="fr_fr.iso-8859-15" 

but when start container , perform locale again posix.

in dockerfile,

from registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift run custom-command_to_change_local.sh 

then, have build new image custom name.

docker build -t my_image . 

ok, so, should use environment , not export in dockerfile. solution work me.

from registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift:1.2-12  user root run localedef -c -i fr_fr -f iso-8859-15 fr_fr.iso-8859-15  env lang fr_fr.iso-8859-15 env language fr_fr:fr   env lc_all fr_fr.iso-8859-15  

i found solution article , adapt redhat os. http://jaredmarkell.com/docker-and-locales/


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -