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 |
Related bugs: |
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-
To post a comment you must log in.
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.