Sonar scanner image tailored for Python projects
919
The SonarQube Scanner
docker pull gcanal/sonar-scanner
docker build -t company/sonar-scanner .
You can although build the image using a specific sonar-scanner version like so :
docker build --build-arg SONAR_SCANNER_VERSION=3.0.1.733 -t company/sonar-scanner:3.0 .
Assuming you have a SonarQube instance running inside a Docker container named sonarqube :
docker run --rm -it -v $(pwd):/app --link sonarqube:sonarqube gcanal/sonar-scanner -Dsonar.host.url=http://sonarqube:9000
This project provide a docker compose file that provide an official sonarqube instance running against a postgres database.
Just run docker-compose up -d
You may be interested in reading the documentation from the official dockerized SonarQube image.
You will need to create a sonar-project.properties at your project root with the following :
sonar.projectKey=vendor:project-name
sonar.projectName=MyProject
sonar.projectVersion=1.0
sonar.language=a_language
sonar.sources=src
sonar.sourceEncoding=UTF-8
vendor:project-name will a relevant project key (ex : company:awesome-project)MyProject with a project name (ex : AwesomeProject)1.0 with a meaningful version numbera_language with a supported SonarQube language (ex : php)src with the relative path to your source codeDepending of the language specified in sonar.language, more parameters may be available to you, please read Analyzing with SonarQube Scanner
Content type
Image
Digest
Size
69.9 MB
Last updated
almost 9 years ago
docker pull vladistan/sonar-scanner