10How do image layers and the build cache work, and what does a multi-stage build change?▼easyNewGoogleRed HatInfosysunlockedBuild instructions depend on earlier inputs, so changing source can invalidate a dependency installation placed after it. 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★ EssentialRed HatGitLabShopify2 notes & comments○ 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 →