3

Please tell me if RedHat provides a repo with the ksh RPM for their Universal Base Image version 8 (ubi8). The UBI images are great because they are pre-configured to fetch RPMs from many repos but don't require a RedHat network subscription.

I get a strange match on ksh in ubi7 -- it comes back with bash:

% docker run -it registry.access.redhat.com/ubi7:latest yum search ksh
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

ubi-7                                                                                                                                     | 3.8 kB  00:00:00     
ubi-7-rhah                                                                                                                                | 3.7 kB  00:00:00     
ubi-7-server-extras-rpms                                                                                                                  | 3.7 kB  00:00:00     
ubi-7-server-optional-rpms                                                                                                                | 3.8 kB  00:00:00     
ubi-server-rhscl-7-rpms                                                                                                                   | 3.8 kB  00:00:00     
(1/15): ubi-7/x86_64/updateinfo                                                                                                           |   92 B  00:00:00     
(2/15): ubi-7/x86_64/group                                                                                                                |  124 B  00:00:00     
(3/15): ubi-7/x86_64/primary_db                                                                                                           | 800 kB  00:00:00     
(4/15): ubi-7-rhah/x86_64/updateinfo                                                                                                      |   92 B  00:00:00     
(5/15): ubi-7-rhah/x86_64/primary_db                                                                                                      | 2.5 kB  00:00:00     
(6/15): ubi-7-rhah/x86_64/group                                                                                                           |  124 B  00:00:00     
(7/15): ubi-7-server-extras-rpms/x86_64/updateinfo                                                                                        |   92 B  00:00:00     
(8/15): ubi-7-server-extras-rpms/x86_64/primary_db                                                                                        | 6.8 kB  00:00:00     
(9/15): ubi-7-server-extras-rpms/x86_64/group                                                                                             |  124 B  00:00:00     
(10/15): ubi-7-server-optional-rpms/x86_64/group                                                                                          |  124 B  00:00:00     
(11/15): ubi-7-server-optional-rpms/x86_64/primary_db                                                                                     |  14 kB  00:00:00     
(12/15): ubi-7-server-optional-rpms/x86_64/updateinfo                                                                                     |   92 B  00:00:00     
(13/15): ubi-server-rhscl-7-rpms/x86_64/group                                                                                             |  124 B  00:00:00     
(14/15): ubi-server-rhscl-7-rpms/x86_64/updateinfo                                                                                        |   92 B  00:00:00     
(15/15): ubi-server-rhscl-7-rpms/x86_64/primary_db                                                                                        | 396 kB  00:00:00     
========================================================================= Matched: ksh ==========================================================================
bash.x86_64 : The GNU Bourne Again shell

Here's the no-match situation in ubi8:

% docker run -it registry.access.redhat.com/ubi8:latest yum search ksh
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                                                   4.3 MB/s | 786 kB     00:00    
Red Hat Universal Base Image 8 (RPMs) - AppStream                                                                                 11 MB/s | 2.4 MB     00:00    
Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                                                        127 kB/s |  15 kB     00:00    
No matches found.

I'm ok with adding additional repositories during the docker build. I already add the Fedora EPEL repository (installed via https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm) but ksh is not in there either.

From searching the interwebs I find file ksh-20120801-34.el7.x86_64.rpm at various sites, but I don't want to create a "frankenstein" system by mixing and matching Centos with RedHat RPMs. And I'd really like to get this from an official source.

This feels like a silly noob question, such a basic tool as a linux shell is somehow difficult to find & install. Is there a chance that RedHat simply does not provide ksh for UBI at all?

7
  • Is adding the copr repo an option? You'd at least get something newer than what you found. Commented Jun 18, 2021 at 4:12
  • 1
    UBI editions are subsets of RHEL. As far as I am aware, ksh is not included in those subsets.
    – fpmurphy
    Commented Jun 18, 2021 at 4:44
  • I guess "Redhat CentOS 7" packages are more official than most 3rd party repo´s. Latest is ksh-20120801-142.el7.x86_64.rpm : 2020-04-03 mirror.centos.org/centos/7.9.2009/os/x86_64/Packages . Please note the minor version = 142. Commented Jun 18, 2021 at 5:03
  • What's the copr repo? And thanks @KnudLarsen but I don't want to add CentOS RPMs to a (pure?) RedHat system. Commented Jun 18, 2021 at 11:53
  • access.redhat.com/documentation/en-us/red_hat_enterprise_linux/… says "If you are running a UBI container on a registered and subscribed RHEL host, the main RHEL Server repository is enabled inside the standard UBI container, along with all the UBI repositories. So the full set of Red Hat packages is available. " - is that an option?
    – Jeff Schaller
    Commented Jun 18, 2021 at 12:32

1 Answer 1

-1

I would suggest using the note from 6.1 Adding software to a running UBI container:

If you are running a UBI container on a registered and subscribed RHEL host, the main RHEL Server repository is enabled inside the standard UBI container, along with all the UBI repositories. So the full set of Red Hat packages is available. From the UBI minimal container, all UBI repositories are enabled by default, but no repositories are enabled from the host by default.

... and use the host's RHEL repository, which does have ksh available.

6
  • Jeff I checked and my UBI8 container is running on a registered & subscribed RHEL 7.4 system. The host can see ksh in a repo, but the guest container cannot. Probably the versions have to match exactly? Commented Jun 18, 2021 at 15:13
  • I don't have a similar setup at-hand, but I suspect you're correct in that they expect the host to be at RHEL8 as well.
    – Jeff Schaller
    Commented Jun 18, 2021 at 15:20
  • I remain baffled how the dnf config files and dnf process in the UBI container can benefit from config files etc. on the host system. Isn't isolation the purpose of a container? Commented Jun 24, 2021 at 12:01
  • The Red Hat statement sounds to me like the main host's repo information is copied into the container, but disabled by default.
    – Jeff Schaller
    Commented Jun 24, 2021 at 12:06
  • This link leads to a Red Hat login page.
    – neirbowj
    Commented Jul 20, 2023 at 23:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .