I'm trying to check the code coverage locally using using docker-dotnet-sonarscanner.
My steps until now:
Run the container with the Sonarqube, like so:
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
Now, I'm trying to execute the analyze, inside my project folder, I ran:
docker run --name dotnet-scanner -it --rm -v $(pwd) \ -e PROJECT_KEY=ConsoleApplication1 \ -e PROJECT_NAME=ConsoleApplication1 \ -e PROJECT_VERSION=1.0 \ -e HOST=my_ip_address:9000 \ -e LOGIN_KEY=the_key_I_got_on_local_Server\ burakince/docker-dotnet-sonarscanner
But I get the following output:
19:02:22.429 Failed to request and parse '172.20.61.69:9000/api/server/version': An exception occurred during a WebClient request.
Unhandled Exception: System.Net.WebException: An exception occurred during a WebClient request. ---> System.NullReferenceException: Object reference not set to an instance of an object at SonarScanner.MSBuild.PreProcessor.WebClientDownloader+PersistentUserAgentWebClient.GetWebRequest (System.Uri address) [0x00014] in :0 at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x0000d] in :0