Coder Social home page Coder Social logo

olavorn / docker-dotnet-31-sonarscanner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bison92/docker-dotnet-sonarscanner

0.0 0.0 0.0 34 KB

Sonar Scanner MsBuild Dockerfile for dotNet Projects for OpenShift

License: MIT License

Dockerfile 100.00%

docker-dotnet-31-sonarscanner's Introduction

.Net Core Sonar Scanner on Docker Container

Sonar Scanner Image for .Net Core Projects

Docker Pulls Docker Automated build

This Image Using

Name Version
OS RedHat UBI8
Java OpenJDK 8 Update 171
.NET SDK .NET Core SDK 3.1
Sonar Scanner For DotNet Core CLI 3.2.0.1227

Please check Releases Page for details.

Source Image

Latest RedHat

Latest OpenJDK

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;

Example using in Gitlab gitlab-ci.yml

...

qa:
  image: olavorn/docker-dotnet-31-sonarscanner
  script:
    - dotnet restore
    - dotnet sonarscanner begin /k:"$SONAR_PROJECT_KEY" /d:sonar.login="$SONAR_TOKEN" /d:sonar.host.url=http://sonar:9000
    - dotnet build --no-restore -c Release
    - dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN" 
  

docker-dotnet-31-sonarscanner's People

Contributors

burakince avatar olavorn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.