
Description
Describe the Bug
The docker image https://hub.docker.com/_/microsoft-dotnet-sdk sets environment variable NUGET_XMLDOC_MODE=skip. This negatively impacts nuget restore, causing certain package files to fail to restore properly.
While this setting may be useful in your build process during creation of the nuget package, it negatively impacts users of the docker image that may not be aware of this non-default setting. Our build infrastructure used this nuget image as an image for our build agents, and it's causing our builds to fail due to missing files in the nuget restore.
While I do know how to override this setting, I consider this a temporary work around. Nuget images shouldn't leak their build settings into the image produced, and should instead clean up the environment for the user's uses when finalizing the docker image. The only environment variables set in the final image should be (a) those built into the OS it's using (e.g. having a username set, program files, etc.) and (b) those necessary for the container's intended function (e.g. WindowsSdkDir, and other things a Developer Command Prompt for VS 2019 might set).
Steps to Reproduce
in the linked docker container, run echo NUGET_XMLDOC_MODE='%NUGET_XMLDOC_MODE%'