Image size directly impacts build speed, push/pull times, and security surface area. Smaller images have fewer packages and fewer potential vulnerabilities. Size Comparison Approach Image Size dotnet/sdk:9.0 (no multi-stage) 900MB dotnet/aspnet:9.0 (multi-stage) 220MB dotnet/aspnet:9.0-alpine (multi-stage + Alpine) 110MB Optimization Techniques # Technique Impact 1 Multi-stage builds Only runtime in final image 2 Alpine base images 50% smaller than Debian 3 .dockerignore Exclude bin/, obj/, .git, nodemodules 4 Layer ordering Copy .csproj first → restore → copy code (caching) 5 Specific tags 9.0-alpine not latest — reproducible builds