redhat-developer / s2i-dotnetcore

.NET Core OpenShift images
Apache License 2.0
112 stars 192 forks source link

8.0: remove nss_wrapper to reduce image size. #470

Closed tmds closed 1 year ago

tmds commented 1 year ago

The nss_wrapper is used to introduce a known user for the random uid that OpenShift uses while running a container.

With OpenShift 4, such a user will already automatically be added in the /etc/passwd file without needing the nss_wrapper.

For OpenShift 3, removing the nss_wrapper leads to no user being known. The only side-effect for .NET is that the Environment.UserName will return an empty string.

Fixes https://github.com/redhat-developer/s2i-dotnetcore/issues/458.

omajid commented 1 year ago

3.11 should be fully dead by June 2024: https://access.redhat.com/support/policy/updates/openshift_noncurrent

What's the risk of 3.11 users using .NET 8 and depending on Environment.UserName?

tmds commented 1 year ago

What's the risk of 3.11 users using .NET 8 and depending on Environment.UserName?

The risk is very low because the method isn't running null we won't cause NREs, and the username in a container image is not an interesting piece of information.

tmds commented 1 year ago

Thanks for the review!