Skip to content
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

Disable pip cache for smaller images #96

Merged
merged 3 commits into from
Dec 12, 2020
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Nov 24, 2020

Similar to #91 but for pip: disable the pip cache for smaller images.

Not as big saving as #91 but it adds up over builds.

Image Size before Size after Amount smaller Percent smaller
alpine 571 MB 563 MB 8 MB 1%
amazon-1-amd64 614 MB 597 MB 17 MB 3%
amazon-2-amd64 1.21 GB 1.2 GB 10 MB 1%
arch 1.63 GB 1.61 GB 20 MB 1%
centos-6-amd64 768 MB 747 MB 21 MB 3%
centos-7-amd64 681 MB 663 MB 18 MB 3%
centos-8-amd64 645 MB 628 MB 17 MB 3%
debian-10-buster-x86 1.41 GB 1.41 GB 0 MB 0%
fedora-32-amd64 583 MB 566 MB 17 MB 3%
fedora-33-amd64 570 MB 551 MB 19 MB 3%
ubuntu-18.04-bionic-amd64 915 MB 913 MB 2 MB 0%
ubuntu-20.04-focal-amd64 939 MB 936 MB 3 MB 0%
         
Total 10.39 GB 10.24 GB 152.72 MB 1%

Savings calculated based on MB or GB values, not bytes, so some rounding here.

Also move the && to the start of continuation lines for readability.

@hugovk hugovk changed the title Clear package manager cache for smaller images Disable pip cache for smaller images Nov 24, 2020
@hugovk hugovk merged commit 9f7f039 into python-pillow:master Dec 12, 2020
@hugovk hugovk deleted the image-size branch December 12, 2020 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants