node_modules bin obj .git Why it mattersSmaller build context = faster builds, fewer leaks.
Tag: container security
Why Multi-Stage Builds Are About Security, Not Size
Most people say multi-stage builds are for smaller images.Wrong. They’re about attack surface. FROM mcr.microsoft.com/dotnet/sdk AS build WORKDIR /src COPY . . RUN dotnet publish -c Release -o /app FROM mcr.microsoft.com/dotnet/aspnet WORKDIR /app COPY –from=build /app . Why it matters: No SDK in production Fewer CVEs Faster cold starts Smaller image is just a side […]
