The first build of the shop's API image took a few seconds: Docker downloaded Python, installed Flask and copied the code. Change one line in app.py and build the image again — the new build finishes almost at once. To see what Docker redid and what it reused, you need to see what an image is made of.
In this lesson
- An image is a stack of layers
- The build cache
- Let's check it on a build
- Common mistake
- Key points