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

[ENHANCE] Reduce footprint of UBI image #716

Closed
bainsy88 opened this issue Jul 29, 2024 · 3 comments
Closed

[ENHANCE] Reduce footprint of UBI image #716

bainsy88 opened this issue Jul 29, 2024 · 3 comments
Labels
kind/enhancement New feature or request

Comments

@bainsy88
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently the UBI based image is based off ubi-minimal which is has >100 packages most of which are not needed. This creates vulnerability churn and an increased attack surface

Describe the solution you'd like
Created an image directory in the first stage of the build that contains the minimum set of files to run a non-statically compiled Go app and be scannable by image vulnerability scanners. An RPM database is then created just for the packages in the image dir both this and the libs are then copied to the final base image.

Describe alternatives you've considered
Another option could have been to use UBI micro but this has more packages than this solution and also doesn't have a package manager which makes getting package updates more complicated when the CI is not running on RHEL.

Additional context
We have an internal requirement for compliance to use UBI based packages in the image which is why simply can't use the distroless image already provided

@bainsy88 bainsy88 added the kind/enhancement New feature or request label Jul 29, 2024
@IdanAdar
Copy link
Contributor

@karl-johan-grahn Could please review the PR and merge if accepted?

@IdanAdar
Copy link
Contributor

@karl-johan-grahn @SheryarButt Can you please cut a new release?

@MuneebAijaz
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants