-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #930 from tu1h/support_rhel9
support rhel9
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ARG OS_NAME=redhat | ||
|
||
FROM almalinux:9 as os-redhat9 | ||
ARG OS_NAME | ||
ARG OS_VERSION=9 | ||
ARG BUILD_TOOLS="yum-utils createrepo" | ||
|
||
WORKDIR /$OS_NAME/$OS_VERSION/os | ||
COPY build/os-packages/packages.yml . | ||
COPY --from=mikefarah/yq:4.30.8 /usr/bin/yq /usr/bin/yq | ||
RUN yq eval '.common[],.yum[],.redhat9[]' packages.yml > packages.list | ||
|
||
RUN ARCH=$(uname -m) \ | ||
&& dnf install -y ${BUILD_TOOLS} \ | ||
&& while read -r line; do dnf install -y --downloadonly --downloaddir=${ARCH} ${line}; done <<<"$(sort -u packages.list)" \ | ||
&& createrepo -d ${ARCH} | ||
|
||
FROM scratch | ||
ARG OS_NAME | ||
COPY --from=os-redhat9 /$OS_NAME /resources/$OS_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters