Skip to content

final-gene/docker-hub-sonar-scanner

Repository files navigation

Sonar scanner

Docker build and publish

This is an image to run the sonar scanner.

How to use this image

Run the sonar-scanner image:

docker run \
    --rm \
    --env SONAR_HOST_URL=<http://sonar.example.com> \
    --env SONAR_LOGIN_TOKEN=<SONAR_ANALYZIS_TOKEN> \
    --volume ~/.sonar:/cache/.sonar \
    --volume "$(pwd)":/app \
    finalgene/sonar-scanner

By default, the SONAR_USER_HOME is defined to store data in /cache/.sonar.
Therefor it will be necessary to mount this directory or overide the environment SONAR_USER_HOME.

For further information take a look at the sonar scanner documentation.

Quick reference