- Notifications
You must be signed in to change notification settings - Fork2k
minor image cleanup#1874
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
minor image cleanup#1874
Uh oh!
There was an error while loading.Please reload this page.
Conversation
rockdrilla commentedApr 10, 2023
Relates to#1326. |
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
ttshivers commentedApr 10, 2023
This seems like a more slim version of#1283 which is fine. |
rockdrilla commentedApr 11, 2023
Image may be further reduced with following script: find /usr/local/lib/node_modules/ -name'README*' -type f -exec rm -f'{}' +find /usr/local/lib/node_modules/ -name'CHANGELOG*' -type f -exec rm -f'{}' +find /usr/local/lib/node_modules/ -path'*/bin/*.cmd' -type f -exec rm -f'{}' +find /usr/local/lib/node_modules/ -path'*/test*/*' -type f -exec rm -f'{}' +find /usr/local/lib/node_modules/ -type d| sort -V|whileread -r d;do [-d"$d" ]||continue find"$d/"! -type d -printf. -quit| grep -Fq.|| rm -rf"$d"done But I'm not sure does it works with Alpine (i.e. |
ttshivers commentedApr 12, 2023
How much was the image size reduced by this? |
rockdrilla commentedApr 12, 2023
Less than 1 MiB. |
PeterDaveHello commentedApr 8, 2024
Hey@rockdrilla, Thanks for your contribution, and I am sorry for the late review. Are you still interested in revising it to get it merged? We need to modify the Dockerfile templates first and then generate the Dockerfiles with changes automatically. Let me know if you want my help ;) |
rockdrilla commentedApr 8, 2024
Hi@PeterDaveHello, I'm still interested in this PR but I may late to respond too. :) |
PeterDaveHello commentedMay 15, 2024
Thanks. Let me know if you have some spare time to resolve the conflicts, or maybe just getting started from the current main branch will be easier, as it's been a while. |
PeterDaveHello left a comment
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.
@rockdrilla, I hope you're all good. I just wanted to check if you still want to resolve this. Or if you won't mind, can we move on?
Description
Perform minor image cleanup.
Motivation and Context
Reduce image size by removing temporary/meaningless files.
Testing Details
I've manually rebuilt
node:18-bullseye-slim- all works as expected.Types of changes
Checklist