Process Flow - Layer caching and ordering
Start Dockerfile
Read first instruction
Check cache for layer
Use cached
Add layer to image
Next instruction?
No→Finish image
Yes
Repeat for next instruction
Docker reads each instruction, checks if a cached layer exists, reuses it if yes, otherwise builds a new layer, then moves to the next instruction.