-
Notifications
You must be signed in to change notification settings - Fork 2k
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
minor image cleanup #1874
base: main
Are you sure you want to change the base?
minor image cleanup #1874
Conversation
Relates to #1326. |
Signed-off-by: Konstantin Demin <[email protected]>
625f899
to
5387b51
Compare
This seems like a more slim version of #1283 which is fine. |
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 | while read -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. |
How much was the image size reduced by this? |
Less than 1 MiB. |
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 ;) |
Hi @PeterDaveHello, I'm still interested in this PR but I may late to respond too. :) |
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. |
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