2

I use this image:

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

When I run my container I my 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 to change this to ISO-8859-15 How do I have to do this in my dockerfile?

I first try this at runtime:

# localedef -c -i fr_FR -f ISO-8859-15 fr_FR.ISO-8859-15 # export LANG="fr_FR.ISO-8859-15" 

But when I exit my container and enter it again it's back POSIX.

Update: I 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 I start my container and perform locale I get again POSIX.

1 Answer 1

1

In you Dockerfile,

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

Then, you have to build a new image with your custom name.

docker build -t my_image . 

Ok, so, you should use environment and not export in your Dockerfile. This solution work for 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 from this article and adapt to redhat OS. http://jaredmarkell.com/docker-and-locales/

Sign up to request clarification or add additional context in comments.

1 Comment

Check update. I'm not French (but we got some error where 'é' becomes a questionmark in some apps)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.