Docker images dibangun ing layers — saben Dockerfile instruction nggawa layer, lan Docker caches layers kanggo nyepetaken rebuilds. Ngerti layers lan caching iku kunci kanggo nulis Dockerfiles sing efisien sing bangun cepet lan ngasilaken images sing luwih cilik.
Layers — saben instruction nambah layer
Each Dockerfile instruction (FROM, RUN, COPY, etc.) creates a read-only LAYER:
→ layers stack to form the image; layers are CACHED and SHARED between images
→ if a layer is unchanged, Docker REUSES the cached layer (skips rebuilding it)
→ Layer caching makes rebuilds fast — only changed layers (and those AFTER) rebuild.
