-
Notifications
You must be signed in to change notification settings - Fork 136
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
Dockerfile: reduce karmada website container image size by 28% #771
base: main
Are you sure you want to change the base?
Dockerfile: reduce karmada website container image size by 28% #771
Conversation
Welcome @mohamedawnallah! It looks like this is your first PR to karmada-io/website 🎉 |
Hi @XiShanYongYe-Chang, @zhzhuang-zju, I’ve submitted that PR and would appreciate any feedback you may have. Looking forward to your thoughts! 🙏 |
@mohamedawnallah Good job~ I'm not very good at this, but from your validation, it does look like a great optimization. With this optimization, is it possible to optimize the Karmada components images? |
Yes, I would love to optimize the Karmada components images if I see any opportunities for optimization. I'm just wondering where the Dockerfiles are located? |
you can find them in https://github.com/karmada-io/karmada/tree/master/cluster/images |
Thanks for sharing this! 🙏 I’ll take a look at them by the end of the day and submit a PR if I spot any opportunities for optimization. At first glance, I see that we could group the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
@zhzhuang-zju I reviewed the Dockerfile specifications for all Karmada component images on Docker Hub (those prefixed with |
Regards that PR, How am I supposed to move it forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regards that PR, How am I supposed to move it forward?
If all the CI checks pass and there is no impact on the deployment of the website, then it's ok with me.
Thanks @mohamedawnallah |
745082d
to
a6c8e2c
Compare
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: samzong The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @mohamedawnallah, the CI is failed. |
#764 has encountered the same error. I suspect that it is caused by fluctuations in the CI operating environment. /retest |
It seems the CI hasn't been re-triggered after |
/retest |
Yeah, for some reason, |
32ddd3d
to
99bdedb
Compare
I've seen this issue in the netlify deployment error:
I've updated [build]
command = "NODE_OPTIONS=\"--max_old_space_size=4096\" yarn run build" Not sure if netlify CI should be triggered automatically here EDIT: |
The CI is passed, thanks~ |
New changes are detected. LGTM label has been removed. |
Could you please squash the commits? And I think we are ready to go after that. |
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com> Co-authored-by: zhzhuang-zju <m17799853869@163.com>
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com> Co-authored-by: Hongcai Ren <renhongcai@huawei.com>
207b160
to
655bb60
Compare
Description
This commit optimizes the Karmada website's Docker container, reducing the image size from ~796MB to ~570MB, achieving a significant ~28% reduction.
The size reduction was achieved by:
RUN
commands: Combining multipleRUN
operations to reduce intermediate tarball files generated during those operations.What type of PR is this?
/kind cleanup
Which issue(s) this PR fixes:
N/A
Special Notes for Reviewers:
Verification:

This optimization can be verified by comparing Docker image builds before and after the changes:
Further Debugging:
For deeper insights, the optimization can be analyzed using dive, a tool for exploring each layer in a Docker image.