Skip to content

Commit

Permalink
Merge pull request #930 from tu1h/support_rhel9
Browse files Browse the repository at this point in the history
support rhel9
  • Loading branch information
ErikJiang authored Aug 8, 2023
2 parents 125c5df + 9247376 commit 7097fcd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/call-os-pkgs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
dockerfile: build/os-packages/Dockerfile.redhat7
- name: redhat8
dockerfile: build/os-packages/Dockerfile.redhat8
- name: redhat9
dockerfile: build/os-packages/Dockerfile.redhat9
- name: kylinv10
dockerfile: build/os-packages/Dockerfile.kylinv10
- name: openeuler22.03
Expand Down
20 changes: 20 additions & 0 deletions build/os-packages/Dockerfile.redhat9
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
4 changes: 3 additions & 1 deletion build/os-packages/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ common:
- sshpass

# https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package
# https://download.docker.com/linux/centos/<centos_version>>/x86_64/stable/Packages/
# https://download.docker.com/linux/centos/<centos_version>/x86_64/stable/Packages/
# or do 'yum --showduplicates list docker-engine'
centos7:
- containerd.io-1.4.12-3.1.el7
Expand All @@ -34,6 +34,8 @@ redhat8:
- docker-ce-3:20.10.20-3.el8
- docker-ce-cli-1:20.10.20-3.el8

redhat9: []

kylinv10:
- socat
- libselinux-python
Expand Down

0 comments on commit 7097fcd

Please sign in to comment.