Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded packages from final collector image #1864

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion collector/container/devel/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -eo pipefail

dnf upgrade -y
dnf install -y kmod libasan elfutils-libelf
dnf install -y libasan elfutils-libelf
3 changes: 1 addition & 2 deletions collector/container/konflux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,13 @@ COPY ./.konflux /tmp/.konflux
RUN /tmp/.konflux/scripts/subscription-manager-bro.sh register /mnt && \
dnf -y --installroot=/mnt upgrade --nobest && \
dnf -y --installroot=/mnt install --nobest \
kmod \
tbb \
jq \
c-ares && \
/tmp/.konflux/scripts/subscription-manager-bro.sh cleanup && \
# We can do usual cleanup while we're here: remove packages that would trigger violations. \
dnf -y --installroot=/mnt clean all && \
rpm --root=/mnt --verbose -e --nodeps $(rpm --root=/mnt -qa 'curl' '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*') && \
rpm --root=/mnt --verbose -e --nodeps $(rpm --root=/mnt -qa 'curl' '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' 'libyaml*' 'libarchive*') && \
rm -rf /mnt/var/cache/dnf /mnt/var/cache/yum


Expand Down
7 changes: 5 additions & 2 deletions collector/container/rhel/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ set -eo pipefail

# UBI 9 requires confirmation with -y flag.
microdnf upgrade -y --nobest
microdnf install -y kmod findutils elfutils-libelf
microdnf install -y elfutils-libelf

microdnf clean all
rpm --query --all 'curl' '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' 'findutils' | xargs -t rpm -e --nodeps
# shellcheck disable=SC2046
rpm --verbose -e --nodeps $(
rpm -qa 'curl' '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' 'libyaml*' 'libarchive*'
)
rm -rf /var/cache/yum
Loading