-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adjust installation order and purge "libpythonXX.a" files #508
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
Conversation
(Cognitively, I think it makes sense to finish everything we need to do with the source code, then purge all traces of the source code, then purge files we didn't want to have installed, then detect necessary dependencies, hence my reordering.) |
A couple size comparisons (before / after):
(That slight increase on |
I built before/after locally to help minimize differences in the packages installed, etc to try and narrow down why
(In other words, building locally didn't actually help narrow down anything....) This will have to be a project for next week. 😞 |
Hello, The size increase that you see on the debian buster slim seems to come from the ordering. If I check the same on the old image: I am not really an expert with ldconfig and what it does and how this affect the whole build, but it seems that if ldconfig is placed at the end, less package are cleaned during the apt-get purge resulting in more space used in /usr/lib and /usr/share directory:
Before:
The line of the dockerfile i'm mentioning:
I tried to move the ldconfig line above the two mentioned above and I got back to 98 packages visible from dpkg --list.
Adding the part with pip I get this size:
The only difference with your dockerfile is the place of the ldconfig.
Hoping this helps, as I said, I am not an expert, so I am not sure why this is affecting, but as you moved it in this commit, I tried to see if that could be the issue of the size change. |
Yeah, great catch! I realized right after I left for the day on Friday that I can't After fixing that:
Much better 😇 |
This helped me notice #439 (comment) (we missed |
Changes: - docker-library/python@5d71a7c: Merge pull request docker-library/python#508 from infosiftr/no-a-files - docker-library/python@7a3801a: Fix ldconfig ordering - docker-library/python@0bba31b: Also remove "wininst-*" on Python versions lower than 3.9 - docker-library/python@ffd659a: Adjust installation order and purge "libpythonXX.a" files
Changes: - docker-library/python@a0cb03f: Remove 3.9-rc/alpine3.11 - docker-library/python@e7f98c0: Add missing 3.9-rc/buster/slim - docker-library/python@5d71a7c: Merge pull request docker-library/python#508 from infosiftr/no-a-files - docker-library/python@7a3801a: Fix ldconfig ordering - docker-library/python@0bba31b: Also remove "wininst-*" on Python versions lower than 3.9 - docker-library/python@ffd659a: Adjust installation order and purge "libpythonXX.a" files
This was missed in docker-library/python#439 and noticed in docker-library/python#508.
This was missed in docker-library/python#439 and noticed in docker-library/python#508.
This was missed in docker-library/python#439 and noticed in docker-library/python#508.
Closes #507
Closes #503
Closes #504