Skip to content

Conversation

@ShelbyZ
Copy link
Contributor

@ShelbyZ ShelbyZ commented Nov 24, 2025

Summary

Discovered during using du -sh /var/cache/* it appears we have cached files because the cached dnf files are not cleaned for the runtime AL2023 image:

https://github.com/aws/aws-for-fluent-bit/blob/mainline/scripts/dockerfiles/runtime/Dockerfile.deps-al2023#L4-L23

This section lacked a dnf --installroot /sysroot clean all to clear up files adding about 100MB to the final image.

Testing

Built local images and test run

Before

amazon/aws-for-fluent-bit                latest-al2023         27cbbb1b63ba   About an hour ago   380MB

After

amazon/aws-for-fluent-bit                latest-al2023         514c5b4e1ea0   14 minutes ago      265MB

Description for the changelog

fix: Shrink AL2023 images by removing cached dnf files

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ShelbyZ ShelbyZ requested a review from a team as a code owner November 24, 2025 19:41
@ShelbyZ ShelbyZ merged commit b27facc into aws:mainline Nov 24, 2025
@ShelbyZ ShelbyZ deleted the clean-dnf branch November 24, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants