]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
container/Containerfile: purge .repo files with secrets before commit
authorDan Mick <dan.mick@redhat.com>
Thu, 21 Nov 2024 02:18:59 +0000 (18:18 -0800)
committerDan Mick <dan.mick@redhat.com>
Thu, 5 Dec 2024 08:10:12 +0000 (00:10 -0800)
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 <dan.mick@redhat.com>
(cherry picked from commit 08432ef54212aa2aba724102854082e76f0cd847)

container/Containerfile

index af843052e60e4b159638d1a9cd57df2f515d066a..ff414e39d39209ad74acc1d87dca3790effe9626 100644 (file)
@@ -203,7 +203,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