Skip to content

Conversation

@lfittl
Copy link
Contributor

@lfittl lfittl commented Dec 7, 2023

The use of manually calling localdef caused any future update to the locales package to remove the manually installed locales, since locale-gen takes precendence. This would usually be encountered when a downstream Dockerfile added additional packages, and as a side effect caused an upgrade to the locales package.

Fix by relying on the /etc/locale.gen file, which is the official place to specify which locales should be installed.

Fixes #1112

The use of manually calling localdef caused any future update to the
locales package to remove the manually installed locales, since
locale-gen takes precendence. This would usually be encountered when
a downstream Dockerfile added additional packages, and as a side effect
caused an upgrade to the locales package.

Fix by relying on the /etc/locale.gen file, which is the official place
to specify which locales should be installed.

Fixes docker-library#1112
In case Debian changes the logic of how locale-gen works, this will flag
it early during the build process.
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 👍

@tianon tianon merged commit 018d576 into docker-library:master Dec 7, 2023
@lfittl
Copy link
Contributor Author

lfittl commented Dec 7, 2023

Thank you! 👍

Thanks for merging this! Happy to see this resolved :)

@lfittl lfittl deleted the use-locale-gen branch December 7, 2023 22:56
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 7, 2023
Changes:

- docker-library/postgres@018d576: Merge pull request docker-library/postgres#1159 from lfittl/use-locale-gen
- docker-library/postgres@a42b684: Debian packages: Add explicit check for locale-gen creating locales
- docker-library/postgres@55e45ba: Debian images: Use locale-gen instead of localdef
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 8, 2023
Changes:

- docker-library/postgres@ef9747f: Merge pull request docker-library/postgres#1160 from Earlopain/alpine3.19
- docker-library/postgres@25f6ba5: Add alpine 3.19
- docker-library/postgres@018d576: Merge pull request docker-library/postgres#1159 from lfittl/use-locale-gen
- docker-library/postgres@a42b684: Debian packages: Add explicit check for locale-gen creating locales
- docker-library/postgres@55e45ba: Debian images: Use locale-gen instead of localdef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postgres v13.11 initdb: error: invalid locale settings; check LANG and LC_* environment variables

2 participants