Skip to content

Commit 0576f0c

Browse files
committed
Add dnf clean all
1 parent d8f0961 commit 0576f0c

File tree

1 file changed

+3
-5
lines changed
  • elements/rocky-container-stackhpc/containerfiles

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ ARG ROCKY_BASEOS_URL
77

88
RUN if [ ${ROCKY_USE_MIRROR} = "true" ]; then \
99
dnf -y install 'dnf-command(config-manager)' && \
10+
dnf clean all && \
1011
mkdir /tmp/orig_repos && mv -f /etc/yum.repos.d/* /tmp/orig_repos/ && \
1112
dnf config-manager --add-repo ${ROCKY_APPSTREAM_URL} && \
1213
dnf config-manager --add-repo ${ROCKY_BASEOS_URL} && \
13-
dnf -y distro-sync; fi
14+
dnf -y distro-sync && \
15+
rm -f /etc/yum.repos.d/rocky*.repo; fi
1416

1517
RUN dnf group install -y 'Minimal Install' --allowerasing && \
1618
dnf install -y findutils util-linux \
1719
https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/cloud-init-23.1.1-12.el9.noarch.rpm
1820

19-
RUN rm -f /etc/yum.repos.d/* && \
20-
mv -f /tmp/orig_repos/* /etc/yum.repos.d/ && \
21-
rmdir /tmp/orig_repos
22-
2321
RUN sed -i "s/renderers:.*/renderers: ['network-manager']\n activators: ['network-manager']/" /etc/cloud/cloud.cfg
2422

2523
RUN systemctl unmask console-getty.service dev-hugepages.mount \

0 commit comments

Comments
 (0)