-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support non-root containers #165
Comments
This ties into the proposal of non-root-capable container images at dotnet/designs#271. That proposal is for .NET 8. Were those images to exist, I think it would be appropriate for there to be some means to tell the SDK "build me a container image that sets the default user to the non-root user provided by the .NET base image". In the absence of those images, or for pre-.NET 8, then I think explicitly creating the non-root user makes sense. In either case, it's probably best to coordinate with that design proposal to ensure a consistent experience is provided. cc @richlander |
Here is a doc that explains what is required to run rootless, https://techcommunity.microsoft.com/t5/azure-developer-community-blog/hardening-an-asp-net-container-running-on-kubernetes/ba-p/2542224 |
IMO, this needs way more attention and better communication into the developer community. Numerous environments will flag those images because they run in root context. Upfront communication would ensure teams can act before their images get rejected. Although, the initial announcement here mentions this fact, I would also expect that docs in this repo ( |
I think the primary thing that is blocking this repo from supporting rootless containers is
In either case, we do want to support this, and it should just be a matter of time. Of course we'd also accept any and all help from the community to get there faster! |
In order to comply with "restricted" pod security standards ("Heavily restricted policy, following current Pod hardening best practices.") or restrictive PodSecurityProfiles (deprecated k8s feature), it should be possible to product containers that:
Having strict Pod Admission policies (or PSPs) in place is an ask of the CIS Kubernetes Benchmark as well and is - in my experience - typically a requirement of operating kubernetes environments in governmental organizations or companies with high security requirements.
The .NET SDKs should allow for easy publishing of containers adhering to these configuration pracices and either
-p:PublishProfile=UnprivilegedContainer
or other MSBuild property) to opt into this type of configurationThe text was updated successfully, but these errors were encountered: