Skip to content

Consider producing a distroless SDK #4942

Open
@richlander

Description

Today, we produce distroless variants for all image types except SDK. In thinking more about it, it isn't obvious why that is. The benefits of distroless and the reasons why you might not be able to use it seem to apply equally to runtime as SDK.

I did some basic tests with Mariner. Distroless dropped the size of the image by nearly half and gave me the benefits of non-root. We may want to add the shell back for this scenario, but that's a design/policy point.

For users that use RUN commands solely for dotnet, a distroless SDK seems like 100% win w/no downside. It also means that you get to share layers between runtime and SDK which you cannot w/today's approach (with distroless). So, not only will SDK be smaller, but your overall layer pull for multi-stage build will be MUCH smaller.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions