Return to Image List

sonar-scanner-cli

sonar-scanner-cli

SonarScanner CLI is the command line tool used with SonarQube to perform static code analysis on source code. This Docker image is not compatible with C/C#/C++/Objective-C projects.

See the official site for more information

This image is built to run on the IBM Z architecture.


License

View license information here

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


Versions

Use the pull string below for the version of this image you require.
4.5.0.2216 docker pull icr.io/ibmz/sonar-scanner-cli@sha256:3830b49a8b81eb02fd250044836c1b558185d5a9b40c68df1e87904e4f1f3718 Vulnerability Report
Version Pull String Security (IBM Cloud)

Usage Notes

Start a icr.io/ibmz/sonarqube:8.5.1.38104 container.

Wait about 40 seconds for SonarQube to be ready before attempting to perform static code analysis.

Create a Docker volume place your source code, and a sonar-project.properties file in the root directory of that volume.

docker volume namedvolume


# sonar-project.properties
sonar.projectKey=
sonar.projectName=
sonar.sources=/usr/src
sonar.language=
sonar.sourceEncoding=

Once SonarQube is ready, run SonarScanner CLI to perform static code analysis on your code.

curl -u admin:admin http://:/api/system/health



Total    % Received % Xferd  Average Speed   Time    Time      Current
                             Dload  Upload   Total   Spent     Speed
100    30  100    30    0     0     41      0 --:--:-- --:--:--   41{"health":"GREEN","causes":[]}


docker run --rm \
-e SONAR_HOST_URL="http://:/api/system/health" \
-v :/usr/src \
icr.io/ibmz/sonar-scanner-cli:4.5.0.2216 \