Skip to content

Commit df71280

Browse files
authored
Merge pull request #74 from stackhpc/custom-repo-kernel-fix
fix: disable repositories second time to downgrade kernel
2 parents eaed1e9 + c7b73d9 commit df71280

File tree

1 file changed

+9
-0
lines changed
  • elements/rocky-container-stackhpc/containerfiles

1 file changed

+9
-0
lines changed

elements/rocky-container-stackhpc/containerfiles/9-stackhpc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ RUN if [[ ${ROCKY_USE_CUSTOM_DNF_MIRRORS} != "false" ]]; then \
1818
RUN dnf group install -y 'Minimal Install' --allowerasing && \
1919
dnf install -y findutils util-linux cloud-init
2020

21+
# Repositories need to be disabled a second time to downgrade kernel.
22+
RUN if [[ ${ROCKY_USE_CUSTOM_DNF_MIRRORS} != "false" ]]; then \
23+
dnf config-manager --disable \* && \
24+
for REPO_URL in $(echo ${ROCKY_CUSTOM_DNF_MIRROR_URLS} | sed 's/,/ /g'); do \
25+
dnf config-manager --add-repo ${REPO_URL}; \
26+
done && \
27+
dnf --allowerasing -y distro-sync; \
28+
fi
29+
2130
COPY <<EOF /etc/cloud/cloud.cfg.d/10-NetworkManager.cfg
2231
---
2332
system_info:

0 commit comments

Comments
 (0)