Merge lp://staging/~ricardokirkner/isitdeployable/smaller-docker-1 into lp://staging/isitdeployable

Proposed by Ricardo Kirkner
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 232
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp://staging/~ricardokirkner/isitdeployable/smaller-docker-1
Merge into: lp://staging/isitdeployable
Prerequisite: lp://staging/~ricardokirkner/isitdeployable/non-root-containers
Diff against target: 148 lines (+50/-25)
7 files modified
Dockerfile (+6/-6)
Dockerfile.test (+9/-0)
README.k8s (+25/-19)
dependencies-devel.txt.docker (+2/-0)
dependencies.txt.docker (+6/-0)
django_project/settings_base.py (+1/-0)
requirements.txt (+1/-0)
To merge this branch: bzr merge lp://staging/~ricardokirkner/isitdeployable/smaller-docker-1
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+328532@code.staging.launchpad.net

Commit message

reduce container size by installing as few system dependencies as possible

Description of the change

It seems like most dependencies in dependencies.txt were not really (strictly) necessary for running the service.

Installing only the strictly necessary packages reduced the size of the built container from ~845M -> ~488M (43% reduction).

Further improvement is likely possible, as adding the software-properties-common package for supporting PPAs brings several not strictly required dependencies which could be avoided. This however means not relying on the isitdeployable-dependencies PPA which currently is required for the python-pygit2 dependency.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

This is awesome, many thanks!

the magic software-properties-common does can be mimicked by adding the deb line directly (since we know the Ubuntu release we can hardcode that, or get it from lsb_relase), and getting the keys via curl | apt-key. But I'd agree to leave that for another branch, since the reduction here is already significant.

Also, python-pygit2 is available in xenial archive, so if/when we move to xenial, the ppa requirement may go away altogether.

Finally, proposed one possible further reduction of cruft. But this can go as-is.

review: Approve
Revision history for this message
Ricardo Kirkner (ricardokirkner) :
231. By Ricardo Kirkner

Erase downloaded archive files

Revision history for this message
Daniel Manrique (roadmr) wrote :

THanks!

review: Approve
232. By Ricardo Kirkner

updated README.k8s with full deploy instructions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches