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 <