I’m trying to install packages with yum in a Docker 18.09.3 container but it does not work.
According to RedHat (https://access.redhat.com/solutions/1443553) the host entitlements should be available to the container:
Entitlement information from the host is injected into the container when the first yum command in the container is run.
However, running yum within the container produces this error:
$ docker run --rm -it registry.access.redhat.com/rhel7-init /bin/bash
[root@1ac152f69ab4 /]# yum repolist all
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.
The host (RHEL 7.5) has a valid subscription and enabled repositories.
All the redhat images I’ve tried yield the same error. Also other yum commands.
Has anyone an idea where could be the problem?