Results 1 to 7 of 7

Thread: installing locals into Docker container running leap 42.3

  1. #1

    Default 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 #
    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 ?

    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



    How can I find the needed repo ?
    Thanks for your support already beforehand,
    Jaana

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,679
    Blog Entries
    14

    Default Re: installing locals into Docker container running leap 42.3

    Are you aware of the fact that you can run YaST in ncurses mode, i.e. in a terminal window/console ?
    Simply do
    Code:
    su -c yast
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,151
    Blog Entries
    2

    Default Re: installing locals into Docker container running leap 42.3

    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/do...ild-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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: installing locals into Docker container running leap 42.3

    Quote Originally Posted by tsu2 View Post
    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/do...ild-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 ??

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,866

    Default Re: installing locals into Docker container running leap 42.3

    zypper in packagename

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,151
    Blog Entries
    2

    Default Re: installing locals into Docker container running leap 42.3

    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/quest...nguage-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).
    Code:
    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Default Re: installing locals into Docker container running leap 42.3

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

    To get more locales, run
    Code:
    zypper in glibc-locale

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •