10How do image layers and the build cache work, and what does a multi-stage build change?▼easyNewGoogleRed HatInfosysunlockedEach instruction is a layer, and a layer is invalidated by anything above it changing. Ordering the Dockerfile by how often things change is the whole optimisation, and multi-stage is how the compiler stops shipping to production.Open full answer →
20A service image is 1.2GB and deploys are slow. Get it under 100MB without breaking it.▼medium★ EssentialNewRed HatGitLabShopify2 replies○ sign inA practical question with a precise answer, and the size is not the real cost. Pull time on every node, registry storage, and attack surface all scale with it.Open full answer →