Sign inSign up

burakince/docker-dotnet-sonarscanner

By burakince

•Updated over 8 years ago
Archived

Sonar Scanner for .Net Core projects

Image
3

100K+

burakince/docker-dotnet-sonarscanner repository overview

⁠.Net Core Sonar Scanner on Docker Container

Sonar Scanner MsBuild Dockerfile for .Net Core Projects

Docker Pulls Docker Automated build Docker Build Status

⁠This Image Using

NameVersion
OSDebianStretch (9)
JavaOpenJDK8 Update 171
.NET FrameworkMono5.12.0.226
.NET SDK.NET Core SDK2.1 (2.1.301)
Sonar ScannerCLI3.2.0.1227
Sonar ScannerMS Build4.3.1.1372

Please check Releases Page⁠ for details.

⁠Latest Versions

Latest Debian⁠ Latest OpenJDK⁠ Latest Mono⁠ Latest .Net SDK⁠ Latest Sonar Scanner⁠

⁠Using Example

First of all you need a sonarqube server. If you haven't one, run this code;

docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube

And then you need .Net Core project. If you haven't one, run this codes;

mkdir ConsoleApplication1
cd ConsoleApplication1

dotnet new console
dotnet new sln
dotnet sln ConsoleApplication1.sln add ConsoleApplication1.csproj

Take login token from sonarqube server, change working directory to project directory and run this code;

docker run --name dotnet-scanner -it --rm -v $(pwd):/project \
  -e PROJECT_KEY=ConsoleApplication1 \
  -e PROJECT_NAME=ConsoleApplication1 \
  -e PROJECT_VERSION=1.0 \
  -e HOST=http://localhost:9000 \
  -e LOGIN_KEY=CHANGE_THIS_ONE \
  burakince/docker-dotnet-sonarscanner

Note: If you have sonarqube as docker container, you must inspect sonarqube's bridge network IP address and use it in HOST variable.

docker network inspect bridge

Tag summary

Content type

Image

Digest

Size

502.8 MB

Last updated

over 8 years ago

docker pull burakince/docker-dotnet-sonarscanner