Bug 1123888 - docker has no repos if host is registred with RH satellite (rhn_register)
Summary: docker has no repos if host is registred with RH satellite (rhn_register)
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Václav Pavlín
QA Contact: atomic-bugs@redhat.com
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-28 14:43 UTC by Christophe Augello
Modified: 2019-03-06 02:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-01-07 21:34:53 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2977921 None None None 2017-03-22 17:03:00 UTC

Description Christophe Augello 2014-07-28 14:43:19 UTC
Description of problem:

Redhat rhel container doesn't have repos when the host is registered with rh satellite.(5.6) 

Version-Release number of selected component (if applicable):

How reproducible:
Register a RHEL 7 system into a RH Satellite server 5.6.
Install docker and docker-registery package. 

Steps to Reproduce:
1. docker pull rhel
2. docker run -i -t rhel
3. Once in shell of the container : yum repolist

Actual results:

There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>

Expected results:

The same parent and child channels as the host has access to (in the case) :


Additional info:

Same steps with a stand alone system with subscription-manager, has the expected behaviour == Access to the same repos as the host.

As RedHat satellite (5.6) registered system, doesn't use .repo files. The /usr/share/rhel/secrets/rhel7.repo , points to a empty file. see BZ #1109855

Comment 3 Daniel Walsh 2014-09-12 19:17:14 UTC
Could you check this with docker-1.1.2 and if that is broken docker-1.2.

I think it is fixed in docker-1.1.2

Comment 4 garret.taylor 2014-09-16 11:28:59 UTC
Is there a workaround while waiting for fix to ship ?

Comment 5 Daniel Walsh 2014-09-16 11:52:13 UTC
Not right now, but we are hoping to ship docker-1.1.2 real soon.

Although the tool is looking for content in 

ls -l /usr/share/rhel/secrets/

If you create dummy files for these links it might fix the problem

touch /etc/pki/entitlement/foo-key.pem /etc/pki/entitlement/foo.pem /etc/yum.repos.d/redhat.repo

Comment 6 garret.taylor 2014-09-16 15:12:35 UTC
Docker verison 0.11.1-dev, build 02d20af/0.11.1

Host has following repos enabled:

created the 3 dummy files on the host.

Seeing same results in rhel 7 container.

# yum repolist all
repolist: 0
# yum check-update
There are no enables repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>

Comment 7 Daniel Walsh 2014-09-17 17:57:15 UTC
Sorry misread the bug, I thought you were on a machine which was not registered.

If you run 

# docker run -ti rhel7 ls -l /run/secrets

Does it show anything?

Comment 8 garret.taylor 2014-09-18 06:31:01 UTC
[root@rhel7d1 ~]# docker run -ti rhel7 ls -l /run/secrets
total 0
drwxr-xr-x. 2 root root 80 Sep 18 02:29 etc-pki-entitlement
-rwxr-xr-x. 1 root root  0 Sep 18 02:29 rhel7.repo
[root@rhel7d1 ~]#

Comment 9 garret.taylor 2014-09-19 11:23:06 UTC
Still seeing the same problem with docker-1.1.2

Host is using Red Hat Satellite and subscribed to:

Tried with and without:  

# docker -v
Docker version 1.1.2, build d84a070/1.1.2

Comment 10 Daniel Walsh 2014-09-19 20:43:25 UTC
Martin/Aaron, have any ideas?

Comment 12 Aaron Weitekamp 2014-09-23 13:51:30 UTC
Access to Red Hat RPM content from a container using an RHN classic entitlement is not technically supported at this time. For now only a host subscribed with certificate-based subscription-manager will provide access to RPM content in a container (build or run time). This requires a connection to Red Hat hosted or a Satellite 6 system.

Comment 13 garret.taylor 2014-10-06 08:01:32 UTC
Hi - I've the latest Satellite and used
# rhnreg_ks --force

Does comment # 12 mean it should work but the hosts needs to be registered in a different way and how do I do that ?

Note You need to log in before you can comment on or make changes to this bug.