On Fri, Aug 7, 2020 at 3:29 PM Aleksandar Kostadinov <akost...@redhat.com>
wrote:

> I'm reading documentation [1] but adding the secret mounted under
> `etc-pki-entitlement` directory but subscription manager still doesn't
> find the extra repos.
>
> I don't see 3.11 specific information. Should it work in another way?
>
> I also see a blog post from this year [2]. It suggests copying
> entitlement files inside the Dockerfile which approach I don't like
> since I prefer independent build logic from underlying environment and
> doesn't match documentation [1]. Blog doesn't allow comments though.
>
> So is documentation or the blog correct? Is there a difference between
> 4.x and 3.11?
>

there is a major difference between 3.x and 4.x.

1) hosts aren't subscribed so there are no subscription creds available
normally (in 3.x the builds picked them up from the host filesystem, like
any other container)

2) the container executing your Dockerfile commands doesn't run directly on
the host, it runs inside the build-pod, so it doesn't have access to the
host filesystem anyway.

in 3.x we had the host filesystem available and the host was subscribed, so
we could just map those files through to the container running your
dockerfile commands.

in 4.x that is not possible(the host doesn't have a subscription, thus the
build-pod doesn't have subscription creds, thus the container running your
dockerfile commands, which runs inside the build-pod, does not have a way
to get subscription creds), hence the hoops you must jump through to make
the subscription creds available(including the COPY statements) before
executing your dnf commands.

we are working on efforts to improve this experience.

you can see the top level summary here:
https://github.com/openshift/enhancements/pull/384

but other EPs are associated to the work.




>
> Thank you!
>
> [1]
>
> https://docs.openshift.com/container-platform/4.4/builds/runnAddSuitesing-entitled-builds.html#builds-source-secrets-entitlements_running-entitled-builds
> <https://docs.openshift.com/container-platform/4.4/builds/running-entitled-builds.html#builds-source-secrets-entitlements_running-entitled-builds>
> [2]
>
> https://www.openshift.com/blog/how-to-use-entitled-image-builds-to-build-drivercontainers-with-ubi-on-openshift
>
> _______________________________________________
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>

-- 
Ben Parees | OpenShift
_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to