Reputation: 1769
So I'm setting up a docker image with Ubuntu and Postgresql in pt_BR and I'd like to know how can I change the default locale via command line without restarting the system - which is not possible in a Docker build :).
I managed to do it in Debian by changing setting LANG,LANGUAGE and LC_* variables in /etc/default/locale
, modifying /etc/locale.gen
and running dpkg-reconfigure
, as shown here. In Ubuntu it doesn't work.
Upvotes: 2
Views: 2540
Reputation: 1616
It should work with Ubuntu similarly.
A sample Dockerfile
FROM ubuntu
RUN apt-get install -y language-pack-pt-base
ENV LANG pt_BR.UTF-8
Running a container from that image, ls --help
will be presented in Portuguese.
Upvotes: 3