You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new -minimal images are lacking the en_US.utf8 locale in comparison to the system images.
This happens because in the -minimal images we are lacking the following step, which is instead being done in the base images that system images depend on.
Although -standard images are carrying all locales, I was expecting -minimal images to at least have the same amount of locales that we have in system images.
For reference:
$ docker run --rm -it ghcr.io/cloudnative-pg/postgresql:17-bookworm locale -a
C
C.utf8
en_US.utf8
POSIX
vs
$ docker run --rm -it ghcr.io/cloudnative-pg/postgresql:17-minimal-bookworm locale -a
C
C.utf8
POSIX
The text was updated successfully, but these errors were encountered:
The absence of the en_US.utf8 locale in the -minimal images is expected by design. The minimal images are built to be lightweight and do not include locales by default, whereas the -standard images explicitly install all locales (via the locales-all package), and the system images inherit locale setup from their base image. This is why you see en_US.utf8 in system and standard images, but not in minimal images reference.
If you want to add the en_US.utf8 locale to a -minimal image, you would need to modify the Dockerfile to install the necessary locale packages and generate the locale. For example, you could add the following steps to your Dockerfile after installing PostgreSQL:
This will install the locales package, enable the en_US.UTF-8 locale, and generate it, making it available in the image.
The current minimal image intentionally omits this step to keep the image size small reference. If you need the locale, you can extend the minimal image as shown above or use the standard image, which already includes all locales.
The new
-minimal
images are lacking theen_US.utf8
locale in comparison to thesystem
images.This happens because in the
-minimal
images we are lacking the following step, which is instead being done in the base images thatsystem
images depend on.Although
-standard
images are carrying all locales, I was expecting-minimal
images to at least have the same amount of locales that we have insystem
images.For reference:
vs
The text was updated successfully, but these errors were encountered: