Sign inSign up

airdock/sonarqube-scanner

By airdock

Updated over 6 years ago

Image
0

583

airdock/sonarqube-scanner repository overview

dockeri.co

Maintenance Ask Us Anything ! Open Source Love svg1

GitHub issues GitHub issues-closed Travis Ci Status MIT license

Sonarqube

GitHub release (latest SemVer)

docker-sonarqube-scanner

A docker container to run sonarqube scanner

Prerequisites

Getting started

Just clone the repo with the usual : git clone https://github.com/airdock-io/docker-sonarqube-scanner.git

  • Enter the repo
  • Type make build to build the image locally
  • If you want to see other commands available make help

Then you will need the file sonar-scanner.properties filled with your properties important: you have to fill the file and complete it with the informations corresponding to languages and test reports For instance: if you have a php project you could add those 2 lines:

sonar.php.tests.reportPath=path/to/your/.sonar.test.xml
sonar.php.coverage.reportPaths=path/to/your/.sonar.coverage.xml

See https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/ for more informations on configration

Then to use the image locally: docker run --rm -v ${PWD}/sonar-scanner.properties:/var/sonar-scanner/conf/sonar-scanner.properties -v path/to/your/code:/var/app sonarqube-scanner:latest

Or to use the image form docker hub: docker run --rm -v ${PWD}/sonar-scanner.properties:/var/sonar-scanner/conf/sonar-scanner.properties -v path/to/your/code:/var/app airdock/sonarqube-scanner:latest

Environment variables

Some of these vars are defined in the Dockerfile and others are not. Vars used by the entrypoint and command should be defined in dockerfile, vars relative to the phrasea php app are defined (if not in compose environment section) in entrypoint with a default value.

VarDefault Value
SONAR_SCANNER_VERSION4.3.0.2102
JAVA_HOME/usr
SONAR_SCANNER_OPTStrustStore and trustStorePassword

TrustStore / HTTPS

When using sonarqube over HTTPS you may need to add your certs to TrustStore. In order to do so jsut mount your certs in the folder /docker-entrypoint-certs.d, they will be injected during the entrypoint execution.

Tag summary

Content type

Image

Digest

Size

71.1 MB

Last updated

over 6 years ago

docker pull airdock/sonarqube-scanner