docker run -it --rm \ -v $PWD:/nuke \ -v $HOME/.nuget/packages:/nuget \ -e NUGET_PACKAGES='/nuget' \ -v $HOME/.gradle:/gradle \ -e GRADLE_USER_HOME='/gradle' \ -w /nuke \ --pull missing mcr.microsoft.com/dotnet/sdk:6.0
fix: build with local .NET SDK
ByteArrayOutputStream stdout = new ByteArrayOutputStream() exec { executable "which" args 'dotnet' standardOutput = stdout workingDir rootDir } def dotnet = stdout.toString().trim() logger.error(dotnet) def path = System.getenv('PATH') logger.error(path) def dotnetRoot = System.getenv('DOTNET_ROOT') logger.error(dotnetRoot)