Support Image Flattening Following Build
Introduce a mechanism for flattening images built via Kolla:
Kolla images are built using an extensible template system, that allows
complex images for multiple platforms to be created simply: however the docker
build methodology results in images with redundant artifacts in layers that are
then masked by subsequent ones. This results in images that are potentiality
much larger than required; resulting in slower deployment and excessive disc
usage. This blueprint proposes introducing a flattening option to kolla-build
that merges layers in a Dockerfile into a single layer: which addresses the
above issues and frees developers to further optimize Kolla images simply by
removing development tools (e.g. gcc & libs) from images for deployment. This
also addresses the issue created by the AUFS limit of 127 layers per image by
reducing the number of layers present in parent images.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Pete Birley
- Direction:
- Needs approval
- Assignee:
- Pete Birley
- Definition:
- New
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Mark Goddard
- Completed by
- Mark Goddard
Related branches
Related bugs
Sprints
Whiteboard
A prototype was produced:
https:/
* This stresses the docker-engine to the point of crashing on Zuul and my laptop unless run with --threads=1.
Docker have now introduced similar functionality upstream, but this flattens all layers to a single image, rather than the delta between the FROM statement in a Dockerfile to it's end:
https:/
mgoddard: available via the --squash argument.