-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Packaging] Build RPM for RHEL 9 and CentOS Stream 9 #23556
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
Changes from 1 commit
cf3a19b
83fe59b
85f8919
c8da6b9
e03cc49
f7f317b
f16eaa1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Red Hat Universal Base Image 9: https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we reuse
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I'll make devel package be an arg. In RHEL9, the valid names are |
||
|
|
||
| ARG tag=9.0.0-1604 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better to use wider version like |
||
|
|
||
| FROM registry.access.redhat.com/ubi9/ubi:${tag} AS build-env | ||
| ARG cli_version=dev | ||
|
|
||
| RUN yum update -y | ||
| RUN yum install -y wget rpm-build gcc libffi-devel python3-devel openssl-devel make bash diffutils patch dos2unix perl | ||
|
|
||
| WORKDIR /azure-cli | ||
|
|
||
| COPY . . | ||
|
|
||
| # RHEL 9's 'python3' is Python 3.9. | ||
| # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/9.0_release_notes/index#enhancement_dynamic-programming-languages-web-and-database-servers | ||
| RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \ | ||
| REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=python3 PYTHON_CMD=python3 \ | ||
| rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | ||
| cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.*.x86_64.rpm /azure-cli-dev.rpm | ||
|
|
||
| FROM registry.access.redhat.com/ubi9/ubi:${tag} AS execution-env | ||
|
|
||
| COPY --from=build-env /azure-cli-dev.rpm ./ | ||
| RUN rpm -i ./azure-cli-dev.rpm && \ | ||
| az --version | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use
python3.9to be explicit?