installing locals into Docker container running leap 42.3

Hei, I’m running leap 42.3 in my Docker container and I should change the character serts from the defaults to scandinavic and utf-8.
I’ve modified the files

/etc/sysconfig/language, /etc/bash.bashrc.local and

/etc/sysconfig/console files

but it seems that I need to install at least one language into my container:f5e3db0babfa:~/python # locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
f5e3db0babfa:~/python #

[size=2]How can I do it from command line ?? I’ve found some instructions for yast, but I don’t know how to use them from command line ?

I think I might need to add tools like localctl for that, but I don’t know how to do it. Does the following mean, that I don’t have the correct repos ?

[/size]f5e3db0babfa:~/python # zypper install localctl
Loading repository data…
Reading installed packages…
‘localctl’ not found in package names. Trying capabilities.
No provider of ‘localctl’ found.
Resolving package dependencies…

Nothing to do.
f5e3db0babfa:~/python # zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

| Alias | Name | Enabled | GPG Check | Refresh

–±----------------------------±----------------------------±--------±----------±-------
1 | NON OSS | NON OSS | Yes | (r ) Yes | Yes
2 | NON OSS Update | NON OSS Update | Yes | (r ) Yes | Yes
3 | OSS | OSS | Yes | (r ) Yes | Yes
4 | OSS Update | OSS Update | Yes | (r ) Yes | Yes
5 | packages-microsoft-com-prod | packages-microsoft-com-prod | Yes | (r ) Yes | No

[size=2]

[/size]
[size=2]How can I find the needed repo ?
Thanks for your support already beforehand,
Jaana
[/size]

Are you aware of the fact that you can run YaST in ncurses mode, i.e. in a terminal window/console ?
Simply do

su -c yast

When using docker,
The images you download (usually from Dockerhub) are intended only as base images.
To create custom functionality, you need to modify the image and to do so you create a Docker(note the capitalization) file which includes all the steps you require… which run the full range of running updates, adding repos, installing packages, configurations and more.

I adapted a standard docker documentation at the time to incorporate openSUSE standard practice in the following Wiki that can give you an introduction to creating a Docker file, from that I’d recommend you search for other Docker files which might be posted on the Internet that describe what works for them, and read the official docker documentation. The Docker file becomes an integral part of <your> creation, and any time you want to update or modify your openSUSE, you simply modify your existing Docker file.

https://en.opensuse.org/User:Tsu2/docker-build-tutorial-1

That should pretty much point you in the right direction (note that interactive tools like YaST are not appropriate tools),
If you still have questions about exactly what is needed and how to do it, I’d generally recommend you post in the Virtualization Forum… although technically docker isn’t virtualization, it has enough of similar features that’s where the discussions are. And, searching that Forum you’ll find other previous posts about docker.

HTH,
TSU

Thanks, but there was nothing new for me. The problem is that as far as I have understood the locales should come with the operating system leap 42.3, but I’ve nothing. I guess that also yast should come with leap 42.3 I got it neither. So how to install them ??

zypper in packagename

Skimming through documentation,
It seems that for both SUSE and openSUSE there is no documentation describing how to set locales except by using YaST.

There is an old (2008) linuxquestions.org thread which describes how it might once have worked, but I quickly found that the command “locale-gen” no longer exists or is used… But you might still find it useful to understand general structure and file locations which still are mostly relevant.
https://www.linuxquestions.org/questions/linux-desktop-74/opensuse-can-you-add-users-with-different-language-647687/

The current guide to the commands used to query, display and set new locales can be found in the locale MAN pages… and the default ends with an example installing a new language for a particular user (not system-wide).

man locale

I didn’t go through the other recommended man pages which provide further information…

Bottom line is that these commands should be inserted in your Docker file.

HTH,
TSU

The base container only support “POSIX”/“C”/“C.UTF-8” by design, to save space.

To get more locales, run

zypper in glibc-locale