-
Notifications
You must be signed in to change notification settings - Fork 345
Conversation
26aa499
to
0980297
Compare
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.
@ericcitaire thank you for the contribution, as part of the changes have you identified with metrics if in fact the total image size was actually reduced? It'd be good to have a comparison in image size before and after the changes.
Please note that optimization was attempted before without any significant impact on image size: #389 (comment).
@vince-fugnitto Here is a comparison after building it locally (size reduced by ~270MB) :
|
Signed-off-by: Eric Citaire <eric.citaire@zenika.com>
Signed-off-by: Eric Citaire <eric.citaire@zenika.com>
Signed-off-by: Eric Citaire <eric.citaire@zenika.com>
Thanks @ericcitaire . In my local tests, it looks-like the |
@marcdumais-work : I agree that APT cleanups add a lot of noise to the An idea : what if we create a little script at the start of the Something like this :
#!/bin/bash
apt-get update && \
apt-get --no-install-recommends -y -q install "$@" && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* Note : the option |
@ericcitaire Just to make sure I understand, are you suggesting that instead of directly installing RUN /usr/bin/install-package $dep1 $dep2 ... If so, it's an interesting idea, but I am not sure it's worth the trouble for a sub 0.5% decrease in image size. Remember that the apps in this repo are meant as examples, and so a smaller image size at any cost is not always the goal - the Can you amend the PR to remove the |
@ericcitaire Are you ok if someone picks-up the two commits we'd like to merge, preserving your authorship, adding probably a third commit on top to adapt to the latest master branch? |
@marcdumais-work Yes, no problem at all. Even if you don't preserve authorship, I don't mind. |
This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia! |
Closing this. Feel free to cherry-pick any changes you want. |
Cleanup package managers caches (apt, go, pip) in order to get smaller layers.