Does a RHEL7 docker container need subscription?

Furious picture Furious · Dec 5, 2016 · Viewed 20.1k times · Source

I have a rhel7 host with docker in it. I have build a image with also rhel7 as base image. But when I run the container & do yum update or try to install in package with yum, it gives me below error.

"This system is not registered to Red Hat Subscription.you can use subscription manager to register"

I have already subscribed the host RHEL Machine. Do I need to subscribe each and every container with rhel image?

Or

Do I need to subscribe in the dockerfile itself while building the image?

Thanks

Answer

user2915097 picture user2915097 · Dec 5, 2016

On the Docker hub, you can find some Red Hat docker images , like

https://hub.docker.com/r/richxsl/rhel6.5/

or

https://hub.docker.com/r/lionelman45/rhel7/

but in order to update them, you will need a valid subscription

You will find Red Hat docker images on the Red Hat site, at

https://access.redhat.com/containers

this article summarizes what you need in order to build a Red hat docker image

http://cloudgeekz.com/625/howto-create-a-docker-image-for-rhel.html

it begins with

Pre-requisites Access to RHEL package repository.