Problem with locales inside Ubuntu container image

I’m having a strange problem with locale in our development environment on Ubuntu and an Ubuntu container.
When I run locale -a locally and outside of a devShell (specifically I use devenv) I get:

C
C.utf8
en_US.utf8
POSIX

When I run it locally inside devenv or with nix develop --no-pure-eval --command locale -a , I get a long list with all the locales in ${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive.
So far so good.

However, when I run this command in a GitLab pipeline in a Ubuntu image nix develop --no-pure-eval --command locale -a I get the following:

C
en_US.utf8
POSIX

Does someone maybe know what else is required to make locale read the content of LOCALE_ARCHIVE?

I the meantime I found out that it is not only limited to the container but our servers have this problem as well.
Which is good and makes it easier to test, just doesn’t solve the problem :slight_smile:

It turns out it was caused by the LANGUAGE environment variable that I had set in the Ubuntu image.
The tests then couldn’t change the language anymore and therefore failed.
Removed the variable and everything works as it should now.
Might not have happened if we used the proper flakes checks but I would have to test that.