In redhat, if you need build container from base image, for example, registry.access.redhat.com/rhel7/rhel:7.3-53
(free download from https://access.redhat.com/containers) You have to build this image on a red hat server with subscription managed registered.
Here is the way to bypass the check and you can build docker image on any redhat 7 server.
yum install rh-amazon-rhui-client
$ rpm -ql rh-amazon-rhui-client
/etc/init.d/choose_repo
/etc/init.d/rh-cloud-firstboot
/etc/pki/rhui/cdn.redhat.com-chain.crt
/etc/pki/rhui/content-rhel7.key
/etc/pki/rhui/product/content-rhel7.crt
/etc/pki/rhui/product/rhui-client-config-server-7.crt
/etc/pki/rhui/rhui-client-config-server-7.key
/etc/yum.repos.d/redhat-rhui-client-config.repo
/etc/yum.repos.d/redhat-rhui.repo
/etc/yum.repos.d/rhui-load-balancers.conf
/etc/yum/pluginconf.d/amazon-id.conf
/etc/yum/pluginconf.d/rhui-lb.conf
/usr/lib/yum-plugins/amazon-id.py
/usr/lib/yum-plugins/amazon-id.pyc
/usr/lib/yum-plugins/amazon-id.pyo
/usr/lib/yum-plugins/rhui-lb.py
/usr/lib/yum-plugins/rhui-lb.pyc
/usr/lib/yum-plugins/rhui-lb.pyo
/usr/sbin/choose_repo.py
/usr/sbin/rh-cloud-firstboot.py
rpm -ql rh-amazon-rhui-client |tar cvf package.tar -T -
tar xvf package.tar
rm package.tar
FROM registry.access.redhat.com/rhel7/rhel:7.3-53
COPY etc /etc
COPY usr /usr
RUN yum -y update; yum clean all
docker build -t rhel7-base .
Now you still see below message, but yum update
will continoue.
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.