From 3eb08c3a7e1e284198c4fdcb0d1888eed7bda27f Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Wed, 20 Nov 2024 18:18:59 -0800 Subject: [PATCH] container/Containerfile: purge .repo files with secrets before commit ceph.repo had creds in it for download.ceph.com/prerelease. Remove the .repo files we construct, since they're not necessary once the container is built (no one should be dnf'ing anything in the container). Signed-off-by: Dan Mick (cherry picked from commit 08432ef54212aa2aba724102854082e76f0cd847) --- container/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container/Containerfile b/container/Containerfile index 8ade5f44319d5..a828579ab663d 100644 --- a/container/Containerfile +++ b/container/Containerfile @@ -200,7 +200,8 @@ RUN set -x && \ # remove unnecessary files with big impact rm -rf /etc/selinux /usr/share/{doc,man,selinux} && \ # don't keep compiled python binaries - find / -xdev \( -name "*.pyc" -o -name "*.pyo" \) -delete + find / -xdev \( -name "*.pyc" -o -name "*.pyo" \) -delete && \ + rm -f /etc/yum.repos.d/{ceph,ganesha,tcmu-runner,ceph-iscsi}.repo # Verify that the packages installed haven't been accidentally cleaned, then # clean the package list and re-clean unnecessary RPM database files -- 2.39.5