Companies are using more containers, which are becoming more sophisticated and producing heavier images. A recent survey found that respondents reported that container build time had increased by 15.9% within a year.
In this video, I cover 3 tips to improve your container image build process:
1) Using the Dockerfile step ordering – decreased build time by 99%
2) Using the Dockerfile multi-stages – decreased container image size by 50%
3) Using pack CLI rebase feature (Buildpacks implementation) - decreased (re)build time by 70%
Step ordering files:
-Unoptimized ordering Dockerfile https://github.com/sylvainkalache/sam...
-Optimized ordering Dockerfile https://github.com/sylvainkalache/sam...
Multi-stages:
-Regular Dockerfile https://github.com/sylvainkalache/sam...
-Multi-stages Dockerfile https://github.com/sylvainkalache/sam...
Pack cli rebase:
-Benchmarking script https://github.com/sylvainkalache/sam...
0:00 Introduction
1:36 Dockerfile instructions ordering
5:38 Dockerfile multi-stages
08:34 Pack cli rebase
12:51 Wrapping up