Skip to content

Commit

Permalink
Merge pull request #1270 from ErikJiang/update_rhel8_ospkgs
Browse files Browse the repository at this point in the history
update rhel8 os package
  • Loading branch information
ErikJiang authored Jun 13, 2024
2 parents 0cb87e9 + a44d5d0 commit 932f5c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 6 additions & 10 deletions build/os-packages/Dockerfile.redhat8
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
FROM centos:8 as os-redhat8
FROM rockylinux:8 as os-redhat8
ARG OS_VERSION=8
ARG BUILD_TOOLS="yum-utils createrepo epel-release wget"

RUN ARCH=$(uname -m) \
&& dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos -y \
&& dnf distro-sync -y \
&& dnf install -q -y ${BUILD_TOOLS} \
&& dnf install -q -y http://mirror.centos.org/centos/8-stream/AppStream/${ARCH}/os/Packages/modulemd-tools-0.7-6.el8.noarch.rpm \
&& yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \
&& dnf makecache
ARG BUILD_TOOLS="yum-utils createrepo epel-release wget modulemd-tools findutils"

WORKDIR /redhat/$OS_VERSION/os
COPY build/os-packages/packages.yml .
COPY build/os-packages/repos/centos8.repo /etc/yum.repos.d/
COPY --from=mikefarah/yq:4.30.8 /usr/bin/yq /usr/bin/yq
RUN yq eval '.common[],.yum[],.redhat8[]' packages.yml > packages.list

RUN ARCH=$(uname -m) \
&& dnf install -q -y ${BUILD_TOOLS} \
&& yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \
&& dnf makecache \
&& sort -u packages.list | xargs repotrack --destdir ${ARCH} \
&& createrepo_c ${ARCH} \
&& repo2module -s stable ${ARCH} ${ARCH}/modules.yaml \
Expand Down
5 changes: 5 additions & 0 deletions build/os-packages/repos/centos8.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[centos8-appstream]
name=Centos Linux 8 - AppStream
baseurl=https://dl.rockylinux.org/vault/centos/8-stream/AppStream/$basearch/os/
gpgcheck=0
enabled=1

0 comments on commit 932f5c2

Please sign in to comment.