Don’t worry the tag itself had no effect on the solution. A tag is like a bookmark for an image.
The solution is in the RUN block of my post. I used docker build -t postgres_de . to build the image, where -t is the tag. Though, you should use a tag more suited to your situation.
but ist postges_de a file with the content:
FROM postgres:9.4
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
ENV LANG de_DE.utf8
sudo docker run -ti --rm postgres_de locale
Password:
Unable to find image ‘postgres_de:latest’ locally
docker: Error response from daemon: pull access denied for postgres_de, repository does not exist or may require ‘docker login’.
See ‘docker run --help’
thanks I did the docker build like in your example that was ok but when I want to change the postgresql.conf to the correct parameter it does not start
LOG: invalid value for parameter “lc_messages”: “de_DE.utf8”
LOG: invalid value for parameter “lc_monetary”: “de_DE.utf8”
LOG: invalid value for parameter “lc_numeric”: “de_DE.utf8”
LOG: invalid value for parameter “lc_time”: “de_DE.utf8”
FATAL: configuration file “/var/lib/postgresql/data/postgresql.conf” contains errors
when setting the e settings in docker to LANG de_DE.utf8 the container stoped and I get this error:
initdb: invalid locale settings; check LANG and LC_* environment variables