diff --git a/build/os-packages/Dockerfile.redhat8 b/build/os-packages/Dockerfile.redhat8 index 335a8e4b2..99fb73282 100644 --- a/build/os-packages/Dockerfile.redhat8 +++ b/build/os-packages/Dockerfile.redhat8 @@ -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 \ diff --git a/build/os-packages/repos/centos8.repo b/build/os-packages/repos/centos8.repo new file mode 100644 index 000000000..1f25acc29 --- /dev/null +++ b/build/os-packages/repos/centos8.repo @@ -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