Skip to content

Commit 0f2628d

Browse files
committed
Make ROCKY_MIRROR_URLS a comma separated string
1 parent e9f19c4 commit 0f2628d

File tree

1 file changed

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

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/9
22

33
FROM docker.io/rockylinux/rockylinux:9
4+
ARG ROCKY_USE_MIRRORS=false
5+
# Comma separated list of repo URLS
6+
ARG ROCKY_MIRROR_URLS
7+
8+
RUN if [[ ${ROCKY_USE_MIRRORS} = "true" ]]; then \
9+
dnf -y install 'dnf-command(config-manager)' && \
10+
mkdir /tmp/orig_repos && mv -f /etc/yum.repos.d/* /tmp/orig_repos/ && \
11+
for REPO_URL in $(echo ${ROCKY_MIRROR_URLS} | sed "s/,/ /g"); do \
12+
dnf config-manager --add-repo ${REPO_URL}; done && \
13+
dnf --allowerasing -y distro-sync; fi
414

515
RUN dnf group install -y 'Minimal Install' --allowerasing && \
616
dnf install -y findutils util-linux cloud-init

0 commit comments

Comments
 (0)