From c7b73d9e918df70bac73df6c777bc7a2a629af51 Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Fri, 6 Mar 2026 09:13:55 +0000 Subject: [PATCH] fix: disable repositories second time to downgrade kernel It has been observed the image built with custom repositories will contain the latest kernel and will not downgrade to match what is contained within the custom repositories. By disabling the repositories after installing `Minimal Install` it should then trigger a downgrade. Signed-off-by: Jack Hodgkiss --- .../rocky-container-stackhpc/containerfiles/9-stackhpc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/elements/rocky-container-stackhpc/containerfiles/9-stackhpc b/elements/rocky-container-stackhpc/containerfiles/9-stackhpc index 8d3d831..a757036 100644 --- a/elements/rocky-container-stackhpc/containerfiles/9-stackhpc +++ b/elements/rocky-container-stackhpc/containerfiles/9-stackhpc @@ -18,6 +18,15 @@ RUN if [[ ${ROCKY_USE_CUSTOM_DNF_MIRRORS} != "false" ]]; then \ RUN dnf group install -y 'Minimal Install' --allowerasing && \ dnf install -y findutils util-linux cloud-init +# Repositories need to be disabled a second time to downgrade kernel. +RUN if [[ ${ROCKY_USE_CUSTOM_DNF_MIRRORS} != "false" ]]; then \ + dnf config-manager --disable \* && \ + for REPO_URL in $(echo ${ROCKY_CUSTOM_DNF_MIRROR_URLS} | sed 's/,/ /g'); do \ + dnf config-manager --add-repo ${REPO_URL}; \ + done && \ + dnf --allowerasing -y distro-sync; \ + fi + COPY <