From 6b38ecf6aba7c9c0f597f1a1d52b73b4d1aa1aec Mon Sep 17 00:00:00 2001 From: Owen Jones Date: Mon, 16 Mar 2026 10:51:11 +0000 Subject: [PATCH] rocky-container-stackhpc: Add separate Rocky 10 image --- .../containerfiles/10-stackhpc | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 elements/rocky-container-stackhpc/containerfiles/10-stackhpc diff --git a/elements/rocky-container-stackhpc/containerfiles/10-stackhpc b/elements/rocky-container-stackhpc/containerfiles/10-stackhpc new file mode 100644 index 0000000..d9ad22d --- /dev/null +++ b/elements/rocky-container-stackhpc/containerfiles/10-stackhpc @@ -0,0 +1,46 @@ +# Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/10 +# For least surprise when a new minor version is out, specify the full version, eg `ROCKY_VERSION=10.1` +ARG ROCKY_VERSION=10 +FROM quay.io/rockylinux/rockylinux:${ROCKY_VERSION} +ARG ROCKY_USE_CUSTOM_DNF_MIRRORS="false" +# Comma-delimited list of repo URLs +ARG ROCKY_CUSTOM_DNF_MIRROR_URLS + +RUN if [[ ${ROCKY_USE_CUSTOM_DNF_MIRRORS} != "false" ]]; then \ + dnf -y install 'dnf-command(config-manager)' && \ + mkdir /tmp/orig_repos && mv /etc/yum.repos.d/*.repo /tmp/orig_repos/ && \ + 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 + +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 <