Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL PoC #991

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

RHEL PoC #991

wants to merge 2 commits into from

Conversation

neersighted
Copy link
Member

This is a PoC for building RHEL packages assuming that a RHEL username/password is available in the environment.

This is mostly intended for internal use by Docker, as it is assumed that the main utility is performing builds with a 'real RHEL' for enterprise customers.

However, when a unencumbered RHEL-equivalent distribution (e.g. Rocky) is supported, it will make sense to generalize the 'rhel' infrastructure in this repo.

@@ -1,30 +0,0 @@
# syntax=docker/dockerfile:1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one may be in use by IBM?

Comment on lines +14 to +15
RUN subscription-manager register --username=$RH_USER --password=$RH_PASS
RUN subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't this produce a subscription-file, so something we could run in CI, and --mount ? Passing these as argument means they leak into the image produced (and build-cache).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat intentional for now; the cleanup step is "manual" (read: a cron job elsewhere) as a stopgap while I work on lifecycle robustness. That being said, I hadn't considered build cache issues since we don't actually clean the cache on the Jenkins nodes, as best I can tell...

Given that, maybe it would be better to use fixed certificates; this is somewhat messier (mostly for containerd-packaging) and introduces the manual update process/point of failure, but I can mock it up as an alternative (and it does obviate the runtime lifecycle issues).

ARG RH_USER
ARG RH_PASS
RUN rm /etc/rhsm-host
RUN subscription-manager register --username=$RH_USER --password=$RH_PASS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use RUN --mount=type=secret to avoid leaking the password in the image history (although the image is never pushed to public)

@neersighted neersighted force-pushed the rhel-poc branch 2 times, most recently from 98a8275 to 6485b2d Compare March 6, 2024 15:29
@neersighted neersighted force-pushed the rhel-poc branch 6 times, most recently from 3739fa8 to a1e3656 Compare March 19, 2024 16:37
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland
Copy link
Contributor

vvoland commented May 8, 2024

Rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants