Let's say we have a Dockerfile with 3 basic stages:
- 3 base layers of an Ubuntu image. These basically never change.
- 5 intermediate layers of installing apt/python dependencies. These only change when we want to update our packages.
- 2 final layers of copying and building our source code. These change every build.
When we change our packages we create a new group of intermediate layers. Let's say that this is our scenario for when we change our packages:
group number | number of builds | description |
---|