Image Overview: sonar-scanner-cli

Overview: sonar-scanner-cli Chainguard Image

Scanner CLI for SonarQube and SonarCloud

Download this Image

The image is available on cgr.dev:

docker pull cgr.dev/chainguard/sonar-scanner-cli:latest

To use this image, ensure SonarQube is installed and accessible to the host where you will invoke the scanner. The scanner image will default to connecting to the SonarQube API on port 9000.

The following command shows example invocation of the image, assuming $PWD is the directory containing code to be scanned and -Dsonar.host.url is the address of a SonarQube server:

docker run --rm -v $PWD:/usr/src $IMAGE_NAME \
    -Dsonar.login=admin \
    -Dsonar.password=admin \
    -Dsonar.projectKey=default \
    -Dsonar.host.url=http://192.0.2.1:9000

Refer to the SonarScanner CLI documentation for detailed instructions on how to configure environment variables for the running container and for additional properties that can be configured at runtime.

Last updated: 2024-06-23 00:43