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

feat: move from ubi to ubi-minimal #1825

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

maichouni-mitek
Copy link
Contributor

@maichouni-mitek maichouni-mitek commented Oct 24, 2024

This PR should close #1826.
Using a smaller base image has several benefits:

  • Reducing the storage footprint. Quicker deployments (less and/or smaller layers to pull).
  • Reducing the potential attack surface.
  • Reducing the amount of vulnerabilities that will arise between one kepler release and another, simply because there are less items installed.

A picture is worth a thousand words:
image
image
image

The vulnerabilities we see above (as of 2024/10/24, in kepler:release-0.7.12) are inherited from the base image. They are in the python namespace, which is not needed at all in the kepler image, and which is why #1361 cannot get rid of them.

Thank you.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

🤖 SeineSailor

Here is a concise summary of the pull request changes:

Summary: This pull request updates the build/Dockerfile to reduce the attack surface, storage footprint, and potential vulnerabilities by switching to the ubi9/ubi-minimal:latest base image. Key changes include:

  • Replacing yum with microdnf for package installation
  • Removing unnecessary packages
  • Adding microdnf clean all after package installations

Impact: These changes do not affect the external interface or behavior of the code, and no alterations to function signatures, global data structures, or variables are observed. The updated base image and package management approach should improve the overall security and efficiency of the Docker image.

Observation: The changes are well-contained within the build/Dockerfile and do not introduce any apparent risks or side effects. However, it may be beneficial to verify that the updated image still meets all necessary dependencies and requirements for the project.

@maichouni-mitek
Copy link
Contributor Author

@sthaha , would you please start the GHAs?

@rootfs rootfs requested a review from vimalk78 October 29, 2024 13:21
@rootfs
Copy link
Contributor

rootfs commented Oct 29, 2024

@vimalk78 can you take a look? thanks

Copy link
Collaborator

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we need test image at PR level. @rootfs, @marceloamaral , @sthaha could you please help?

@maichouni-mitek
Copy link
Contributor Author

@rootfs, @marceloamaral, @sthaha, can you please help with the image test?
Thank you very much.

@sthaha
Copy link
Collaborator

sthaha commented Nov 5, 2024

@SamYuan1990 @maichouni-mitek could you please elaborate what you meant by image-test ?

@SamYuan1990
Copy link
Collaborator

SamYuan1990 commented Nov 5, 2024

@SamYuan1990 @maichouni-mitek could you please elaborate what you meant by image-test ?

@rootfs and I once made a CI job https://github.com/sustainable-computing-io/kepler/actions/workflows/image_pr.yml. The job can build an temp image with a specific PR as code base.

As our PR level testing almost running on GHA VM, which is not a BM instance, at meanwhile, this PR has base image change, to ensure the change does not harmful, we can use this PR level CI to build a PR level image and tested on a BM instance if necessary.

Well, unfortunately I don't have a BM instance which able to support to test...as my laptop is mac without GPU, so ....that's the reason I comment it out as PR review result in previous.

@vimalk78
Copy link
Collaborator

vimalk78 commented Nov 5, 2024

LGTM.

built images and pushed

quay.io/vimalkum/kepler:v0.7.12-31-gcb7b058a-linux-amd64-dcgm

quay.io/vimalkum/kepler:v0.7.12-31-gcb7b058a-linux-amd64-habana

@vimalk78 vimalk78 merged commit c1ca080 into sustainable-computing-io:main Nov 5, 2024
23 checks passed
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.

Base image too big
5 participants