Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SonarQube in local (community edition)

The following guide, alldescribe how to run in a contaner the community version of SonarQube. Languages suported:

langs

Prerequisites

You need to install

  • docker
  • docker-compose

For Mac Osx

brew install docker
brew install docker-compose

SonarQube Setup

First start

docker-compose up

Go to https:l127.0.0.1:9000.

Password

change the default credential (admin/admin) if asked to do. For instance you can use sonar as new password.

login admin/admin

update admin/sonar/sonar

New 'test' project

Now it is time to create a 'test' project. You can select add a project or new project to reach the following screen.

create

Select Manually and fill the next form as following

create

Click Set Up. and select to analyze the repository locally

analysis

Then click on Generate.

generate

Finally keep note of the TOKEN (ie. sqp_4089e3b40374e096cd9dd7769fa31cf6b04fe1da

token

you will use in the next step.

Run

In a new terminal, go to the source folder you want to scan

cd ${SOURCEPATH}

Raplace the TOKEN witht he one generated at the previous setup step

docker run --rm --network="host" -v "$(pwd):/data" noenv/sonar-scanner sonar-scanner -D sonar.projectKey=test -D sonar.host.url=http://127.0.0.1:9000 -D sonar.login=TOKEN -D sonar.language=php -D sonar.sources=.

Exmaple if the TOKEN is sqp_4089e3b40374e096cd9dd7769fa31cf6b04fe1da you need to run form the source folder the following

docker run --rm --network="host" -v "$(pwd):/data" noenv/sonar-scanner sonar-scanner -D sonar.projectKey=test -D sonar.host.url=http://127.0.0.1:9000 -D sonar.login=sqp_5737388298059550c4fc8a255f4208a734d468e9 -D sonar.language=php -D sonar.sources=.

Execute it.

Results

results

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors